- 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>
-
- 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:
AnchoredPairwiseSequenceAligner,SmithWaterman
public abstract class AbstractPairwiseSequenceAligner<S extends Sequence<C>,C extends Compound> extends AbstractMatrixAligner<S,C> implements PairwiseSequenceAligner<S,C>
- Author:
- Mark Chapman
-
-
Field Summary
Fields Modifier and Type Field Description protected SequencePair<S,C>pair-
Fields inherited from class org.biojava.nbio.alignment.template.AbstractMatrixAligner
anchors, cutsPerSection, gapPenalty, max, min, profile, score, scores, time, xyMax, xyStart
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractPairwiseSequenceAligner()Before running a pairwise global sequence alignment, data must be sent in via calls tosetQuery(Sequence),setTarget(Sequence),AbstractMatrixAligner.setGapPenalty(GapPenalty), andAbstractMatrixAligner.setSubstitutionMatrix(SubstitutionMatrix).protectedAbstractPairwiseSequenceAligner(S query, S target, GapPenalty gapPenalty, SubstitutionMatrix<C> subMatrix)Prepares for a pairwise global sequence alignment.protectedAbstractPairwiseSequenceAligner(S query, S target, GapPenalty gapPenalty, SubstitutionMatrix<C> subMatrix, boolean local)Prepares for a pairwise sequence alignment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected CompoundSet<C>getCompoundSet()protected List<C>getCompoundsOfQuery()protected List<C>getCompoundsOfTarget()SequencePair<S,C>getPair()Returns sequence alignment pair.SgetQuery()Returns the first sequence of the pair.protected int[]getScoreMatrixDimensions()protected intgetSubstitutionScore(int queryColumn, int targetColumn)SgetTarget()Returns the second sequence of the pair.protected booleanisReady()protected voidreset()Resets output fields; should be overridden to set max and minvoidsetQuery(S query)Sets the querySequence.voidsetTarget(S target)Sets the targetSequence.-
Methods inherited from class org.biojava.nbio.alignment.template.AbstractMatrixAligner
align, getComputationTime, getGapPenalty, getMaxScore, getMinScore, getProfile, getScore, getScoreMatrix, getScoreMatrixAsString, getSubstitutionMatrix, getSubstitutionScoreVector, getSubstitutionScoreVector, isLocal, isStoringScoreMatrix, setGapPenalty, setProfile, setStoringScoreMatrix, setSubstitutionMatrix
-
Methods inherited from class org.biojava.nbio.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.biojava.nbio.alignment.template.Aligner
getComputationTime, getProfile
-
Methods inherited from interface org.biojava.nbio.alignment.template.Scorer
getDistance, getDistance, getMaxScore, getMinScore, getScore, getSimilarity, getSimilarity
-
-
-
-
Constructor Detail
-
AbstractPairwiseSequenceAligner
protected AbstractPairwiseSequenceAligner()
Before running a pairwise global sequence alignment, data must be sent in via calls tosetQuery(Sequence),setTarget(Sequence),AbstractMatrixAligner.setGapPenalty(GapPenalty), andAbstractMatrixAligner.setSubstitutionMatrix(SubstitutionMatrix).
-
AbstractPairwiseSequenceAligner
protected AbstractPairwiseSequenceAligner(S query, S target, GapPenalty gapPenalty, SubstitutionMatrix<C> subMatrix)
Prepares for a pairwise global sequence alignment.
-
AbstractPairwiseSequenceAligner
protected AbstractPairwiseSequenceAligner(S query, S target, GapPenalty gapPenalty, SubstitutionMatrix<C> subMatrix, boolean local)
Prepares for a pairwise 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 alignmentlocal- if true, find a region of similarity rather than aligning every compound
-
-
Method Detail
-
setQuery
public void setQuery(S query)
Sets the querySequence.- Parameters:
query- the firstSequenceof the pair to align
-
setTarget
public void setTarget(S target)
Sets the targetSequence.- Parameters:
target- the secondSequenceof the pair to align
-
getPair
public SequencePair<S,C> getPair()
Description copied from interface:PairwiseSequenceAlignerReturns sequence alignment pair.
-
getQuery
public S getQuery()
Description copied from interface:PairwiseSequenceScorerReturns the first sequence of the pair.
-
getTarget
public S getTarget()
Description copied from interface:PairwiseSequenceScorerReturns the second sequence of the pair.
-
getCompoundSet
protected CompoundSet<C> getCompoundSet()
- Specified by:
getCompoundSetin classAbstractMatrixAligner<S extends Sequence<C>,C extends Compound>
-
getCompoundsOfQuery
protected List<C> getCompoundsOfQuery()
- Specified by:
getCompoundsOfQueryin classAbstractMatrixAligner<S extends Sequence<C>,C extends Compound>
-
getCompoundsOfTarget
protected List<C> getCompoundsOfTarget()
- Specified by:
getCompoundsOfTargetin classAbstractMatrixAligner<S extends Sequence<C>,C extends Compound>
-
getScoreMatrixDimensions
protected int[] getScoreMatrixDimensions()
- Specified by:
getScoreMatrixDimensionsin classAbstractMatrixAligner<S extends Sequence<C>,C extends Compound>
-
getSubstitutionScore
protected int getSubstitutionScore(int queryColumn, int targetColumn)
- Specified by:
getSubstitutionScorein classAbstractMatrixAligner<S extends Sequence<C>,C extends Compound>
-
isReady
protected boolean isReady()
-
reset
protected void reset()
Description copied from class:AbstractMatrixAlignerResets output fields; should be overridden to set max and min
-
-