Package org.biojava.nbio.alignment
Class SubstitutionMatrixScorer<S extends Sequence<C>,C extends 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 Sequence<C>,C extends 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
ConstructorDescriptionSubstitutionMatrixScorer
(SequencePair<S, C> pair, SubstitutionMatrix<C> matrix) -
Method Summary
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
-
Constructor Details
-
SubstitutionMatrixScorer
-
-
Method Details
-
getMaxScore
public double getMaxScore()Description copied from interface:Scorer
Returns maximum possible score.- Specified by:
getMaxScore
in interfaceScorer
- Returns:
- The maximum score the query could be assigned when aligned against any target sequence.
-
getMinScore
public double getMinScore()Description copied from interface:Scorer
Returns minimum possible score.- Specified by:
getMinScore
in interfaceScorer
- Returns:
- The minimum score the query could be assigned when aligned against any target sequence.
-
getScore
public double getScore()Description copied from interface:Scorer
Returns score resulting from algorithm. This should normalize between 0 and 1 by calculating (Scorer.getScore()
-Scorer.getMinScore()
) / (Scorer.getMaxScore()
-Scorer.getMinScore()
). -
getQuery
Description copied from interface:PairwiseSequenceScorer
Returns the first sequence of the pair. -
getTarget
Description copied from interface:PairwiseSequenceScorer
Returns the second sequence of the pair.
-