Class ProteinIteratorUtils
java.lang.Object
com.compomics.util.experiment.identification.protein_sequences.digestion.ProteinIteratorUtils
This class contains utilities used during the iteration of protein sequences.
- Author:
- Marc Vaudel
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEmpty default constructorProteinIteratorUtils(ArrayList<String> fixedModifications, Integer maxX) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiongetCtermModification(PeptideDraft peptideDraft, String proteinSequence, int indexOnProtein) Returns the c-terminal modification for the given peptide draft.getFixedModificationAtAa(char aa) Returns the fixed modification that can be found at the given amino acid.intReturns the maximal number of Xs to account for in a sequence.doubleReturns the minimal mass to consider for a c-terminus.doublegetModificationMass(String modificationName) Returns the mass corresponding to a given modification.getModificationPattern(String modificationName) Returns the modification pattern that is targeted by the given modification.getNtermModification(boolean proteinNTerm, char nTermAaChar, String proteinSequence) Returns the N-term modification for the given amino acid.getPeptideFromProtein(char[] proteinSequence, int indexOnProtein, double massMin, double massMax) Returns a peptide from the given sequence.getPeptideFromProtein(char[] peptideSequence, String proteinSequence, int indexOnProtein, double massMin, double massMax, BoxedObject<Boolean> smallMass) Returns a peptide from the given sequence on the given protein.getPeptideFromProtein(char[] peptideSequence, String proteinSequence, int indexOnProtein, Double massMin, Double massMax) Returns a peptide from the given sequence on the given protein.
-
Field Details
-
WATER_MASS
public static final double WATER_MASSThe mass of water (H2O).
-
-
Constructor Details
-
ProteinIteratorUtils
public ProteinIteratorUtils()Empty default constructor -
ProteinIteratorUtils
Constructor.- Parameters:
fixedModifications- a list of fixed modifications to consider when iterating the protein sequences.maxX- The maximal number of Xs allowed in a sequence to derive the possible peptides
-
-
Method Details
-
getNtermModification
Returns the N-term modification for the given amino acid. Null if no modification is found.- Parameters:
proteinNTerm- boolean indicating whether the amino acid is at the protein N-terminusnTermAaChar- the amino acid as characterproteinSequence- the protein sequence- Returns:
- the N-term modification for the given amino acid.
-
getCtermModification
public String getCtermModification(PeptideDraft peptideDraft, String proteinSequence, int indexOnProtein) Returns the c-terminal modification for the given peptide draft.- Parameters:
peptideDraft- the peptide draft of interestproteinSequence- the protein sequenceindexOnProtein- the index of the peptide draft on the protein- Returns:
- the c-terminal modification for the given peptide draft
-
getModificationMass
Returns the mass corresponding to a given modification.- Parameters:
modificationName- the name of the modification- Returns:
- the mass of the modification
-
getFixedModificationAtAa
Returns the fixed modification that can be found at the given amino acid. Null if none.- Parameters:
aa- the one letter code of the amino acid- Returns:
- the fixed modification that can be found at the given amino acid
-
getModificationPattern
Returns the modification pattern that is targeted by the given modification. Null if no pattern longer than one is targeted.- Parameters:
modificationName- the name of the modification- Returns:
- the modification pattern that is targeted
-
getMaxXsInSequence
public int getMaxXsInSequence()Returns the maximal number of Xs to account for in a sequence.- Returns:
- the maximal number of Xs to account for in a sequence
-
getMinCtermMass
public double getMinCtermMass()Returns the minimal mass to consider for a c-terminus.- Returns:
- the minimal mass to consider for a c-terminus
-
getPeptideFromProtein
public ExtendedPeptide getPeptideFromProtein(char[] proteinSequence, int indexOnProtein, double massMin, double massMax) Returns a peptide from the given sequence. The sequence should not contain ambiguous amino acids. Peptides are filtered according to the given masses. Filters are ignored if null.- Parameters:
proteinSequence- the protein sequence where this peptide was foundindexOnProtein- the index on the proteinmassMin- the minimal massmassMax- the maximal mass- Returns:
- a peptide from the given sequence
-
getPeptideFromProtein
public ExtendedPeptide getPeptideFromProtein(char[] peptideSequence, String proteinSequence, int indexOnProtein, Double massMin, Double massMax) Returns a peptide from the given sequence on the given protein. The sequence should not contain ambiguous amino acids. Peptides are filtered according to the given masses. Filters are ignored if null.- Parameters:
peptideSequence- the peptide sequenceproteinSequence- the protein sequence where this peptide was foundindexOnProtein- the index on the proteinmassMin- the minimal massmassMax- the maximal mass- Returns:
- a peptide from the given sequence
-
getPeptideFromProtein
public ExtendedPeptide getPeptideFromProtein(char[] peptideSequence, String proteinSequence, int indexOnProtein, double massMin, double massMax, BoxedObject<Boolean> smallMass) Returns a peptide from the given sequence on the given protein. The sequence should not contain ambiguous amino acids. Peptides are filtered according to the given masses. Filters are ignored if null.- Parameters:
peptideSequence- the peptide sequenceproteinSequence- the protein sequence where this peptide was foundindexOnProtein- the index on the proteinmassMin- the minimal massmassMax- the maximal masssmallMass- an encapsulated boolean indicating whether the peptide passed the maximal mass filter- Returns:
- a peptide from the given sequence
-