java.lang.Object
com.compomics.util.experiment.identification.protein_sequences.AaOccurrence

public class AaOccurrence extends Object
This class gathers statistics on the occurrence of amino acids in a fasta file.
Author:
Marc Vaudel
  • Constructor Summary

    Constructors
    Constructor
    Description
    Empty default constructor
    AaOccurrence(int[] aaOccurrence)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    getP(char aa)
    Returns the log10 of the share of the given amino acid in the database.
    double
    getP(char[] aas, int startIndex, int endIndex, double pMax)
    Returns the sum of the log10 of the share of the given amino acids in the database.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AaOccurrence

      public AaOccurrence()
      Empty default constructor
    • AaOccurrence

      public AaOccurrence(int[] aaOccurrence)
      Constructor.
      Parameters:
      aaOccurrence - the occurrence of all amino acids in the database indexed as in the AminoAcid clss.
  • Method Details

    • getP

      public double getP(char aa)
      Returns the log10 of the share of the given amino acid in the database.
      Parameters:
      aa - the amino acid as single letter code
      Returns:
      the log10 of the share of the given amino acid in the database
    • getP

      public double getP(char[] aas, int startIndex, int endIndex, double pMax)
      Returns the sum of the log10 of the share of the given amino acids in the database. Start and end indexes are 0 based, start is inclusive and end exclusive.
      Parameters:
      aas - the amino acids as char array of the single letter code
      startIndex - the index where to start in the sequence
      endIndex - the index where to start in the sequence
      pMax - the maximal value p can have
      Returns:
      the sum of the log10 of the share of the given amino acids in the database