Package Bio :: Package Restriction :: Module Restriction :: Class RestrictionType
[hide private]
[frames] | no frames]

Type RestrictionType

source code

object --+    
         |    
      type --+
             |
            RestrictionType
Known Subclasses:

RestrictionType. Type from which all enzyme classes are derived.

Implement the operator methods.

Instance Methods [hide private]
the object's type
__init__(cls, name='', bases=(), dct=None)
Initialize RestrictionType instance.
source code
 
__add__(cls, other)
Add restriction enzyme to a RestrictionBatch().
source code
 
__div__(cls, other)
Override '/' operator to use as search method.
source code
 
__rdiv__(cls, other)
Override division with reversed operands to use as search method.
source code
 
__truediv__(cls, other)
Override Python 3 division operator to use as search method.
source code
 
__rtruediv__(cls, other)
As __truediv___, with reversed operands.
source code
 
__floordiv__(cls, other)
Override '//' operator to use as catalyse method.
source code
 
__rfloordiv__(cls, other)
As __floordiv__, with reversed operands.
source code
 
__str__(cls)
Return the name of the enzyme as string.
source code
 
__repr__(cls)
Implement repr method.
source code
 
__len__(cls)
Return lenght of recognition site of enzyme as int.
source code
 
__hash__(cls)
hash(x)
source code
 
__eq__(cls, other)
Override '==' operator.
source code
 
__ne__(cls, other)
Override '!=' operator.
source code
 
__rshift__(cls, other)
Override '>>' operator to test for neoschizomers.
source code
 
__mod__(cls, other)
Override '%' operator to test for compatible overhangs.
source code
 
__ge__(cls, other)
Compare length of recognition site of two enzymes.
source code
 
__gt__(cls, other)
Compare length of recognition site of two enzymes.
source code
 
__le__(cls, other)
Compare length of recognition site of two enzymes.
source code
 
__lt__(cls, other)
Compare length of recognition site of two enzymes.
source code

Inherited from type: __call__, __delattr__, __getattribute__, __instancecheck__, __new__, __setattr__, __subclasscheck__, __subclasses__, mro

Inherited from object: __format__, __reduce__, __reduce_ex__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from type: __abstractmethods__, __base__, __bases__, __basicsize__, __dictoffset__, __flags__, __itemsize__, __mro__, __name__, __weakrefoffset__

Inherited from object: __class__

Method Details [hide private]

__init__(cls, name='', bases=(), dct=None)
(Constructor)

source code 

Initialize RestrictionType instance.

Not intended to be used in normal operation. The enzymes are instantiated when importing the module. See below.

Returns: the object's type
Overrides: object.__init__

__add__(cls, other)
(Addition operator)

source code 

Add restriction enzyme to a RestrictionBatch().

If other is an enzyme returns a batch of the two enzymes. If other is already a RestrictionBatch add enzyme to it.

__truediv__(cls, other)

source code 

Override Python 3 division operator to use as search method.

Like __div__.

__rtruediv__(cls, other)

source code 

As __truediv___, with reversed operands.

Like __rdiv__.

__str__(cls)
(Informal representation operator)

source code 
Return the name of the enzyme as string.
Overrides: object.__str__

__repr__(cls)
(Representation operator)

source code 

Implement repr method.

Used with eval or exec will instantiate the enzyme.

Overrides: object.__repr__

__hash__(cls)
(Hashing function)

source code 
hash(x)
Overrides: object.__hash__
(inherited documentation)

__eq__(cls, other)
(Equality operator)

source code 

Override '==' operator.

True if RE and other are the same enzyme.

Specifically this checks they are the same Python object.

Overrides: type.__eq__

__ne__(cls, other)

source code 

Override '!=' operator.

Isoschizomer strict (same recognition site, same restriction) -> False All the other-> True

WARNING - This is not the inverse of the __eq__ method >>> SacI != SstI # true isoschizomers False >>> SacI == SstI False

Overrides: type.__ne__

__rshift__(cls, other)

source code 

Override '>>' operator to test for neoschizomers.

neoschizomer : same recognition site, different restriction. -> True all the others : -> False >>> SmaI >> XmaI True

__mod__(cls, other)

source code 

Override '%' operator to test for compatible overhangs.

True if a and b have compatible overhang. >>> XhoI % SalI True

__ge__(cls, other)
(Greater-than-or-equals operator)

source code 

Compare length of recognition site of two enzymes.

Override '>='. a is greater or equal than b if the a site is longer than b site. If their site have the same length sort by alphabetical order of their names. >>> EcoRI.size 6 >>> EcoRV.size 6 >>> EcoRI >= EcoRV False

Overrides: type.__ge__

__gt__(cls, other)
(Greater-than operator)

source code 

Compare length of recognition site of two enzymes.

Override '>'. Sorting order:
  1. size of the recognition site.
  2. if equal size, alphabetical order of the names.
Overrides: type.__gt__

__le__(cls, other)
(Less-than-or-equals operator)

source code 

Compare length of recognition site of two enzymes.

Override '<='. Sorting order:
  1. size of the recognition site.
  2. if equal size, alphabetical order of the names.
Overrides: type.__le__

__lt__(cls, other)
(Less-than operator)

source code 

Compare length of recognition site of two enzymes.

Override '<'. Sorting order:
  1. size of the recognition site.
  2. if equal size, alphabetical order of the names.
Overrides: type.__lt__