Package org.biojava.nbio.alignment
Class SubstitutionMatrixScorer<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.SubstitutionMatrixScorer<S,C>
-
- Type Parameters:
S-C-
- All Implemented Interfaces:
PairwiseSequenceScorer<S,C>,Scorer
public class SubstitutionMatrixScorer<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound> extends AbstractScorer implements PairwiseSequenceScorer<S,C>
Scores using a substitution matrix. Specifically, the score is the sum of the substitution matrix entries corresponding to the alignment. Gaps are scored according to the substitution matrix, just as matches and mismatches.- Author:
- dmyersturnbull
-
-
Constructor Summary
Constructors Constructor Description SubstitutionMatrixScorer(org.biojava.nbio.core.alignment.template.SequencePair<S,C> pair, org.biojava.nbio.core.alignment.template.SubstitutionMatrix<C> matrix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetMaxScore()Returns maximum possible score.doublegetMinScore()Returns minimum possible score.SgetQuery()Returns the first sequence of the pair.doublegetScore()Returns score resulting from algorithm.SgetTarget()Returns the second sequence of the pair.-
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.Scorer
getDistance, getDistance, getSimilarity, getSimilarity
-
-
-
-
Method Detail
-
getMaxScore
public double getMaxScore()
Description copied from interface:ScorerReturns maximum possible score.- Specified by:
getMaxScorein interfaceScorer- Returns:
- The maximum score the query could be assigned when aligned against any target sequence.
-
getMinScore
public double getMinScore()
Description copied from interface:ScorerReturns minimum possible score.- Specified by:
getMinScorein interfaceScorer- Returns:
- The minimum score the query could be assigned when aligned against any target sequence.
-
getScore
public double getScore()
Description copied from interface:ScorerReturns score resulting from algorithm. This should normalize between 0 and 1 by calculating (Scorer.getScore()-Scorer.getMinScore()) / (Scorer.getMaxScore()-Scorer.getMinScore()).
-
getQuery
public S getQuery()
Description copied from interface:PairwiseSequenceScorerReturns the first sequence of the pair.- Specified by:
getQueryin interfacePairwiseSequenceScorer<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound>- Returns:
- the first sequence of the pair
-
getTarget
public S getTarget()
Description copied from interface:PairwiseSequenceScorerReturns the second sequence of the pair.- Specified by:
getTargetin interfacePairwiseSequenceScorer<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,C extends org.biojava.nbio.core.sequence.template.Compound>- Returns:
- the second sequence of the pair
-
-