Class AnchoredPairwiseSequenceAligner<S extends Sequence<C>,C extends Compound>

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
Direct Known Subclasses:
GuanUberbacher, NeedlemanWunsch

public class AnchoredPairwiseSequenceAligner<S extends Sequence<C>,C extends Compound> extends AbstractPairwiseSequenceAligner<S,C>
This algorithm uses a divide-and-conquer approach to find optimal pairwise global sequence alignments (from the first until the last Compound of each Sequence) with the restriction that any alignment produced will connect the query sequence to the target sequence at the anchors. This class performs such global sequence comparisons efficiently by dynamic programming with a space requirement reduced from quadratic (a multiple of query sequence length times target sequence length) to only linear (a multiple of query sequence length). The counterpoint to this reduction in space complexity is a modest (a multiple < 2) increase in time.
Author:
Mark Chapman, Daniel Cameron
  • Constructor Details

  • Method Details

    • getAnchors

      public int[] getAnchors()
      Returns the list of anchors. The populated elements correspond to query compounds with a connection established to a target compound.
      Returns:
      the list of anchors
    • setAnchors

      public void setAnchors(int[] anchors)
      Sets the starting list of anchors before running the alignment routine.
      Parameters:
      anchors - list of points that are tied to the given indices in the target
    • addAnchor

      public void addAnchor(int queryIndex, int targetIndex)
      Adds an additional anchor to the set of anchored compounds
      Parameters:
      queryIndex - 0-based index of query sequence compound
      targetIndex - 0-base index of target sequence compound to anchor to
    • 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>