Documentation of 'edu.rit.compbio.seq.DefaultAlignmentStats' Java class
DefaultAlignmentStats
edu.rit.compbio.seq

Class DefaultAlignmentStats

  • All Implemented Interfaces:
    AlignmentStats


    public class DefaultAlignmentStats
    extends java.lang.Object
    implements AlignmentStats
    Class DefaultAlignmentStats provides an object that computes statistics of an Alignment. Methods are provided to compute the raw score, the bit score, and the E-value. The formulas for these statistics assume that the alignment:
    • is for two protein sequences,
    • was calculated by the Smith-Waterman local alignment algorithm,
    • using the BLOSUM-62 protein substitution matrix,
    • using a gap existence penalty of −11 and a gap extension penalty of −1,
    • matching a query sequence against a database of subject sequences, where the sum of the subject sequence lengths is supplied as a constructor parameter.

    The formulas for the bit score and E-value are:

    S' = (λ S − ln K)/(ln 2)
    E = K m n exp(−λ S)
    where S is the raw score, m is the query sequence length, n is the total subject sequence length, and the parameters are K = 0.035, λ = 0.252.

    These formulas were taken from:

    • Constructor Summary

      Constructors 
      Constructor and Description
      DefaultAlignmentStats(long n)
      Construct a new default alignment statistics object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double bitScore(Alignment alignment)
      Returns the bit score for the given alignment.
      double eValue(Alignment alignment)
      Returns the E-value (expect value) for the given alignment.
      void print(java.io.PrintStream out)
      Print information about this alignment statistics object on the given print stream.
      double rawScore(Alignment alignment)
      Returns the raw score for the given alignment.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultAlignmentStats

        public DefaultAlignmentStats(long n)
        Construct a new default alignment statistics object.
        Parameters:
        n - Sum of the lengths of the subject sequences in the database.
    • Method Detail

      • rawScore

        public double rawScore(Alignment alignment)
        Returns the raw score for the given alignment. A larger raw score signifies a greater degree of similarity between the query sequence and subject sequence that were aligned.
        Specified by:
        rawScore in interface AlignmentStats
        Parameters:
        alignment - Alignment.
        Returns:
        Raw score.
      • bitScore

        public double bitScore(Alignment alignment)
        Returns the bit score for the given alignment. A larger bit score signifies a greater degree of similarity between the query sequence and subject sequence that were aligned.

        The bit score is the raw score normalized to units of "bits." Bit scores for different alignment procedures may be compared, whereas raw (unnormalized) scores for different alignment procedures may not be compared.

        Specified by:
        bitScore in interface AlignmentStats
        Parameters:
        alignment - Alignment.
        Returns:
        Bit score.
      • eValue

        public double eValue(Alignment alignment)
        Returns the E-value (expect value) for the given alignment. A smaller E-value signifies a more statistically significant degree of similarity between the query sequence and subject sequence that were aligned.

        The E-value is the expected number of alignments with a score greater than or equal to the alignment's score when a randomly-chosen query of the same length as the query that produced the alignment is matched against the database.

        Specified by:
        eValue in interface AlignmentStats
        Parameters:
        alignment - Alignment.
        Returns:
        Bit score.
      • print

        public void print(java.io.PrintStream out)
        Print information about this alignment statistics object on the given print stream.
        Specified by:
        print in interface AlignmentStats
        Parameters:
        out - Print stream.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.