com.compomics.util.protein
Class DualEnzyme

java.lang.Object
  extended by com.compomics.util.protein.Enzyme
      extended by com.compomics.util.protein.DualEnzyme
All Implemented Interfaces:
java.lang.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 Summary
static int CTERMINAL
          The code for C-terminal position in the resultant peptide.
static int NTERMINAL
          The code for N-terminal position in the resultant peptide.
 
Fields inherited from class com.compomics.util.protein.Enzyme
C_TERM_ENZYMATIC, CTERM, ENTIRELY_NOT_ENZYMATIC, FULLY_ENZYMATIC, iCleavables, iCleavage, iMiscleavages, iPosition, iRestrict, iRestrictors, iTitle, N_TERM_ENZYMATIC, NTERM
 
Constructor Summary
DualEnzyme(java.lang.String aTitle, java.lang.String aNtermCleavage, java.lang.String aCtermCleavage, java.lang.String aRestrict, java.lang.String aPosition)
          This constructor allows you to specify all the information for this enzyme.
DualEnzyme(java.lang.String aTitle, java.lang.String aNtermCleavage, java.lang.String aCtermCleavage, java.lang.String aRestrict, java.lang.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.
 
Method Summary
 Protein[] cleave(Protein aProtein)
          This method is the focus of the Enzyme instance.
 java.lang.Object clone()
          Provides a cloned version of this DualEnzyme.
 char[] getCleavage()
          Simple getter for the cleavable residus of the Enzyme.
 char[] getCleavage(int aTerminus)
          This method returns the residues that are used for cleavage at the respective locations.
 int isEnzymaticProduct(java.lang.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.
static void main(java.lang.String[] args)
          Tests the DualEnzyme by digesting a hardcoded protein.
 Protein[] oldCleave(Protein aProtein)
          This cleave method will proces sequence XDYRZ solely into YR peptides.
 void setCleavage(char[] aCleavage)
          This method allows the caller to specify the cleavable residus.
 void setCleavage(char[] aCleavage, int aTerminus)
          This method allows the caller to specify the cleavable residus.
 void setCleavage(java.lang.String aCleavage)
          This method allows the caller to specify the cleavable residus.
 void setCleavage(java.lang.String aCleavage, int aTerminus)
          This method allows the caller to specify the cleavable residus.
 java.lang.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.
 java.lang.String toString(java.lang.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.
 
Methods inherited from class com.compomics.util.protein.Enzyme
cleave, getMiscleavages, getPosition, getRestrict, getTitle, isEnzymaticProduct, setMiscleavages, setPosition, setRestrict, setRestrict, setTitle
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NTERMINAL

public static final int NTERMINAL
The code for N-terminal position in the resultant peptide.

See Also:
Constant Field Values

CTERMINAL

public static final int CTERMINAL
The code for C-terminal position in the resultant peptide.

See Also:
Constant Field Values
Constructor Detail

DualEnzyme

public DualEnzyme(java.lang.String aTitle,
                  java.lang.String aNtermCleavage,
                  java.lang.String aCtermCleavage,
                  java.lang.String aRestrict,
                  java.lang.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 comosed of the residus which inhibit cleavage if present behind any of the cleavable residus (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(java.lang.String aTitle,
                  java.lang.String aNtermCleavage,
                  java.lang.String aCtermCleavage,
                  java.lang.String aRestrict,
                  java.lang.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 comosed of the residus which inhibit cleavage if present behind any of the cleavable residus (this String will be uppercased).
aPosition - String which should correspond to "Cterm" or "Nterm" for each position respectively.
Method Detail

setCleavage

public void setCleavage(char[] aCleavage)
This method allows the caller to specify the cleavable residus.

Overrides:
setCleavage in class Enzyme
Parameters:
aCleavage - char[] with the cleavable residus (in UPPER CASE!).

setCleavage

public void setCleavage(java.lang.String aCleavage)
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').

Overrides:
setCleavage in class Enzyme
Parameters:
aCleavage - String with the continuous characters corresponding to the cleavable residus. Note that the String is uppercased.

setCleavage

public void setCleavage(char[] aCleavage,
                        int aTerminus)
This method allows the caller to specify the cleavable residus.

Parameters:
aCleavage - char[] with the cleavable residus (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(java.lang.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 residus. 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 residus of the Enzyme. For a DualEnzyme, it returns [nterms]X[cterms]

Overrides:
getCleavage in class Enzyme
Returns:
char[] with the cleavable residus, structured as [nterms]X[cterms].

clone

public java.lang.Object clone()
Provides a cloned version of this DualEnzyme.

Overrides:
clone in class Enzyme
Returns:
Enzyme with a clone for this DualEnzyme.

toString

public java.lang.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 java.lang.String toString(java.lang.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 proces 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(java.lang.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(java.lang.String[] args)
Tests the DualEnzyme by digesting a hardcoded protein.

Parameters:
args -


Copyright © 2013. All Rights Reserved.