java.lang.Object
org.biojava.nbio.alignment.template.AbstractScorer
org.biojava.nbio.alignment.template.AbstractMatrixAligner<S,C>
 
org.biojava.nbio.alignment.template.AbstractPairwiseSequenceAligner<S,C>
 
org.biojava.nbio.alignment.routines.AnchoredPairwiseSequenceAligner<S,C> 
- Type Parameters:
 S- eachSequenceof the alignment pair is of type SC- each element of anAlignedSequenceis aCompoundof 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
 
- 
Field Summary
Fields inherited from class org.biojava.nbio.alignment.template.AbstractPairwiseSequenceAligner
pairFields inherited from class org.biojava.nbio.alignment.template.AbstractMatrixAligner
anchors, cutsPerSection, gapPenalty, max, min, profile, score, scores, time, xyMax, xyStart - 
Constructor Summary
ConstructorsConstructorDescriptionBefore running a pairwise global sequence alignment, data must be sent in via calls toAbstractPairwiseSequenceAligner.setQuery(Sequence),AbstractPairwiseSequenceAligner.setTarget(Sequence),AbstractMatrixAligner.setGapPenalty(GapPenalty), andAbstractMatrixAligner.setSubstitutionMatrix(SubstitutionMatrix).AnchoredPairwiseSequenceAligner(S query, S target, GapPenalty gapPenalty, SubstitutionMatrix<C> subMatrix) Prepares for a pairwise global sequence alignment.AnchoredPairwiseSequenceAligner(S query, S target, GapPenalty gapPenalty, SubstitutionMatrix<C> subMatrix, int[] anchors) Prepares for a pairwise global sequence alignment. - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnchor(int queryIndex, int targetIndex) Adds an additional anchor to the set of anchored compoundsint[]Returns the list of anchors.voidsetAnchors(int[] anchors) Sets the starting list of anchors before running the alignment routine.protected voidMethods inherited from class org.biojava.nbio.alignment.template.AbstractPairwiseSequenceAligner
getCompoundSet, getCompoundsOfQuery, getCompoundsOfTarget, getPair, getQuery, getScoreMatrixDimensions, getSubstitutionScore, getTarget, isReady, reset, setQuery, setTargetMethods inherited from class org.biojava.nbio.alignment.template.AbstractMatrixAligner
align, getComputationTime, getGapPenalty, getMaxScore, getMinScore, getProfile, getScore, getScoreMatrix, getScoreMatrixAsString, getSubstitutionMatrix, getSubstitutionScoreVector, getSubstitutionScoreVector, isLocal, isStoringScoreMatrix, setGapPenalty, setStoringScoreMatrix, setSubstitutionMatrixMethods inherited from class org.biojava.nbio.alignment.template.AbstractScorer
getDistance, getDistance, getSimilarity, getSimilarityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.biojava.nbio.alignment.template.Aligner
getComputationTime, getProfileMethods inherited from interface org.biojava.nbio.alignment.template.Scorer
getDistance, getDistance, getMaxScore, getMinScore, getScore, getSimilarity, getSimilarity 
- 
Constructor Details
- 
AnchoredPairwiseSequenceAligner
public AnchoredPairwiseSequenceAligner()Before running a pairwise global sequence alignment, data must be sent in via calls toAbstractPairwiseSequenceAligner.setQuery(Sequence),AbstractPairwiseSequenceAligner.setTarget(Sequence),AbstractMatrixAligner.setGapPenalty(GapPenalty), andAbstractMatrixAligner.setSubstitutionMatrix(SubstitutionMatrix). - 
AnchoredPairwiseSequenceAligner
public AnchoredPairwiseSequenceAligner(S query, S target, GapPenalty gapPenalty, SubstitutionMatrix<C> subMatrix) Prepares for a pairwise global sequence alignment.- Parameters:
 query- the firstSequenceof the pair to aligntarget- the secondSequenceof the pair to aligngapPenalty- the gap penalties used during alignmentsubMatrix- the set of substitution scores used during alignmentcutsPerSection- the number of cuts added to each section during each pass
 - 
AnchoredPairwiseSequenceAligner
public AnchoredPairwiseSequenceAligner(S query, S target, GapPenalty gapPenalty, SubstitutionMatrix<C> subMatrix, int[] anchors) Prepares for a pairwise global sequence alignment.- Parameters:
 query- the firstSequenceof the pair to aligntarget- the secondSequenceof the pair to aligngapPenalty- the gap penalties used during alignmentsubMatrix- the set of substitution scores used during alignmentcutsPerSection- the number of cuts added to each section during each passanchors- the initial list of anchors
 
 - 
 - 
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 compoundtargetIndex- 0-base index of target sequence compound to anchor to
 - 
setProfile
- Specified by:
 setProfilein classAbstractMatrixAligner<S extends Sequence<C>,C extends Compound> 
 
 -