Class RestrictionEnzyme

  • All Implemented Interfaces:
    java.io.Serializable

    public class RestrictionEnzyme
    extends java.lang.Object
    implements java.io.Serializable
    RestrictionEnzyme represents a restriction enzyme according to the REBASE standard. The cut positions are indicated relative to the 5' end of the recognition site and occur downstream of the given residue. Note that some enzmyes cut in more than one position and that cut positions may occur outside the recognition site.
    Since:
    1.3
    Author:
    Keith James
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int BLUNT
      BLUNT the end type created by enzymes which leave a blunt end.
      static int CUT_COMPOUND
      CUT_COMPOUND a cut type where the enzyme cuts in two positions relative to the recognition site.
      static int CUT_SIMPLE
      CUT_SIMPLE a cut type where the enzyme cuts in one position relative to the recognition site.
      protected int cutType  
      protected int[] dsCutPositions  
      protected java.lang.String forwardRegex  
      protected java.lang.String name  
      static int OVERHANG_3PRIME
      OVERHANG_3PRIME the sticky end type created by enzymes which leave a 3' overhang.
      static int OVERHANG_5PRIME
      OVERHANG_5PRIME the sticky end type created by enzymes which leave a 5' overhang.
      protected java.lang.String reverseRegex  
      protected SymbolList site  
      protected int[] usCutPositions  
    • Constructor Summary

      Constructors 
      Constructor Description
      RestrictionEnzyme​(java.lang.String name, SymbolList site, int dsForward, int dsReverse)
      Creates a new RestrictionEnzyme which cuts within or downstream of the recognition site.
      RestrictionEnzyme​(java.lang.String name, SymbolList site, int usForward, int usReverse, int dsForward, int dsReverse)
      Creates a new RestrictionEnzyme of the unusual type which cuts both upstream and downstream of its recognition site.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int getCutType()
      getCutType returns the type of cut produced by the enzyme.
      int[] getDownstreamCut()
      getDownstreamCut returns the cut site within or downstream of the recognition site.
      int getDownstreamEndType()
      getDownstreamEndType returns the double-stranded end type produced by the primary (intra-site or downstream) cut.
      java.lang.String getForwardRegex()
      getForwardRegex returns a regular expression which matches the forward strand of the recognition site.
      java.lang.String getName()
      getName returns the enzyme name.
      SymbolList getRecognitionSite()
      getRecognitionSite returns the forward strand of the recognition site.
      java.lang.String getReverseRegex()
      getReverseRegex returns a regular expression which matches the reverse strand of the recognition site.
      int[] getUpstreamCut()
      getUpstreamCut returns the cut site upstream of the recognition site.
      int getUpstreamEndType()
      getUpstreamEndType returns the double-stranded end type produced by the secondary (upstream) cut.
      int hashCode()  
      boolean isPalindromic()
      isPalindromic returns true if the recognition site is palindromic.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • CUT_SIMPLE

        public static final int CUT_SIMPLE
        CUT_SIMPLE a cut type where the enzyme cuts in one position relative to the recognition site. This covers the vast majority of cases.
        See Also:
        Constant Field Values
      • CUT_COMPOUND

        public static final int CUT_COMPOUND
        CUT_COMPOUND a cut type where the enzyme cuts in two positions relative to the recognition site.
        See Also:
        Constant Field Values
      • OVERHANG_5PRIME

        public static final int OVERHANG_5PRIME
        OVERHANG_5PRIME the sticky end type created by enzymes which leave a 5' overhang.
        See Also:
        Constant Field Values
      • OVERHANG_3PRIME

        public static final int OVERHANG_3PRIME
        OVERHANG_3PRIME the sticky end type created by enzymes which leave a 3' overhang.
        See Also:
        Constant Field Values
      • BLUNT

        public static final int BLUNT
        BLUNT the end type created by enzymes which leave a blunt end.
        See Also:
        Constant Field Values
      • name

        protected java.lang.String name
      • cutType

        protected int cutType
      • dsCutPositions

        protected int[] dsCutPositions
      • usCutPositions

        protected int[] usCutPositions
      • forwardRegex

        protected java.lang.String forwardRegex
      • reverseRegex

        protected java.lang.String reverseRegex
    • Constructor Detail

      • RestrictionEnzyme

        public RestrictionEnzyme​(java.lang.String name,
                                 SymbolList site,
                                 int dsForward,
                                 int dsReverse)
                          throws IllegalAlphabetException
        Creates a new RestrictionEnzyme which cuts within or downstream of the recognition site. The cut position indices are always in the same coordinate space as the recognition site. RestrictionEnzymes are immutable.
        Parameters:
        name - a String such as EcoRI.
        site - a SymbolList recognition site.
        dsForward - an int index in the forward strand (the strand conventionally written 5'-3') of the recognition site at which the cut occurs. The cut occurs between this base and the following one.
        dsReverse - an int index in the reverse strand (the strand conventionally written 3'-5') of the recognition site at which the cut occurs. The cut occurs between this base and the following one.
        Throws:
        IllegalAlphabetException - if an error occurs.
      • RestrictionEnzyme

        public RestrictionEnzyme​(java.lang.String name,
                                 SymbolList site,
                                 int usForward,
                                 int usReverse,
                                 int dsForward,
                                 int dsReverse)
                          throws IllegalAlphabetException
        Creates a new RestrictionEnzyme of the unusual type which cuts both upstream and downstream of its recognition site. The cut position indices are always in the same coordinate space as the recognition site.
        Parameters:
        name - a String such as Bsp24I.
        site - a SymbolList recognition site.
        usForward - an int index in the forward strand (the strand conventionally written 5'-3' upstream of the recognition site at which the cut occurs. The cut occurs between this base and the following one.
        usReverse - an int index in the reverse strand (the strand conventionally written 3'-5) upstream of the recognition site at which the cut occurs. The cut occurs between this base and the following one.
        dsForward - an int index in the forward strand (the strand conventionally written 5'-3') downstream of the recognition site at which the cut occurs. The cut occurs between this base and the following one.
        dsReverse - an int index in the reverse strand (the strand conventionally written 3'-5') downstream of the recognition site at which the cut occurs. The cut occurs between this base and the following one.
        Throws:
        IllegalAlphabetException - if an error occurs.
    • Method Detail

      • getName

        public java.lang.String getName()
        getName returns the enzyme name.
        Returns:
        a String.
      • getRecognitionSite

        public SymbolList getRecognitionSite()
        getRecognitionSite returns the forward strand of the recognition site.
        Returns:
        a SymbolList.
      • getForwardRegex

        public java.lang.String getForwardRegex()
        getForwardRegex returns a regular expression which matches the forward strand of the recognition site.
        Returns:
        a String.
      • getReverseRegex

        public java.lang.String getReverseRegex()
        getReverseRegex returns a regular expression which matches the reverse strand of the recognition site.
        Returns:
        a String.
      • isPalindromic

        public boolean isPalindromic()
        isPalindromic returns true if the recognition site is palindromic.
        Returns:
        a boolean.
      • getCutType

        public int getCutType()
        getCutType returns the type of cut produced by the enzyme. This will be one of either RestrictionEnzyme.CUT_SIMPLE (where it cuts in one position relative to the recognition site i.e. the vast majority of cases) or RestrictionEnzyme.CUT_COMPOUND (where it cuts in two positions).
        Returns:
        an int.
      • getDownstreamCut

        public int[] getDownstreamCut()
        getDownstreamCut returns the cut site within or downstream of the recognition site.
        Returns:
        an int [] array with the position in the 5'- strand at index 0 and the 3'- strand at index 1.
      • getUpstreamCut

        public int[] getUpstreamCut()
                             throws BioException
        getUpstreamCut returns the cut site upstream of the recognition site.
        Returns:
        an int [] array with the position in the 5'- strand at index 0 and the 3'- strand at index 1.
        Throws:
        BioException - if the enzyme does not cleave on both sides of its recognition site.
      • getDownstreamEndType

        public int getDownstreamEndType()
        getDownstreamEndType returns the double-stranded end type produced by the primary (intra-site or downstream) cut.
        Returns:
        an int equal to one of the constant fields OVERHANG_5PRIME, OVERHANG_3PRIME or BLUNT.
      • getUpstreamEndType

        public int getUpstreamEndType()
                               throws BioException
        getUpstreamEndType returns the double-stranded end type produced by the secondary (upstream) cut.
        Returns:
        an int equal to one of the constant fields OVERHANG_5PRIME, OVERHANG_3PRIME or BLUNT.
        Throws:
        BioException - if the enzyme does not cleave on both sides of its recognition site.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object