com.compomics.util.experiment.biology
Class Enzyme

java.lang.Object
  extended by com.compomics.util.experiment.personalization.ExperimentObject
      extended by com.compomics.util.experiment.biology.Enzyme
All Implemented Interfaces:
Serializable, Cloneable

public class Enzyme
extends ExperimentObject

This class models an enzyme.

Author:
Marc Vaudel
See Also:
Serialized Form

Constructor Summary
Enzyme(int id, String name, String aminoAcidBefore, String restrictionBefore, String aminoAcidAfter, String restrictionAfter)
          Constructor for an Enzyme.
 
Method Summary
 ArrayList<String> digest(String sequence, int nMissedCleavages, int nMin, int nMax)
          Digests a protein sequence in a list of expected peptide sequences.
 boolean enzymeCleaves()
          Returns a boolean indicating whether a cleavage site was implemented for this enzyme.
 boolean equals(Enzyme otherEnzyme)
          Returns true of the two enzymes are identical.
 ArrayList<Character> getAminoAcidAfter()
          Getter for the amino acids potentially following the cleavage.
 ArrayList<Character> getAminoAcidBefore()
          Getter for the amino acids potentially preceding the cleavage.
 int getId()
          Get the enzyme id.
 String getName()
          Get the enzyme name.
 int getNmissedCleavages(String sequence)
          Returns the number of missed cleavages in an amino acid sequence.
 ArrayList<Character> getRestrictionAfter()
          Getter for the amino acids restricting when following the cleavage.
 ArrayList<Character> getRestrictionBefore()
          Getter for the amino acids restricting when preceding the cleavage.
 String getXTandemFormat()
          Get the X!Tandem enzyme format.
 boolean isCleavageSite(String aaBefore, String aaAfter)
          Returns a boolean indicating whether the given amino acids represent a cleavage site.
 
Methods inherited from class com.compomics.util.experiment.personalization.ExperimentObject
addUrParam, getParameterKey, getUrParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Enzyme

public Enzyme(int id,
              String name,
              String aminoAcidBefore,
              String restrictionBefore,
              String aminoAcidAfter,
              String restrictionAfter)
Constructor for an Enzyme.

Parameters:
id - the enzyme id which should be OMSSA compatible.
name - the name of the enzyme
aminoAcidBefore - the amino-acids which can be found before the cleavage
restrictionBefore - the amino-acids which should not be found before the cleavage
aminoAcidAfter - the amino-acids which should be found after the cleavage
restrictionAfter - the amino-acids which should not be found after the cleavage
Method Detail

getName

public String getName()
Get the enzyme name.

Returns:
The enzyme name as String

getId

public int getId()
Get the enzyme id.

Returns:
The enzyme number

getXTandemFormat

public String getXTandemFormat()
Get the X!Tandem enzyme format.

Returns:
The enzyme X!Tandem format as String

getAminoAcidAfter

public ArrayList<Character> getAminoAcidAfter()
Getter for the amino acids potentially following the cleavage.

Returns:
the amino acids potentially following the cleavage

getAminoAcidBefore

public ArrayList<Character> getAminoAcidBefore()
Getter for the amino acids potentially preceding the cleavage.

Returns:
the amino acids potentially preceding the cleavage

getRestrictionAfter

public ArrayList<Character> getRestrictionAfter()
Getter for the amino acids restricting when following the cleavage.

Returns:
the amino acids restricting when following the cleavage

getRestrictionBefore

public ArrayList<Character> getRestrictionBefore()
Getter for the amino acids restricting when preceding the cleavage.

Returns:
the amino acids restricting when preceding the cleavage

enzymeCleaves

public boolean enzymeCleaves()
Returns a boolean indicating whether a cleavage site was implemented for this enzyme.

Returns:
a boolean indicating whether a cleavage site was implemented for this enzyme

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

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 ArrayList<String> digest(String sequence,
                                int nMissedCleavages,
                                int nMin,
                                int 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
nMax - the maximal size for a peptide
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


Copyright © 2013. All Rights Reserved.