Class AaOccurrence
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 AaOccurrence()
Empty default constructorAaOccurrence(int[] aaOccurrence)
Constructor. -
Method Summary
-
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 codestartIndex
- the index where to start in the sequenceendIndex
- the index where to start in the sequencepMax
- the maximal value p can have- Returns:
- the sum of the log10 of the share of the given amino acids in the database
-