Class RestrictionEnzymeManager


  • public final class RestrictionEnzymeManager
    extends java.lang.Object

    RestrictionEnzymeManager manages collections of static RestrictionEnzyme instances. 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 the RestrictionEnzymeManager ClassLoader. The properties are loaded as a ResourceBundle, so the file should be named "RestrictionEnzymeManager.properties".

    Since 1.5, a format #31 REBASE file can be loaded at anytime using the method loadEnzymeFile and optionally filtered for commercially available enzymes.

    Since:
    1.3
    Author:
    Keith James, George Waldon
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String REBASE_DATA_KEY
      REBASE_DATA_KEY the ResourceBundle key which specifies the location of the REBASE flat file.
      static java.lang.String REBASE_TAG_COMM
      REBASE_TAG_COMM the REBASE tag containing the commercial suppliers.
      static java.lang.String REBASE_TAG_ISZR
      REBASE_TAG_ISZR the REBASE tag containing the enzyme isoschizomers.
      static java.lang.String REBASE_TAG_METH
      REBASE_TAG_METH the REBASE tag containing the methylation site.
      static java.lang.String REBASE_TAG_NAME
      REBASE_TAG_NAME the REBASE tag containing the enzyme name.
      static java.lang.String REBASE_TAG_ORGN
      REBASE_TAG_ORGN the REBASE tag containing the organism.
      static java.lang.String REBASE_TAG_REFS
      REBASE_TAG_REFS the REBASE tag containing the references.
      static java.lang.String REBASE_TAG_SITE
      REBASE_TAG_SITE the REBASE tag containing the enzyme site.
      static java.lang.String REBASE_TAG_SRCE
      REBASE_TAG_SRCE the REBASE tag containing the source.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Set getAllEnzymes()
      getAllEnzymes returns an unmodifable set of all available enzymes.
      static Annotation getAnnotation​(RestrictionEnzyme enzyme)
      getAnnotation returns an immutable, static annotation describing the enzyme.
      static RestrictionEnzyme getEnzyme​(java.lang.String name)
      getEnzyme returns an enzyme by name.
      static java.util.Set getIsoschizomers​(java.lang.String name)
      getIsoschizomers returns an unmodifable set of the isoschizomers of this enzyme.
      static java.util.Set getNCutters​(int n)
      getNCutters returns an unmodifable set of all enzymes with a cut site of size n.
      static java.util.regex.Pattern[] getPatterns​(RestrictionEnzyme enzyme)
      getPatterns returns two Pattern objects for an enzyme, one matches the forward strand and one the reverse.
      static java.lang.String getRecognitionSequence​(java.lang.String name)
      getRecognitionSequence returns a string that describes the recognition site of this enzyme.
      static java.lang.String getSuppliers​(RestrictionEnzyme enzyme)
      getSuppliers returns 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 void loadEnzymeFile​(java.io.InputStream is, boolean commercialOnly)
      loadEnzymeFile loads a new REBASE file (or any file using REBASE format #31).
      static void register​(RestrictionEnzyme enzyme, java.util.Set isoschizomers)
      register regisiters a new RestrictionEnzyme with the manager.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • loadEnzymeFile

        public static void loadEnzymeFile​(java.io.InputStream is,
                                          boolean commercialOnly)
        loadEnzymeFile loads 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 java.util.Set getAllEnzymes()
        getAllEnzymes returns an unmodifable set of all available enzymes.
        Returns:
        a Set of RestrictionEnzymes.
      • getEnzyme

        public static RestrictionEnzyme getEnzyme​(java.lang.String name)
        getEnzyme returns an enzyme by name.
        Parameters:
        name - a String such as EcoRI, case sensitive.
        Returns:
        a RestrictionEnzyme.
      • getIsoschizomers

        public static java.util.Set getIsoschizomers​(java.lang.String name)
        getIsoschizomers returns an unmodifable set of the isoschizomers of this enzyme.
        Parameters:
        name - a String such as EcoRI, case sensitive.
        Returns:
        a Set of RestrictionEnzymes.
      • getRecognitionSequence

        public static java.lang.String getRecognitionSequence​(java.lang.String name)
        getRecognitionSequence returns a string that describes the recognition site of this enzyme. It corresponds to the field <3> of the REBASE file.
        Parameters:
        name - a String such as EcoRI, case sensitive.
        Returns:
        a String describing the recognition sequence, e.g. "G^AATTC" for EcoRI.
        Since:
        1.5
      • getNCutters

        public static java.util.Set getNCutters​(int n)
        getNCutters returns an unmodifable set of all enzymes with a cut site of size n.
        Parameters:
        n - an int cut site size.
        Returns:
        a Set of RestrictionEnzymes.
      • getPatterns

        public static java.util.regex.Pattern[] getPatterns​(RestrictionEnzyme enzyme)
        getPatterns returns two Pattern objects 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. As Pattern objects are thread-safe these may be used for all searches.
        Parameters:
        enzyme - a RestrictionEnzyme.
        Returns:
        a Pattern [] array with the forward strand Pattern at index 0 and the reverse at index 1.
      • getAnnotation

        public static Annotation getAnnotation​(RestrictionEnzyme enzyme)
        getAnnotation returns an immutable, static annotation describing the enzyme. This is suitable for adding to Features 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 - a RestrictionEnzyme.
        Returns:
        an Annotation.
      • getSuppliers

        public static java.lang.String getSuppliers​(RestrictionEnzyme enzyme)
        getSuppliers returns 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 - a RestrictionEnzyme.
        Returns:
        a String.
        Since:
        1.5
      • register

        public static void register​(RestrictionEnzyme enzyme,
                                    java.util.Set isoschizomers)
        register regisiters a new RestrictionEnzyme with the manager. It does not check that the isoschizomers are known to the manager. If there are custom isoschizomers in the Set, they should be also be registered.
        Parameters:
        enzyme - a RestrictionEnzyme to register.
        isoschizomers - a Set of RestrictionEnzymes which are isoschizomers.