Class ProteinUtils
java.lang.Object
com.compomics.util.experiment.identification.utils.ProteinUtils
public class ProteinUtils extends Object
Convenience functions for the handling of proteins.
- Author:
- Marc Vaudel
-
Constructor Summary
Constructors Constructor Description ProteinUtils()
Empty default constructor. -
Method Summary
Modifier and Type Method Description static double
computeMolecularWeight(String sequence)
Returns the protein's molecular weight.static int
getNCleavageSites(String sequence, ArrayList<Enzyme> enzymes)
Returns the number of cleavage sites.static int[]
getObservableAminoAcids(String sequence, ArrayList<Enzyme> enzymes, double pepMaxLength)
Returns the observable amino acids in the sequence when using the given enzymes with the given maximal peptide length.static int
getObservableLength(String sequence, ArrayList<Enzyme> enzymes, double pepMaxLength)
Returns the number of observable amino acids in the sequence.static boolean
isDecoy(String accession, FastaParameters fastaParameters)
Returns a boolean indicating whether the given accession corresponds to a decoy sequence according to the given FASTA parameters.static boolean
isDecoy(String accession, SequenceProvider sequenceProvider)
Returns a boolean indicating whether the given accession corresponds to a decoy sequence according to the given sequence provider.
-
Constructor Details
-
ProteinUtils
public ProteinUtils()Empty default constructor.
-
-
Method Details
-
isDecoy
Returns a boolean indicating whether the given accession corresponds to a decoy sequence according to the given FASTA parameters.- Parameters:
accession
- the protein accessionfastaParameters
- the FASTA parameters- Returns:
- a boolean indicating whether the given accession corresponds to a decoy sequence
-
isDecoy
Returns a boolean indicating whether the given accession corresponds to a decoy sequence according to the given sequence provider.- Parameters:
accession
- the protein accessionsequenceProvider
- the sequence provider- Returns:
- a boolean indicating whether the given accession corresponds to a decoy sequence
-
getObservableAminoAcids
public static int[] getObservableAminoAcids(String sequence, ArrayList<Enzyme> enzymes, double pepMaxLength)Returns the observable amino acids in the sequence when using the given enzymes with the given maximal peptide length.- Parameters:
sequence
- the protein sequenceenzymes
- the enzymes to usepepMaxLength
- the max peptide length- Returns:
- the number of observable amino acids of the sequence
-
getObservableLength
public static int getObservableLength(String sequence, ArrayList<Enzyme> enzymes, double pepMaxLength)Returns the number of observable amino acids in the sequence.- Parameters:
sequence
- the protein sequenceenzymes
- the enzymes to usepepMaxLength
- the max peptide length- Returns:
- the number of observable amino acids of the sequence
-
getNCleavageSites
Returns the number of cleavage sites.- Parameters:
sequence
- the protein sequenceenzymes
- the enzymes to use- Returns:
- the number of possible peptides
-
computeMolecularWeight
Returns the protein's molecular weight.- Parameters:
sequence
- the protein sequence- Returns:
- the protein's molecular weight in kDa
-