jebl.evolution.align
Class NeedlemanWunschLinearSpaceAffine

java.lang.Object
  extended by jebl.evolution.align.Align
      extended by jebl.evolution.align.NeedlemanWunschLinearSpaceAffine
All Implemented Interfaces:
PairwiseAligner

public class NeedlemanWunschLinearSpaceAffine
extends Align
implements PairwiseAligner


Nested Class Summary
 
Nested classes/interfaces inherited from interface jebl.evolution.align.PairwiseAligner
PairwiseAligner.Result
 
Constructor Summary
NeedlemanWunschLinearSpaceAffine(Scores sub, float openGapPenalty, float extendGapPenalty)
           
NeedlemanWunschLinearSpaceAffine(Scores sub, float d, float e, boolean freeGapsAtEnds)
           
NeedlemanWunschLinearSpaceAffine(Scores sub, float d, float e, boolean freeGapsAtEnds, boolean applyGapExtendCostToFirstGapResidue)
           
 
Method Summary
 void allocateMatrices(int n, int m)
           
 jebl.evolution.align.AlignmentResult[] doAlignment(jebl.evolution.align.Profile profile1, jebl.evolution.align.Profile profile2, ProgressListener progress, boolean scoreOnly)
           
 PairwiseAligner.Result doAlignment(Sequence seq1, Sequence seq2, ProgressListener progress)
           
 void doAlignment(String sq1, String sq2)
          Performs the alignment.
 void doAlignment(String sq1, String sq2, ProgressListener progress)
           
 void doAlignment(String sq1, String sq2, ProgressListener progress, boolean scoreOnly)
           
 String[] getMatch()
           
 float getScore()
           
 double getScore(Sequence seq1, Sequence seq2)
           
static void main(String[] arguments)
           
 Traceback next(Traceback tb)
          Get the next state in the traceback
 void prepareAlignment(String sq1, String sq2)
          Initialises the matrices for the alignment.
 void printf(Output out)
          Print matrix used to calculate this alignment.
 void setDebug(boolean display)
           
 void setGapExtend(float e)
           
 
Methods inherited from class jebl.evolution.align.Align
doMatch, doMatch, formatScore, setGapOpen, setScores, traceback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NeedlemanWunschLinearSpaceAffine

public NeedlemanWunschLinearSpaceAffine(Scores sub,
                                        float openGapPenalty,
                                        float extendGapPenalty)

NeedlemanWunschLinearSpaceAffine

public NeedlemanWunschLinearSpaceAffine(Scores sub,
                                        float d,
                                        float e,
                                        boolean freeGapsAtEnds)

NeedlemanWunschLinearSpaceAffine

public NeedlemanWunschLinearSpaceAffine(Scores sub,
                                        float d,
                                        float e,
                                        boolean freeGapsAtEnds,
                                        boolean applyGapExtendCostToFirstGapResidue)
Parameters:
applyGapExtendCostToFirstGapResidue - Generally there is an ambiguity in bioinformatics whether "gap opening" already includes the first gap character - in other words, whether a gap of length N has
     (a) a cost of gapOpen + N * gapExtend
     or
     (b) gapOpen + (N-1) * gapExtend.
     
. applyGapExtendCostToFirstGapResidue should be true if using interpretation (a).
sub -
d -
e -
freeGapsAtEnds -
Method Detail

allocateMatrices

public void allocateMatrices(int n,
                             int m)

doAlignment

public void doAlignment(String sq1,
                        String sq2)
Performs the alignment. Abstract.


doAlignment

public void doAlignment(String sq1,
                        String sq2,
                        ProgressListener progress,
                        boolean scoreOnly)

doAlignment

public void doAlignment(String sq1,
                        String sq2,
                        ProgressListener progress)

doAlignment

public jebl.evolution.align.AlignmentResult[] doAlignment(jebl.evolution.align.Profile profile1,
                                                          jebl.evolution.align.Profile profile2,
                                                          ProgressListener progress,
                                                          boolean scoreOnly)

getMatch

public String[] getMatch()
Overrides:
getMatch in class Align
Returns:
two-element array containing an alignment with maximal score

getScore

public float getScore()
Returns:
score for this alignment

main

public static void main(String[] arguments)

setDebug

public void setDebug(boolean display)

doAlignment

public PairwiseAligner.Result doAlignment(Sequence seq1,
                                          Sequence seq2,
                                          ProgressListener progress)
Specified by:
doAlignment in interface PairwiseAligner

getScore

public double getScore(Sequence seq1,
                       Sequence seq2)
Specified by:
getScore in interface PairwiseAligner

prepareAlignment

public void prepareAlignment(String sq1,
                             String sq2)
Description copied from class: Align
Initialises the matrices for the alignment.


printf

public void printf(Output out)
Print matrix used to calculate this alignment.

Parameters:
out - Output to print to.

setGapExtend

public void setGapExtend(float e)

next

public Traceback next(Traceback tb)
Get the next state in the traceback

Overrides:
next in class Align
Parameters:
tb - current Traceback
Returns:
next Traceback