Class Enzyme
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.biology.enzymes.Enzyme
- All Implemented Interfaces:
Serializable
public class Enzyme extends ExperimentObject
This class models an enzyme.
- Author:
- Marc Vaudel, Harald Barsnes
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
addAminoAcidAfter(Character aminoAcid)
Adds an amino acid to the list of allowed amino acids after the cleavage site.void
addAminoAcidBefore(Character aminoAcid)
Adds an amino acid to the list of allowed amino acids before the cleavage site.void
addRestrictionAfter(Character aminoAcid)
Adds an amino acid to the list of forbidden amino acids after the cleavage site.void
addRestrictionBefore(Character aminoAcid)
Adds an amino acid to the list of forbidden amino acids before the cleavage site.HashSet<String>
digest(String sequence, int nMissedCleavages, Double massMin, Double massMax)
Digests a protein sequence in a list of expected peptide sequences.HashSet<String>
digest(String sequence, int nMissedCleavages, Integer nMin, Integer nMax)
Digests a protein sequence in a list of expected peptide sequences.boolean
equals(Enzyme otherEnzyme)
Returns true of the two enzymes are identical.HashSet<Character>
getAminoAcidAfter()
Getter for the amino acids potentially following the cleavage.HashSet<Character>
getAminoAcidBefore()
Getter for the amino acids potentially preceding the cleavage.CvTerm
getCvTerm()
Returns the CV term associated with this enzyme.String
getDescription()
Returns the description of the cleavage of this enzyme.String
getName()
Get the enzyme name.int
getNmissedCleavages(String sequence)
Returns the number of missed cleavages in an amino acid sequence.HashSet<Character>
getRestrictionAfter()
Getter for the amino acids restricting when following the cleavage.HashSet<Character>
getRestrictionBefore()
Getter for the amino acids restricting when preceding the cleavage.boolean
isCleavageSite(char aaBefore, char aaAfter)
Returns a boolean indicating whether the given amino acids represent a cleavage site.boolean
isCleavageSite(String aaBefore, String aaAfter)
Returns a boolean indicating whether the given amino acids represent a cleavage site.boolean
isCleavageSiteNoCombination(Character aaBefore, Character aaAfter)
Returns a boolean indicating whether the given amino acids represent a cleavage site.void
setCvTerm(CvTerm cvTerm)
Sets the CV term associated with this enzyme.Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, asLong, clearParametersMap, getId, getUrParam, getUrParams, removeUrParam, setId, setUrParams
-
Constructor Details
-
Method Details
-
getName
Get the enzyme name.- Returns:
- the enzyme name as String
-
addAminoAcidAfter
Adds an amino acid to the list of allowed amino acids after the cleavage site.- Parameters:
aminoAcid
- an amino acid represented by its single amino acid code.
-
getAminoAcidAfter
Getter for the amino acids potentially following the cleavage. Null if none.- Returns:
- the amino acids potentially following the cleavage
-
addAminoAcidBefore
Adds an amino acid to the list of allowed amino acids before the cleavage site.- Parameters:
aminoAcid
- an amino acid represented by its single amino acid code.
-
getAminoAcidBefore
Getter for the amino acids potentially preceding the cleavage. Null if none.- Returns:
- the amino acids potentially preceding the cleavage
-
addRestrictionAfter
Adds an amino acid to the list of forbidden amino acids after the cleavage site.- Parameters:
aminoAcid
- an amino acid represented by its single amino acid code.
-
getRestrictionAfter
Getter for the amino acids restricting when following the cleavage. Null if none.- Returns:
- the amino acids restricting when following the cleavage
-
addRestrictionBefore
Adds an amino acid to the list of forbidden amino acids before the cleavage site.- Parameters:
aminoAcid
- an amino acid represented by its single amino acid code.
-
getRestrictionBefore
Getter for the amino acids restricting when preceding the cleavage. Null if none.- Returns:
- the amino acids restricting when preceding the cleavage
-
isCleavageSite
Returns a boolean indicating whether the given amino acids represent a cleavage site. Trypsin example: (D, E) returns false (R, D) returns true Note: returns false if no cleavage site is implemented.- Parameters:
aaBefore
- the amino acid before the cleavage siteaaAfter
- the amino acid after the cleavage site- Returns:
- true if the amino acid combination can represent a cleavage site
-
isCleavageSite
public boolean isCleavageSite(char aaBefore, char aaAfter)Returns a boolean indicating whether the given amino acids represent a cleavage site. Amino acid combinations are extended to find possible restrictions or cleavage sites. Trypsin example: (D, E) returns false (R, D) returns true Note: returns false if no cleavage site is implemented.- Parameters:
aaBefore
- the amino acid before the cleavage siteaaAfter
- the amino acid after the cleavage site- Returns:
- true if the amino acid combination can represent a cleavage site
-
isCleavageSiteNoCombination
Returns a boolean indicating whether the given amino acids represent a cleavage site. This method does not support amino acid combinations. Trypsin example: (D, E) returns false (R, D) returns true Note: returns false if no cleavage site is implemented.- Parameters:
aaBefore
- the amino acid before the cleavage siteaaAfter
- the amino acid after the cleavage site- Returns:
- true if the amino acid combination can represent a cleavage site
-
getNmissedCleavages
Returns the number of missed cleavages in an amino acid sequence.- Parameters:
sequence
- the amino acid sequence as a string.- Returns:
- the number of missed cleavages
-
digest
Digests a protein sequence in a list of expected peptide sequences.- Parameters:
sequence
- the protein sequencenMissedCleavages
- the maximum number of missed cleavagesnMin
- the minimal size for a peptide (inclusive, ignored if null)nMax
- the maximal size for a peptide (inclusive, ignored if null)- Returns:
- a list of expected peptide sequences
-
digest
public HashSet<String> digest(String sequence, int nMissedCleavages, Double massMin, Double massMax)Digests a protein sequence in a list of expected peptide sequences.- Parameters:
sequence
- the protein sequencenMissedCleavages
- the maximum number of missed cleavagesmassMin
- the minimal mass for a peptide (inclusive)massMax
- the maximal mass for a peptide (inclusive)- Returns:
- a list of expected peptide sequences
-
equals
Returns true of the two enzymes are identical.- Parameters:
otherEnzyme
- the enzyme to compare against.- Returns:
- true of the two enzymes are identical
-
getDescription
Returns the description of the cleavage of this enzyme.- Returns:
- the description of the cleavage of this enzyme
-
getCvTerm
Returns the CV term associated with this enzyme.- Returns:
- the CV term associated with this enzyme
-
setCvTerm
Sets the CV term associated with this enzyme.- Parameters:
cvTerm
- the CV term associated with this enzyme
-