Package org.biojava.nbio.alignment
Class FractionalIdentityScorer<S extends Sequence<C>,C extends Compound>
java.lang.Object
org.biojava.nbio.alignment.template.AbstractScorer
org.biojava.nbio.alignment.FractionalIdentityScorer<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:
FractionalIdentityInProfileScorer
public class FractionalIdentityScorer<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 identical
Compound
s.- Author:
- Mark Chapman
-
Constructor Summary
ConstructorDescriptionFractionalIdentityScorer
(PairwiseSequenceAligner<S, C> aligner) Creates a fractional identity scorer for a pair of sequences aligned by the given pairwise sequence aligner.FractionalIdentityScorer
(SequencePair<S, C> pair) Creates a fractional identity 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
-
FractionalIdentityScorer
Creates a fractional identity scorer for a pair of sequences aligned by the given pairwise sequence aligner.- Parameters:
aligner
- a pairwise sequence aligner
-
FractionalIdentityScorer
Creates a fractional identity 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()
).
-