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
  • Constructor Details

    • Enzyme

      public Enzyme()
      Empty default constructor.
    • Enzyme

      public Enzyme​(String name)
      Constructor for an Enzyme.
      Parameters:
      name - the name of the enzyme
  • Method Details

    • getName

      public String getName()
      Get the enzyme name.
      Returns:
      the enzyme name as String
    • addAminoAcidAfter

      public void addAminoAcidAfter​(Character aminoAcid)
      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

      public HashSet<Character> getAminoAcidAfter()
      Getter for the amino acids potentially following the cleavage. Null if none.
      Returns:
      the amino acids potentially following the cleavage
    • addAminoAcidBefore

      public void addAminoAcidBefore​(Character aminoAcid)
      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

      public HashSet<Character> getAminoAcidBefore()
      Getter for the amino acids potentially preceding the cleavage. Null if none.
      Returns:
      the amino acids potentially preceding the cleavage
    • addRestrictionAfter

      public void addRestrictionAfter​(Character aminoAcid)
      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

      public HashSet<Character> getRestrictionAfter()
      Getter for the amino acids restricting when following the cleavage. Null if none.
      Returns:
      the amino acids restricting when following the cleavage
    • addRestrictionBefore

      public void addRestrictionBefore​(Character aminoAcid)
      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

      public HashSet<Character> getRestrictionBefore()
      Getter for the amino acids restricting when preceding the cleavage. Null if none.
      Returns:
      the amino acids restricting when preceding the cleavage
    • isCleavageSite

      public boolean isCleavageSite​(String aaBefore, String aaAfter)
      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 site
      aaAfter - 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 site
      aaAfter - the amino acid after the cleavage site
      Returns:
      true if the amino acid combination can represent a cleavage site
    • isCleavageSiteNoCombination

      public boolean isCleavageSiteNoCombination​(Character aaBefore, Character aaAfter)
      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 site
      aaAfter - the amino acid after the cleavage site
      Returns:
      true if the amino acid combination can represent a cleavage site
    • getNmissedCleavages

      public int getNmissedCleavages​(String sequence)
      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

      public HashSet<String> digest​(String sequence, int nMissedCleavages, Integer nMin, Integer nMax)
      Digests a protein sequence in a list of expected peptide sequences.
      Parameters:
      sequence - the protein sequence
      nMissedCleavages - the maximum number of missed cleavages
      nMin - 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 sequence
      nMissedCleavages - the maximum number of missed cleavages
      massMin - the minimal mass for a peptide (inclusive)
      massMax - the maximal mass for a peptide (inclusive)
      Returns:
      a list of expected peptide sequences
    • equals

      public boolean equals​(Enzyme otherEnzyme)
      Returns true of the two enzymes are identical.
      Parameters:
      otherEnzyme - the enzyme to compare against.
      Returns:
      true of the two enzymes are identical
    • getDescription

      public String getDescription()
      Returns the description of the cleavage of this enzyme.
      Returns:
      the description of the cleavage of this enzyme
    • getCvTerm

      public CvTerm getCvTerm()
      Returns the CV term associated with this enzyme.
      Returns:
      the CV term associated with this enzyme
    • setCvTerm

      public void setCvTerm​(CvTerm cvTerm)
      Sets the CV term associated with this enzyme.
      Parameters:
      cvTerm - the CV term associated with this enzyme