Class Enzyme
java.lang.Object
com.compomics.util.experiment.personalization.ExperimentObject
com.compomics.util.experiment.biology.enzymes.Enzyme
- All Implemented Interfaces:
Serializable
This class models an enzyme.
- Author:
- Marc Vaudel, Harald Barsnes
- See Also:
-
Field Summary
Fields inherited from class com.compomics.util.experiment.personalization.ExperimentObject
NO_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAminoAcidAfter(Character aminoAcid) Adds an amino acid to the list of allowed amino acids after the cleavage site.voidaddAminoAcidBefore(Character aminoAcid) Adds an amino acid to the list of allowed amino acids before the cleavage site.voidaddRestrictionAfter(Character aminoAcid) Adds an amino acid to the list of forbidden amino acids after the cleavage site.voidaddRestrictionBefore(Character aminoAcid) Adds an amino acid to the list of forbidden amino acids before the cleavage site.Digests a protein sequence in a list of expected peptide sequences.Digests a protein sequence in a list of expected peptide sequences.booleanReturns true of the two enzymes are identical.Getter for the amino acids potentially following the cleavage.Getter for the amino acids potentially preceding the cleavage.Returns the CV term associated with this enzyme.Returns the description of the cleavage of this enzyme.getName()Get the enzyme name.intgetNmissedCleavages(String sequence) Returns the number of missed cleavages in an amino acid sequence.Getter for the amino acids restricting when following the cleavage.Getter for the amino acids restricting when preceding the cleavage.booleanisCleavageSite(char aaBefore, char aaAfter) Returns a boolean indicating whether the given amino acids represent a cleavage site.booleanisCleavageSite(String aaBefore, String aaAfter) Returns a boolean indicating whether the given amino acids represent a cleavage site.booleanisCleavageSiteNoCombination(Character aaBefore, Character aaAfter) Returns a boolean indicating whether the given amino acids represent a cleavage site.voidSets 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
-
Enzyme
public Enzyme()Empty default constructor. -
Enzyme
Constructor for an Enzyme.- Parameters:
name- the name of the enzyme
-
-
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
-