Back to index

python-biopython  1.60
Public Member Functions
Bio.Restriction._Update.RestrictionCompiler.newenzyme Class Reference

List of all members.

Public Member Functions

def __init__

Detailed Description

construct the attributes of the enzyme corresponding to 'name'.

Definition at line 143 of file RestrictionCompiler.py.


Constructor & Destructor Documentation

Definition at line 145 of file RestrictionCompiler.py.

00145 
00146     def __init__(cls, name):
00147         cls.opt_temp = 37
00148         cls.inact_temp = 65
00149         cls.substrat = 'DNA'
00150         target = enzymedict[name]
00151         cls.site = target[0]
00152         cls.size = target[1]
00153         cls.suppl = tuple(target[9])
00154         cls.freq = target[11]
00155         cls.ovhg = target[13]
00156         cls.ovhgseq = target[14]
00157         cls.bases = ()
00158         #
00159         #   Is the site palindromic?
00160         #   Important for the way the DNA is search for the site.
00161         #   Palindromic sites needs to be looked for only over 1 strand.
00162         #   Non Palindromic needs to be search for on the reverse complement
00163         #   as well.
00164         #
00165         if target[10] : cls.bases += ('Palindromic',)
00166         else : cls.bases += ('NonPalindromic',)
00167         #
00168         #   Number of cut the enzyme produce.
00169         #   0 => unknown, the enzyme has not been fully characterised.
00170         #   2 => 1 cut, (because one cut is realised by cutting 2 strands
00171         #   4 => 2 cuts, same logic.
00172         #   A little bit confusing but it is the way EMBOSS/Rebase works.
00173         #
00174         if not target[2]:
00175             #
00176             #   => undefined enzymes, nothing to be done.
00177             #
00178             cls.bases += ('NoCut','Unknown', 'NotDefined')
00179             cls.fst5 = None
00180             cls.fst3 = None
00181             cls.scd5 = None
00182             cls.scd3 = None
00183             cls.ovhg = None
00184             cls.ovhgseq = None
00185         else:
00186             #
00187             #   we will need to calculate the overhang.
00188             #
00189             if target[2] == 2:
00190                 cls.bases += ('OneCut',)
00191                 cls.fst5 = target[4]
00192                 cls.fst3 = target[5]
00193                 cls.scd5 = None
00194                 cls.scd3 = None
00195             else:
00196                 cls.bases += ('TwoCuts',)
00197                 cls.fst5 = target[4]
00198                 cls.fst3 = target[5]
00199                 cls.scd5 = target[6]
00200                 cls.scd3 = target[7]
00201             #
00202             #   Now, prepare the overhangs which will be added to the DNA 
00203             #   after the cut.
00204             #   Undefined enzymes will not be allowed to catalyse,
00205             #   they are not available commercially anyway.
00206             #   I assumed that if an enzyme cut twice the overhang will be of
00207             #   the same kind. The only exception is HaeIV. I do not deal
00208             #   with that at the moment (ie I don't include it,
00209             #   need to be fixed).
00210             #   They generally cut outside their recognition site and
00211             #   therefore the overhang is undetermined and dependent of
00212             #   the DNA sequence upon which the enzyme act.
00213             #
00214             if target[3]:
00215                 #
00216                 #   rebase field for blunt: blunt == 1, other == 0.
00217                 #   The enzyme is blunt. No overhang.
00218                 #
00219                 cls.bases += ('Blunt', 'Defined')
00220                 cls.ovhg = 0
00221             elif isinstance(cls.ovhg, int):
00222                 #
00223                 #   => overhang is sequence dependent
00224                 #
00225                 if cls.ovhg > 0:
00226                     #
00227                     #   3' overhang, ambiguous site (outside recognition site
00228                     #   or site containing ambiguous bases (N, W, R,...)
00229                     #
00230                     cls.bases += ('Ov3', 'Ambiguous')
00231                 elif cls.ovhg < 0:
00232                     #
00233                     #   5' overhang, ambiguous site (outside recognition site
00234                     #   or site containing ambiguous bases (N, W, R,...)
00235                     #
00236                     cls.bases += ('Ov5', 'Ambiguous')
00237             else:
00238                 #
00239                 #   cls.ovhg is a string => overhang is constant
00240                 #
00241                 if cls.fst5 - (cls.fst3 + cls.size) < 0:
00242                     cls.bases += ('Ov5', 'Defined')
00243                     cls.ovhg = - len(cls.ovhg)
00244                 else:
00245                     cls.bases += ('Ov3', 'Defined')
00246                     cls.ovhg = + len(cls.ovhg)
00247         #
00248         #   Next class : sensibility to methylation.
00249         #   Set by EmbossMixer from emboss_r.txt file
00250         #   Not really methylation dependent at the moment, stands rather for
00251         #   'is the site methylable?'.
00252         #   Proper methylation sensibility has yet to be implemented.
00253         #   But the class is there for further development.
00254         #
00255         if target[8]:
00256             cls.bases += ('Meth_Dep', )
00257             cls.compsite = target[12]
00258         else:
00259             cls.bases += ('Meth_Undep',)
00260             cls.compsite = target[12]
00261         #
00262         #   Next class will allow to select enzymes in function of their
00263         #   suppliers. Not essential but can be useful.
00264         #
00265         if cls.suppl:
00266             cls.bases += ('Commercially_available', )
00267         else:
00268             cls.bases += ('Not_available', )
00269         cls.bases += ('AbstractCut', 'RestrictionType')
00270         cls.__name__ = name
00271         cls.results = None
00272         cls.dna = None
00273         cls.__bases__ = cls.bases
00274         cls.charac = (cls.fst5, cls.fst3, cls.scd5, cls.scd3, cls.site)
00275         if not target[2] and cls.suppl:
00276             supp = ', '.join([suppliersdict[s][0] for s in cls.suppl])
00277             print 'WARNING : It seems that %s is both commercially available\
00278             \n\tand its characteristics are unknown. \
00279             \n\tThis seems counter-intuitive.\
00280             \n\tThere is certainly an error either in ranacompiler or\
00281             \n\tin this REBASE release.\
00282             \n\tThe supplier is : %s.' % (name, supp)
00283         return
00284 


The documentation for this class was generated from the following file: