Class SubstitutionMatrixScorer<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>

  • 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 Detail

      • SubstitutionMatrixScorer

        public SubstitutionMatrixScorer​(org.biojava.nbio.core.alignment.template.SequencePair<S,​C> pair,
                                        org.biojava.nbio.core.alignment.template.SubstitutionMatrix<C> matrix)
    • Method Detail

      • getMaxScore

        public double getMaxScore()
        Description copied from interface: Scorer
        Returns maximum possible score.
        Specified by:
        getMaxScore in interface Scorer
        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 interface Scorer
        Returns:
        The minimum score the query could be assigned when aligned against any target sequence.
      • getQuery

        public S getQuery()
        Description copied from interface: PairwiseSequenceScorer
        Returns the first sequence of the pair.
        Specified by:
        getQuery in interface PairwiseSequenceScorer<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: PairwiseSequenceScorer
        Returns the second sequence of the pair.
        Specified by:
        getTarget in interface PairwiseSequenceScorer<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