org.biojava3.alignment
Class NeedlemanWunsch<S extends Sequence<C>,C extends Compound>

java.lang.Object
  extended by org.biojava3.alignment.template.AbstractScorer
      extended by org.biojava3.alignment.template.AbstractMatrixAligner<S,C>
          extended by org.biojava3.alignment.template.AbstractPairwiseSequenceAligner<S,C>
              extended by org.biojava3.alignment.NeedlemanWunsch<S,C>
Type Parameters:
S - each Sequence of the alignment pair is of type S
C - each element of an AlignedSequence is a Compound of type C
All Implemented Interfaces:
Aligner<S,C>, MatrixAligner<S,C>, PairwiseSequenceAligner<S,C>, PairwiseSequenceScorer<S,C>, Scorer

public class NeedlemanWunsch<S extends Sequence<C>,C extends Compound>
extends AbstractPairwiseSequenceAligner<S,C>

Needleman and Wunsch defined an algorithm for pairwise global sequence alignments (from the first until the last Compound of each Sequence). This class performs such global sequence comparisons efficiently by dynamic programming.

Author:
Mark Chapman

Field Summary
 
Fields inherited from class org.biojava3.alignment.template.AbstractPairwiseSequenceAligner
pair
 
Fields inherited from class org.biojava3.alignment.template.AbstractMatrixAligner
anchors, cutsPerSection, gapPenalty, max, min, profile, score, scores, time, xyMax, xyStart
 
Constructor Summary
NeedlemanWunsch()
          Before running a pairwise global sequence alignment, data must be sent in via calls to AbstractPairwiseSequenceAligner.setQuery(Sequence), AbstractPairwiseSequenceAligner.setTarget(Sequence), AbstractMatrixAligner.setGapPenalty(GapPenalty), and AbstractMatrixAligner.setSubstitutionMatrix(SubstitutionMatrix).
NeedlemanWunsch(S query, S target, GapPenalty gapPenalty, SubstitutionMatrix<C> subMatrix)
          Prepares for a pairwise global sequence alignment.
 
Method Summary
protected  void setProfile(List<AlignedSequence.Step> sx, List<AlignedSequence.Step> sy)
           
 
Methods inherited from class org.biojava3.alignment.template.AbstractPairwiseSequenceAligner
getCompoundSet, getCompoundsOfQuery, getCompoundsOfTarget, getPair, getQuery, getScoreMatrixDimensions, getSubstitutionScore, getTarget, isReady, reset, setQuery, setTarget
 
Methods inherited from class org.biojava3.alignment.template.AbstractMatrixAligner
align, getComputationTime, getGapPenalty, getMaxScore, getMinScore, getProfile, getScore, getScoreMatrix, getScoreMatrixAsString, getSubstitutionMatrix, getSubstitutionScoreVector, getSubstitutionScoreVector, isLocal, isStoringScoreMatrix, resetAnchors, setGapPenalty, setStoringScoreMatrix, setSubstitutionMatrix
 
Methods inherited from class org.biojava3.alignment.template.AbstractScorer
getDistance, getDistance, getSimilarity, getSimilarity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.biojava3.alignment.template.Aligner
getComputationTime, getProfile
 
Methods inherited from interface org.biojava3.alignment.template.Scorer
getDistance, getDistance, getMaxScore, getMinScore, getScore, getSimilarity, getSimilarity
 

Constructor Detail

NeedlemanWunsch

public NeedlemanWunsch()
Before running a pairwise global sequence alignment, data must be sent in via calls to AbstractPairwiseSequenceAligner.setQuery(Sequence), AbstractPairwiseSequenceAligner.setTarget(Sequence), AbstractMatrixAligner.setGapPenalty(GapPenalty), and AbstractMatrixAligner.setSubstitutionMatrix(SubstitutionMatrix).


NeedlemanWunsch

public NeedlemanWunsch(S query,
                       S target,
                       GapPenalty gapPenalty,
                       SubstitutionMatrix<C> subMatrix)
Prepares for a pairwise global sequence alignment.

Parameters:
query - the first Sequence of the pair to align
target - the second Sequence of the pair to align
gapPenalty - the gap penalties used during alignment
subMatrix - the set of substitution scores used during alignment
Method Detail

setProfile

protected void setProfile(List<AlignedSequence.Step> sx,
                          List<AlignedSequence.Step> sy)
Specified by:
setProfile in class AbstractMatrixAligner<S extends Sequence<C>,C extends Compound>