Class AbstractProfileProfileAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound>
- java.lang.Object
-
- org.biojava.nbio.alignment.template.AbstractScorer
-
- org.biojava.nbio.alignment.template.AbstractMatrixAligner<S,C>
-
- org.biojava.nbio.alignment.template.AbstractProfileProfileAligner<S,C>
-
- Type Parameters:
S- eachSequencein the pair of alignmentProfiles is of type SC- each element of anAlignedSequenceis aCompoundof type C
- All Implemented Interfaces:
Aligner<S,C>,MatrixAligner<S,C>,ProfileProfileAligner<S,C>,ProfileProfileScorer<S,C>,Scorer
- Direct Known Subclasses:
SimpleProfileProfileAligner
public abstract class AbstractProfileProfileAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound> extends AbstractMatrixAligner<S,C> implements ProfileProfileAligner<S,C>
Implements common code for anAlignerfor a pair ofProfiles.- Author:
- Mark Chapman
-
-
Field Summary
Fields Modifier and Type Field Description protected org.biojava.nbio.core.alignment.template.ProfilePair<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 protectedAbstractProfileProfileAligner()Before running a profile-profile alignment, data must be sent in via calls tosetQuery(Profile),setTarget(Profile),AbstractMatrixAligner.setGapPenalty(GapPenalty), andAbstractMatrixAligner.setSubstitutionMatrix(SubstitutionMatrix).protectedAbstractProfileProfileAligner(Future<org.biojava.nbio.core.alignment.template.ProfilePair<S,C>> query, Future<org.biojava.nbio.core.alignment.template.ProfilePair<S,C>> target, GapPenalty gapPenalty, org.biojava.nbio.core.alignment.template.SubstitutionMatrix<C> subMatrix)Prepares for a profile-profile alignment run concurrently.protectedAbstractProfileProfileAligner(Future<org.biojava.nbio.core.alignment.template.ProfilePair<S,C>> query, org.biojava.nbio.core.alignment.template.Profile<S,C> target, GapPenalty gapPenalty, org.biojava.nbio.core.alignment.template.SubstitutionMatrix<C> subMatrix)Prepares for a profile-profile alignment run concurrently.protectedAbstractProfileProfileAligner(org.biojava.nbio.core.alignment.template.Profile<S,C> query, Future<org.biojava.nbio.core.alignment.template.ProfilePair<S,C>> target, GapPenalty gapPenalty, org.biojava.nbio.core.alignment.template.SubstitutionMatrix<C> subMatrix)Prepares for a profile-profile alignment run concurrently.protectedAbstractProfileProfileAligner(org.biojava.nbio.core.alignment.template.Profile<S,C> query, org.biojava.nbio.core.alignment.template.Profile<S,C> target, GapPenalty gapPenalty, org.biojava.nbio.core.alignment.template.SubstitutionMatrix<C> subMatrix)Prepares for a profile-profile alignment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.biojava.nbio.core.sequence.template.CompoundSet<C>getCompoundSet()protected List<C>getCompoundsOfQuery()protected List<C>getCompoundsOfTarget()org.biojava.nbio.core.alignment.template.ProfilePair<S,C>getPair()Returns alignment profile pair.org.biojava.nbio.core.alignment.template.Profile<S,C>getQuery()Returns the first profile of the pair.protected int[]getScoreMatrixDimensions()protected intgetSubstitutionScore(int queryColumn, int targetColumn)org.biojava.nbio.core.alignment.template.Profile<S,C>getTarget()Returns the second profile of the pair.protected booleanisReady()protected voidreset()Resets output fields; should be overridden to set max and minvoidsetQuery(org.biojava.nbio.core.alignment.template.Profile<S,C> query)Sets the queryProfile.voidsetTarget(org.biojava.nbio.core.alignment.template.Profile<S,C> target)Sets the targetProfile.-
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
-
AbstractProfileProfileAligner
protected AbstractProfileProfileAligner()
Before running a profile-profile alignment, data must be sent in via calls tosetQuery(Profile),setTarget(Profile),AbstractMatrixAligner.setGapPenalty(GapPenalty), andAbstractMatrixAligner.setSubstitutionMatrix(SubstitutionMatrix).
-
AbstractProfileProfileAligner
protected AbstractProfileProfileAligner(org.biojava.nbio.core.alignment.template.Profile<S,C> query, org.biojava.nbio.core.alignment.template.Profile<S,C> target, GapPenalty gapPenalty, org.biojava.nbio.core.alignment.template.SubstitutionMatrix<C> subMatrix)
Prepares for a profile-profile alignment.- Parameters:
query- the firstProfileof the pair to aligntarget- the secondProfileof the pair to aligngapPenalty- the gap penalties used during alignmentsubMatrix- the set of substitution scores used during alignment
-
AbstractProfileProfileAligner
protected AbstractProfileProfileAligner(Future<org.biojava.nbio.core.alignment.template.ProfilePair<S,C>> query, Future<org.biojava.nbio.core.alignment.template.ProfilePair<S,C>> target, GapPenalty gapPenalty, org.biojava.nbio.core.alignment.template.SubstitutionMatrix<C> subMatrix)
Prepares for a profile-profile alignment run concurrently.- Parameters:
query- the firstProfileof the pair to align, still to be calculatedtarget- the secondProfileof the pair to align, still to be calculatedgapPenalty- the gap penalties used during alignmentsubMatrix- the set of substitution scores used during alignment
-
AbstractProfileProfileAligner
protected AbstractProfileProfileAligner(org.biojava.nbio.core.alignment.template.Profile<S,C> query, Future<org.biojava.nbio.core.alignment.template.ProfilePair<S,C>> target, GapPenalty gapPenalty, org.biojava.nbio.core.alignment.template.SubstitutionMatrix<C> subMatrix)
Prepares for a profile-profile alignment run concurrently.- Parameters:
query- the firstProfileof the pair to aligntarget- the secondProfileof the pair to align, still to be calculatedgapPenalty- the gap penalties used during alignmentsubMatrix- the set of substitution scores used during alignment
-
AbstractProfileProfileAligner
protected AbstractProfileProfileAligner(Future<org.biojava.nbio.core.alignment.template.ProfilePair<S,C>> query, org.biojava.nbio.core.alignment.template.Profile<S,C> target, GapPenalty gapPenalty, org.biojava.nbio.core.alignment.template.SubstitutionMatrix<C> subMatrix)
Prepares for a profile-profile alignment run concurrently.- Parameters:
query- the firstProfileof the pair to align, still to be calculatedtarget- the secondProfileof the pair to aligngapPenalty- the gap penalties used during alignmentsubMatrix- the set of substitution scores used during alignment
-
-
Method Detail
-
setQuery
public void setQuery(org.biojava.nbio.core.alignment.template.Profile<S,C> query)
Sets the queryProfile.- Parameters:
query- the firstProfileof the pair to align
-
setTarget
public void setTarget(org.biojava.nbio.core.alignment.template.Profile<S,C> target)
Sets the targetProfile.- Parameters:
target- the secondProfileof the pair to align
-
getPair
public org.biojava.nbio.core.alignment.template.ProfilePair<S,C> getPair()
Description copied from interface:ProfileProfileAlignerReturns alignment profile pair.- Specified by:
getPairin interfaceProfileProfileAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound>- Returns:
- alignment profile pair
-
getQuery
public org.biojava.nbio.core.alignment.template.Profile<S,C> getQuery()
Description copied from interface:ProfileProfileScorerReturns the first profile of the pair.- Specified by:
getQueryin interfaceProfileProfileScorer<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound>- Returns:
- the first profile of the pair
-
getTarget
public org.biojava.nbio.core.alignment.template.Profile<S,C> getTarget()
Description copied from interface:ProfileProfileScorerReturns the second profile of the pair.- Specified by:
getTargetin interfaceProfileProfileScorer<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound>- Returns:
- the second profile of the pair
-
getCompoundSet
protected org.biojava.nbio.core.sequence.template.CompoundSet<C> getCompoundSet()
- Specified by:
getCompoundSetin classAbstractMatrixAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound>
-
getCompoundsOfQuery
protected List<C> getCompoundsOfQuery()
- Specified by:
getCompoundsOfQueryin classAbstractMatrixAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound>
-
getCompoundsOfTarget
protected List<C> getCompoundsOfTarget()
- Specified by:
getCompoundsOfTargetin classAbstractMatrixAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound>
-
getScoreMatrixDimensions
protected int[] getScoreMatrixDimensions()
- Specified by:
getScoreMatrixDimensionsin classAbstractMatrixAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound>
-
getSubstitutionScore
protected int getSubstitutionScore(int queryColumn, int targetColumn)- Specified by:
getSubstitutionScorein classAbstractMatrixAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound>
-
isReady
protected boolean isReady()
- Specified by:
isReadyin classAbstractMatrixAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound>
-
reset
protected void reset()
Description copied from class:AbstractMatrixAlignerResets output fields; should be overridden to set max and min- Overrides:
resetin classAbstractMatrixAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound>
-
-