Package org.biojava.nbio.alignment
Class FractionalSimilarityScorer<S extends Sequence<C>,C extends Compound>
java.lang.Object
org.biojava.nbio.alignment.template.AbstractScorer
org.biojava.nbio.alignment.FractionalSimilarityScorer<S,C>
- Type Parameters:
S
- eachSequence
of the alignment pair is of type SC
- each element of anAlignedSequence
is aCompound
of type C
- All Implemented Interfaces:
PairwiseSequenceScorer<S,
,C> Scorer
- Direct Known Subclasses:
FractionalSimilarityInProfileScorer
public class FractionalSimilarityScorer<S extends Sequence<C>,C extends Compound>
extends AbstractScorer
implements PairwiseSequenceScorer<S,C>
Implements an algorithm which computes a score for a sequence alignment pair. The reported score is the number of
alignment columns which have similar
Compound
s.- Author:
- Mark Chapman
-
Constructor Summary
ConstructorDescriptionFractionalSimilarityScorer
(PairwiseSequenceAligner<S, C> aligner) Creates a fractional similarity scorer for a pair of sequences aligned by the given pairwise sequence aligner.FractionalSimilarityScorer
(SequencePair<S, C> pair) Creates a fractional similarity scorer for an aligned pair of sequences. -
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
-
FractionalSimilarityScorer
Creates a fractional similarity scorer for a pair of sequences aligned by the given pairwise sequence aligner.- Parameters:
aligner
- a pairwise sequence aligner
-
FractionalSimilarityScorer
Creates a fractional similarity scorer for an aligned pair of sequences.- Parameters:
pair
- an aligned pair of sequences
-
-
Method Details
-
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. -
getMaxScore
public double getMaxScore()Description copied from interface:Scorer
Returns maximum possible score.- Specified by:
getMaxScore
in interfaceScorer
- Returns:
- maximum possible score
-
getMinScore
public double getMinScore()Description copied from interface:Scorer
Returns minimum possible score.- Specified by:
getMinScore
in interfaceScorer
- Returns:
- minimum possible score
-
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()
).
-