Class DualEnzyme

java.lang.Object
com.compomics.util.protein.Enzyme
com.compomics.util.protein.DualEnzyme
All Implemented Interfaces:
Cloneable

public class DualEnzyme
extends Enzyme
This class implements an enzyme with a dual specificity; the N-terminus of a resultant peptide will have certain residue, the C-terminus will have another, eg. for a C-terminal cutter with N-terminal specificty for 'D' and C-terminal specificity for 'R': (D)XXXXXR; for an N-terminal cutter with N-terminal specificty for 'W' and C-terminal specificity for 'K': WXXXXX(K).
Author:
Lennart Martens
  • Field Details

  • Constructor Details

    • DualEnzyme

      public DualEnzyme()
      Empty default constructor
    • DualEnzyme

      public DualEnzyme​(String aTitle, String aNtermCleavage, String aCtermCleavage, String aRestrict, String aPosition, int aMiscleavages)
      This constructor allows you to specify all the information for this enzyme plus the number of missed cleavages that this instance will allow. Title and restrict can be 'null'.
      Parameters:
      aTitle - String with the title (or name) for this enzyme.
      aNtermCleavage - String composed of the residues after which cleavage will occur at the N-terminus of the resultant peptide (this String will be uppercased).
      aCtermCleavage - String composed of the residues after which cleavage will occur at the C-terminus of the resultant peptide (this String will be uppercased).
      aRestrict - String composed of the residues which inhibit cleavage if present behind any of the cleavable residues (this String will be uppercased).
      aPosition - String which should correspond to "Cterm" or "Nterm" for each position respectively.
      aMiscleavages - int with the number of supported missed cleavages.
    • DualEnzyme

      public DualEnzyme​(String aTitle, String aNtermCleavage, String aCtermCleavage, String aRestrict, String aPosition)
      This constructor allows you to specify all the information for this enzyme. Title and restrict can be 'null'.
      Parameters:
      aTitle - String with the title (or name) for this enzyme.
      aNtermCleavage - String composed of the residues after which cleavage will occur at the N-terminus of the resultant peptide (this String will be uppercased).
      aCtermCleavage - String composed of the residues after which cleavage will occur at the C-terminus of the resultant peptide (this String will be uppercased).
      aRestrict - String composed of the residues which inhibit cleavage if present behind any of the cleavable residues (this String will be uppercased).
      aPosition - String which should correspond to "Cterm" or "Nterm" for each position respectively.
  • Method Details

    • setCleavage

      public void setCleavage​(char[] aCleavage)
      This method allows the caller to specify the cleavable residues.
      Overrides:
      setCleavage in class Enzyme
      Parameters:
      aCleavage - char[] with the cleavable residues (in UPPER CASE!).
    • setCleavage

      public void setCleavage​(String aCleavage)
      This method allows the caller to specify the cleavable residues. They will be read from the String as a continuous summation of characters (i.e: 'RKGH').
      Overrides:
      setCleavage in class Enzyme
      Parameters:
      aCleavage - String with the continuous characters corresponding to the cleavable residues. Note that the String is uppercased.
    • setCleavage

      public void setCleavage​(char[] aCleavage, int aTerminus)
      This method allows the caller to specify the cleavable residues.
      Parameters:
      aCleavage - char[] with the cleavable residues (in UPPER CASE!).
      aTerminus - int with the code for the terminal position in the resultant peptide. Can be 'NTERMINAL' or 'CTERMINAL'.
    • setCleavage

      public void setCleavage​(String aCleavage, int aTerminus)
      This method allows the caller to specify the cleavable residus. They will be read from the String as a continuous summation of characters (i.e: 'RKGH').
      Parameters:
      aCleavage - String with the continuous characters corresponding to the cleavable residues. Note that the String is uppercased.
      aTerminus - int with the code for the terminal position in the resultant peptide. Can be 'NTERMINAL' or 'CTERMINAL'.
    • getCleavage

      public char[] getCleavage​(int aTerminus)
      This method returns the residues that are used for cleavage at the respective locations.
      Parameters:
      aTerminus - int with the code for the terminal position in the resultant peptide. Can be 'NTERMINAL' or 'CTERMINAL'.
      Returns:
      char[] with the cleavable residues for the specified terminus of the resultant peptide.
    • getCleavage

      public char[] getCleavage()
      Simple getter for the cleavable residues of the Enzyme. For a DualEnzyme, it returns [nterms]X[cterms]
      Overrides:
      getCleavage in class Enzyme
      Returns:
      char[] with the cleavable residues, structured as [nterms]X[cterms].
    • clone

      public Object clone()
      Provides a cloned version of this DualEnzyme.
      Overrides:
      clone in class Enzyme
      Returns:
      Enzyme with a clone for this DualEnzyme.
    • toString

      public String toString()
      This method generates a String representation of the DualEnzyme, which is useful for displaying as useful information for the user or during testing/debugging.
      Overrides:
      toString in class Enzyme
      Returns:
      String with a textual description of this Enzyme.
    • toString

      public String toString​(String aPrepend)
      This method generates a String representation of the DualEnzyme, which is useful for displaying as useful information for the user or during testing/debugging. It takes a parameter String that is prepended to each line.
      Overrides:
      toString in class Enzyme
      Parameters:
      aPrepend - String to prepend to each outputted line.
      Returns:
      String with a textual description of this DualEnzyme.
    • oldCleave

      public Protein[] oldCleave​(Protein aProtein)
      This cleave method will process sequence XDYRZ solely into YR peptides.
      Parameters:
      aProtein - Protein instance to cleave.
      Returns:
      Protein[] with the resultant peptides.
    • cleave

      public Protein[] cleave​(Protein aProtein)
      This method is the focus of the Enzyme instance. It can perform an in-silico digest of a Protein sequence according to the specifications detailed in the construction or via the setters.
      Overrides:
      cleave in class Enzyme
      Parameters:
      aProtein - Protein instance to cleave.
      Returns:
      Protein[] with the resultant peptides.
    • isEnzymaticProduct

      public int isEnzymaticProduct​(String aParentSequence, int aStart, int aEnd)
      This method reports on the possibility that the presented subsequence (represented by the start and end location in the parent) is the result of enzymatic activity. Returning int values can be checked against public static final vars on this class.
      Overrides:
      isEnzymaticProduct in class Enzyme
      Parameters:
      aParentSequence - String with the parent sequence
      aStart - int with the start of the subsequence relative to the parent (first residue is '1').
      aEnd - int with the end of the subsequence relative to the parent
      Returns:
      int with the coded possibility (1 = Full enzymatic product, 2 = N-terminal half enzymatic product, 3 = C-terminal half enzymatic product and 4 = Entirely not an enzymatic product.
    • main

      public static void main​(String[] args)
      Tests the DualEnzyme by digesting a hardcoded protein.
      Parameters:
      args - the arguments