org.biojava.bio.proteomics
Class ProteaseManager

java.lang.Object
  extended byorg.biojava.bio.proteomics.ProteaseManager

public final class ProteaseManager
extends java.lang.Object

Registry and utility methods for Proteases.

Author:
Mark Schreiber

Field Summary
static java.lang.String ARG_C
           
static java.lang.String ASP_N
           
static java.lang.String CHYMOTRYP
           
static java.lang.String CNBr
           
static java.lang.String GLU_C_BICARB
           
static java.lang.String GLU_C_PHOS
           
static java.lang.String LYS_C
           
static java.lang.String TRYPSIN
           
 
Constructor Summary
ProteaseManager()
           
 
Method Summary
static Protease createProtease(java.lang.String cleaveRes, boolean endoProtease, java.lang.String name)
           
static Protease createProtease(java.lang.String cleaveRes, boolean endoProtease, java.lang.String notCleaveRes, java.lang.String name)
           
static Protease createProtease(SymbolList cleaveRes, boolean endoProtease, java.lang.String name)
           
static Protease createProtease(SymbolList cleaveRes, boolean endoProtease, SymbolList notCleaveRes, java.lang.String name)
          Creates and registers a new Protease.
static java.util.Set getAllProteases()
           
static Protease getArg_C()
           
static Protease getAsp_N()
           
static Protease getChymotrypsin()
           
static Protease getCNBr()
           
static Protease getGlu_C_bicarbonate()
           
static Protease getGlu_C_phosphate()
           
static ProteaseManager getInstance()
           
static Protease getLys_C()
           
static java.util.Set getNames()
           
static Protease getProteaseByName(java.lang.String proteaseName)
          Gets a Protease instance by name.
static Protease getTrypsin()
           
static boolean registered(java.lang.String proteaseName)
          Has a Protease been registered with that name?
static void registerProtease(Protease prot)
          Registers a protease and ensures its flyweight status
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRYPSIN

public static final java.lang.String TRYPSIN
See Also:
Constant Field Values

LYS_C

public static final java.lang.String LYS_C
See Also:
Constant Field Values

ARG_C

public static final java.lang.String ARG_C
See Also:
Constant Field Values

ASP_N

public static final java.lang.String ASP_N
See Also:
Constant Field Values

GLU_C_BICARB

public static final java.lang.String GLU_C_BICARB
See Also:
Constant Field Values

GLU_C_PHOS

public static final java.lang.String GLU_C_PHOS
See Also:
Constant Field Values

CHYMOTRYP

public static final java.lang.String CHYMOTRYP
See Also:
Constant Field Values

CNBr

public static final java.lang.String CNBr
See Also:
Constant Field Values
Constructor Detail

ProteaseManager

public ProteaseManager()
Method Detail

createProtease

public static Protease createProtease(SymbolList cleaveRes,
                                      boolean endoProtease,
                                      SymbolList notCleaveRes,
                                      java.lang.String name)
                               throws IllegalSymbolException,
                                      BioException
Creates and registers a new Protease. In future the Protease can be recovered using the getProteaseByName() method.

Parameters:
cleaveRes - the cleavege residues
endoProtease - is it an endo protease?
notCleaveRes - the exceptions to the cleavage residues
name - the name of the Protease
Returns:
a reference to the new Protease
Throws:
IllegalSymbolException - if the cleaveRes or notCleaveRes are not from the PROTEIN alphabet
BioException - if a Protease with the same name already exists.

createProtease

public static Protease createProtease(SymbolList cleaveRes,
                                      boolean endoProtease,
                                      java.lang.String name)
                               throws IllegalSymbolException,
                                      BioException
Throws:
IllegalSymbolException
BioException

createProtease

public static Protease createProtease(java.lang.String cleaveRes,
                                      boolean endoProtease,
                                      java.lang.String notCleaveRes,
                                      java.lang.String name)
                               throws BioException,
                                      IllegalSymbolException
Throws:
BioException
IllegalSymbolException

createProtease

public static Protease createProtease(java.lang.String cleaveRes,
                                      boolean endoProtease,
                                      java.lang.String name)
                               throws BioException,
                                      IllegalSymbolException
Throws:
BioException
IllegalSymbolException

registerProtease

public static void registerProtease(Protease prot)
                             throws BioException
Registers a protease and ensures its flyweight status

Parameters:
prot - the Protease to register
Throws:
BioException - if a Protease with the same name is already registered.

getProteaseByName

public static Protease getProteaseByName(java.lang.String proteaseName)
                                  throws BioException
Gets a Protease instance by name.

Parameters:
proteaseName - the name of a registered Protease (case sensistive)
Returns:
a fly-weight Protease instance
Throws:
BioException - if no protease is registered by that name

getNames

public static java.util.Set getNames()
Returns:
an unmodifiable Set of all the registered Protease names (Strings).

getAllProteases

public static java.util.Set getAllProteases()
Returns:
an unmodifiable set of all the registered Protease objects.

registered

public static boolean registered(java.lang.String proteaseName)
Has a Protease been registered with that name?

Parameters:
proteaseName - the query
Returns:
true if one has, false otherwise

getInstance

public static ProteaseManager getInstance()
Returns:
a reference to the singleton instance of the ProteaseManager

getTrypsin

public static Protease getTrypsin()
Returns:
a flywieght instance of Trypsin

getLys_C

public static Protease getLys_C()
Returns:
a flywieght instance of Lys-C

getArg_C

public static Protease getArg_C()
Returns:
a flywieght instance of Arg-C

getAsp_N

public static Protease getAsp_N()
Returns:
a flywieght instance of Asp-N

getGlu_C_bicarbonate

public static Protease getGlu_C_bicarbonate()
Returns:
a flywieght instance of Glu_C_bicarbonate

getGlu_C_phosphate

public static Protease getGlu_C_phosphate()
Returns:
a flywieght instance of Glu_C_phosphate

getChymotrypsin

public static Protease getChymotrypsin()
Returns:
a flywieght instance of Chymotrypsin

getCNBr

public static Protease getCNBr()
Returns:
a flywieght instance of CNBr