Class RestrictionEnzymeManager
- java.lang.Object
-
- org.biojava.bio.molbio.RestrictionEnzymeManager
-
public final class RestrictionEnzymeManager extends Object
RestrictionEnzymeManagermanages collections of staticRestrictionEnzymeinstances. A properties file should be placed in the CLASSPATH containing a key "rebase.data.file" and a corresponding value of a REBASE file (standard REBASE format #31 conventionally named withrefm.### where ### is the version number). This file will be loaded by theRestrictionEnzymeManagerClassLoader. The properties are loaded as aResourceBundle, so the file should be named "RestrictionEnzymeManager.properties".Since 1.5, a format #31 REBASE file can be loaded at anytime using the method
loadEnzymeFileand optionally filtered for commercially available enzymes.- Since:
- 1.3
- Author:
- Keith James, George Waldon
-
-
Field Summary
Fields Modifier and Type Field Description static StringREBASE_DATA_KEYREBASE_DATA_KEYthe ResourceBundle key which specifies the location of the REBASE flat file.static StringREBASE_TAG_COMMREBASE_TAG_COMMthe REBASE tag containing the commercial suppliers.static StringREBASE_TAG_ISZRREBASE_TAG_ISZRthe REBASE tag containing the enzyme isoschizomers.static StringREBASE_TAG_METHREBASE_TAG_METHthe REBASE tag containing the methylation site.static StringREBASE_TAG_NAMEREBASE_TAG_NAMEthe REBASE tag containing the enzyme name.static StringREBASE_TAG_ORGNREBASE_TAG_ORGNthe REBASE tag containing the organism.static StringREBASE_TAG_REFSREBASE_TAG_REFSthe REBASE tag containing the references.static StringREBASE_TAG_SITEREBASE_TAG_SITEthe REBASE tag containing the enzyme site.static StringREBASE_TAG_SRCEREBASE_TAG_SRCEthe REBASE tag containing the source.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SetgetAllEnzymes()getAllEnzymesreturns an unmodifable set of all available enzymes.static AnnotationgetAnnotation(RestrictionEnzyme enzyme)getAnnotationreturns an immutable, static annotation describing the enzyme.static RestrictionEnzymegetEnzyme(String name)getEnzymereturns an enzyme by name.static SetgetIsoschizomers(String name)getIsoschizomersreturns an unmodifable set of the isoschizomers of this enzyme.static SetgetNCutters(int n)getNCuttersreturns an unmodifable set of all enzymes with a cut site of size n.static Pattern[]getPatterns(RestrictionEnzyme enzyme)getPatternsreturns twoPatternobjects for an enzyme, one matches the forward strand and one the reverse.static StringgetRecognitionSequence(String name)getRecognitionSequencereturns a string that describes the recognition site of this enzyme.static StringgetSuppliers(RestrictionEnzyme enzyme)getSuppliersreturns a string describing the suppliers of this enzyme according to REBASE encoding for commercial sources or an empty String if the enzyme is not commecially available.static voidloadEnzymeFile(InputStream is, boolean commercialOnly)loadEnzymeFileloads a new REBASE file (or any file using REBASE format #31).static voidregister(RestrictionEnzyme enzyme, Set isoschizomers)registerregisiters a newRestrictionEnzymewith the manager.
-
-
-
Field Detail
-
REBASE_DATA_KEY
public static final String REBASE_DATA_KEY
REBASE_DATA_KEYthe ResourceBundle key which specifies the location of the REBASE flat file.- See Also:
- Constant Field Values
-
REBASE_TAG_NAME
public static final String REBASE_TAG_NAME
REBASE_TAG_NAMEthe REBASE tag containing the enzyme name.- See Also:
- Constant Field Values
-
REBASE_TAG_ISZR
public static final String REBASE_TAG_ISZR
REBASE_TAG_ISZRthe REBASE tag containing the enzyme isoschizomers.- See Also:
- Constant Field Values
-
REBASE_TAG_SITE
public static final String REBASE_TAG_SITE
REBASE_TAG_SITEthe REBASE tag containing the enzyme site.- See Also:
- Constant Field Values
-
REBASE_TAG_METH
public static final String REBASE_TAG_METH
REBASE_TAG_METHthe REBASE tag containing the methylation site.- See Also:
- Constant Field Values
-
REBASE_TAG_ORGN
public static final String REBASE_TAG_ORGN
REBASE_TAG_ORGNthe REBASE tag containing the organism.- See Also:
- Constant Field Values
-
REBASE_TAG_SRCE
public static final String REBASE_TAG_SRCE
REBASE_TAG_SRCEthe REBASE tag containing the source.- See Also:
- Constant Field Values
-
REBASE_TAG_COMM
public static final String REBASE_TAG_COMM
REBASE_TAG_COMMthe REBASE tag containing the commercial suppliers.- See Also:
- Constant Field Values
-
REBASE_TAG_REFS
public static final String REBASE_TAG_REFS
REBASE_TAG_REFSthe REBASE tag containing the references.- See Also:
- Constant Field Values
-
-
Method Detail
-
loadEnzymeFile
public static void loadEnzymeFile(InputStream is, boolean commercialOnly)
loadEnzymeFileloads a new REBASE file (or any file using REBASE format #31).- Parameters:
is- an InputStream over the file to load.commercialOnly- indicates whether or not only commercially available enzymes are loaded.- Since:
- 1.5
-
getAllEnzymes
public static Set getAllEnzymes()
getAllEnzymesreturns an unmodifable set of all available enzymes.- Returns:
- a
SetofRestrictionEnzymes.
-
getEnzyme
public static RestrictionEnzyme getEnzyme(String name)
getEnzymereturns an enzyme by name.- Parameters:
name- aStringsuch as EcoRI, case sensitive.- Returns:
- a
RestrictionEnzyme.
-
getIsoschizomers
public static Set getIsoschizomers(String name)
getIsoschizomersreturns an unmodifable set of the isoschizomers of this enzyme.- Parameters:
name- aStringsuch as EcoRI, case sensitive.- Returns:
- a
SetofRestrictionEnzymes.
-
getRecognitionSequence
public static String getRecognitionSequence(String name)
getRecognitionSequencereturns a string that describes the recognition site of this enzyme. It corresponds to the field <3> of the REBASE file.- Parameters:
name- aStringsuch as EcoRI, case sensitive.- Returns:
- a
Stringdescribing the recognition sequence, e.g. "G^AATTC" for EcoRI. - Since:
- 1.5
-
getNCutters
public static Set getNCutters(int n)
getNCuttersreturns an unmodifable set of all enzymes with a cut site of size n.- Parameters:
n- anintcut site size.- Returns:
- a
SetofRestrictionEnzymes.
-
getPatterns
public static Pattern[] getPatterns(RestrictionEnzyme enzyme)
getPatternsreturns twoPatternobjects for an enzyme, one matches the forward strand and one the reverse. This enables searching of both strands of a sequence without reverse-complementing it. AsPatternobjects are thread-safe these may be used for all searches.- Parameters:
enzyme- aRestrictionEnzyme.- Returns:
- a
Pattern []array with the forward strandPatternat index 0 and the reverse at index 1.
-
getAnnotation
public static Annotation getAnnotation(RestrictionEnzyme enzyme)
getAnnotationreturns an immutable, static annotation describing the enzyme. This is suitable for adding toFeatures which represent restriction sites. The annotation produced currently contains one key "dbxref" in line with the GenBank/EMBL qualifier for the "misc_binding" feature key. The key has a corresponding value "REBASE:<enzyme name>".- Parameters:
enzyme- aRestrictionEnzyme.- Returns:
- an
Annotation.
-
getSuppliers
public static String getSuppliers(RestrictionEnzyme enzyme)
getSuppliersreturns a string describing the suppliers of this enzyme according to REBASE encoding for commercial sources or an empty String if the enzyme is not commecially available.REBASE #31 version 604 code:
A GE Healthcare (8/05)
B Invitrogen Corporation(8/05)
C Minotech Biotechnology (9/05)
E Stratagene (9/05)
F Fermentas International Inc. (2/06)
G Qbiogene (9/05)
H American Allied Biochemical, Inc. (9/05)
I SibEnzyme Ltd. (2/06)
J Nippon Gene Co., Ltd. (8/05)
K Takara Bio Inc. (9/05)
M Roche Applied Science (8/05)
N New England Biolabs (2/06)
O Toyobo Biochemicals (9/05)
Q Molecular Biology Resources (8/05)
R Promega Corporation (9/05)
S Sigma Chemical Corporation (9/05)
U Bangalore Genei (9/05)
V Vivantis Technologies (1/06)
X EURx Ltd. (9/05)
Y CinnaGen Inc. (9/05)- Parameters:
enzyme- aRestrictionEnzyme.- Returns:
- a
String. - Since:
- 1.5
-
register
public static void register(RestrictionEnzyme enzyme, Set isoschizomers)
registerregisiters a newRestrictionEnzymewith the manager. It does not check that the isoschizomers are known to the manager. If there are custom isoschizomers in theSet, they should be also be registered.- Parameters:
enzyme- aRestrictionEnzymeto register.isoschizomers- aSetofRestrictionEnzymes which are isoschizomers.
-
-