Package com.compomics.util.protein
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 Summary
Fields Modifier and Type Field Description 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
Constructors Constructor Description DualEnzyme()
Empty default constructorDualEnzyme(String aTitle, String aNtermCleavage, String aCtermCleavage, String aRestrict, String aPosition)
This constructor allows you to specify all the information for this enzyme.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. -
Method Summary
Modifier and Type Method Description Protein[]
cleave(Protein aProtein)
This method is the focus of the Enzyme instance.Object
clone()
Provides a cloned version of this DualEnzyme.char[]
getCleavage()
Simple getter for the cleavable residues of the Enzyme.char[]
getCleavage(int aTerminus)
This method returns the residues that are used for cleavage at the respective locations.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.static void
main(String[] args)
Tests the DualEnzyme by digesting a hardcoded protein.Protein[]
oldCleave(Protein aProtein)
This cleave method will process sequence XDYRZ solely into YR peptides.void
setCleavage(char[] aCleavage)
This method allows the caller to specify the cleavable residues.void
setCleavage(char[] aCleavage, int aTerminus)
This method allows the caller to specify the cleavable residues.void
setCleavage(String aCleavage)
This method allows the caller to specify the cleavable residues.void
setCleavage(String aCleavage, int aTerminus)
This method allows the caller to specify the cleavable residus.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.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.Methods inherited from class com.compomics.util.protein.Enzyme
cleave, getMiscleavages, getPosition, getRestrict, getTitle, isEnzymaticProduct, setMiscleavages, setPosition, setRestrict, setRestrict, setTitle
-
Field Details
-
NTERMINAL
public static final int NTERMINALThe code for N-terminal position in the resultant peptide.- See Also:
- Constant Field Values
-
CTERMINAL
public static final int CTERMINALThe code for C-terminal position in the resultant peptide.- See Also:
- Constant Field Values
-
-
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 classEnzyme
- Parameters:
aCleavage
- char[] with the cleavable residues (in UPPER CASE!).
-
setCleavage
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 classEnzyme
- 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
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 classEnzyme
- Returns:
- char[] with the cleavable residues, structured as [nterms]X[cterms].
-
clone
Provides a cloned version of this DualEnzyme. -
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. -
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. It takes a parameter String that is prepended to each line. -
oldCleave
This cleave method will process sequence XDYRZ solely into YR peptides.- Parameters:
aProtein
- Protein instance to cleave.- Returns:
- Protein[] with the resultant peptides.
-
cleave
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. -
isEnzymaticProduct
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 classEnzyme
- Parameters:
aParentSequence
- String with the parent sequenceaStart
- 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
Tests the DualEnzyme by digesting a hardcoded protein.- Parameters:
args
- the arguments
-