Package Bio :: Package Restriction :: Package _Update :: Module RestrictionCompiler
[hide private]
[frames] | no frames]

Module RestrictionCompiler

source code

Convert a serie of Rebase files into a Restriction_Dictionary.py module.

The Rebase files are in the emboss format:

    emboss_e.###    -> contains informations about the restriction sites.
    emboss_r.###    -> contains general informations about the enzymes.
    emboss_s.###    -> contains informations about the suppliers.
    
### is a 3 digit number. The first digit is the year and the two last the month.

Classes [hide private]
  OverhangError
Exception for dealing with overhang.
  newenzyme
construct the attributes of the enzyme corresponding to 'name'.
  TypeCompiler
Build the different types possible for Restriction Enzymes
  DictionaryBuilder
Functions [hide private]
string
BaseExpand(base)
given a degenerated base, returns its meaning in IUPAC alphabet.
source code
string
regex(site)
Construct a regular expression from a DNA sequence.
source code
string
Antiparallel(sequence)
returns a string which represents the reverse complementary strand of a DNA sequence.
source code
bool
is_palindrom(sequence)
True is the sequence is a palindrom.
source code
string
LocalTime()
LocalTime calculate the extension for emboss file for the current year and month.
source code
Variables [hide private]
  dna_alphabet = {'A': 'A', 'B': 'CGT', 'C': 'C', 'D': 'AGT', 'G...
  complement_alphabet = {'A': 'T', 'B': 'V', 'C': 'G', 'D': 'H',...
  enzymedict = {}
  suppliersdict = {}
  classdict = {}
  typedict = {}
  start = '\n#!/usr/bin/env python\n#\n# Restriction Analys...
  AllEnzymes = RestrictionBatch(['AanI', 'AarI', 'AasI', 'AatI',...
  CommOnly = RestrictionBatch(['AanI', 'AarI', 'AasI', 'AatI', '...
  NonComm = RestrictionBatch(['AceIII', 'AhaIII', 'AlwFI', 'ApaB...
  __package__ = 'Bio.Restriction._Update'
Function Details [hide private]

BaseExpand(base)

source code 
given a degenerated base, returns its meaning in IUPAC alphabet.

i.e:
    b= 'A' -> 'A'
    b= 'N' -> 'ACGT'
    etc...

Returns: string

regex(site)

source code 
Construct a regular expression from a DNA sequence.
i.e.:
    site = 'ABCGN'   -> 'A[CGT]CG.'

Returns: string

is_palindrom(sequence)

source code 

True is the sequence is a palindrom. sequence is a DNA object.

Returns: bool

Variables Details [hide private]

dna_alphabet

Value:
{'A': 'A',
 'B': 'CGT',
 'C': 'C',
 'D': 'AGT',
 'G': 'G',
 'H': 'ACT',
 'K': 'GT',
 'M': 'AC',
...

complement_alphabet

Value:
{'A': 'T',
 'B': 'V',
 'C': 'G',
 'D': 'H',
 'G': 'C',
 'H': 'D',
 'K': 'M',
 'M': 'K',
...

start

Value:
'''
#!/usr/bin/env python
#
#      Restriction Analysis Libraries.
#      Copyright (C) 2004. Frederic Sohm.
#
# This code is part of the Biopython distribution and governed by its
# license.  Please see the LICENSE file that should have been included
...

AllEnzymes

Value:
RestrictionBatch(['AanI', 'AarI', 'AasI', 'AatI', 'AatII', 'AbsI', 'Ac\
c16I', 'Acc36I', 'Acc65I', 'AccB1I', 'AccB7I', 'AccBSI', 'AccI', 'AccI\
I', 'AccIII', 'AceIII', 'AciI', 'AclI', 'AclWI', 'AcoI', 'AcsI', 'AcuI\
', 'AcvI', 'AcyI', 'AdeI', 'AfaI', 'AfeI', 'AfiI', 'AflII', 'AflIII', \
'AgeI', 'AgsI', 'AhaIII', 'AhdI', 'AhlI', 'AjiI', 'AjnI', 'AjuI', 'Ale\
I', 'AlfI', 'AloI', 'AluBI', 'AluI', 'Alw21I', 'Alw26I', 'Alw44I', 'Al\
wFI', 'AlwI', 'AlwNI', 'Ama87I', 'Aor13HI', 'Aor51HI', 'ApaBI', 'ApaI'\
, 'ApaLI', 'ApeKI', 'ApoI', 'ApyPI', 'AquII', 'AquIII', 'AquIV', 'ArsI\
...

CommOnly

Value:
RestrictionBatch(['AanI', 'AarI', 'AasI', 'AatI', 'AatII', 'AbsI', 'Ac\
c16I', 'Acc36I', 'Acc65I', 'AccB1I', 'AccB7I', 'AccBSI', 'AccI', 'AccI\
I', 'AccIII', 'AciI', 'AclI', 'AclWI', 'AcoI', 'AcsI', 'AcuI', 'AcvI',\
 'AcyI', 'AdeI', 'AfaI', 'AfeI', 'AfiI', 'AflII', 'AflIII', 'AgeI', 'A\
gsI', 'AhdI', 'AhlI', 'AjiI', 'AjnI', 'AjuI', 'AleI', 'AlfI', 'AloI', \
'AluBI', 'AluI', 'Alw21I', 'Alw26I', 'Alw44I', 'AlwI', 'AlwNI', 'Ama87\
I', 'Aor13HI', 'Aor51HI', 'ApaI', 'ApaLI', 'ApeKI', 'ApoI', 'ArsI', 'A\
scI', 'AseI', 'AsiGI', 'AsiSI', 'Asp700I', 'Asp718I', 'AspA2I', 'AspEI\
...

NonComm

Value:
RestrictionBatch(['AceIII', 'AhaIII', 'AlwFI', 'ApaBI', 'ApyPI', 'AquI\
I', 'AquIII', 'AquIV', 'Asi256I', 'AspCNI', 'AsuI', 'AvaIII', 'Bbr7I',\
 'BbvII', 'Bce83I', 'BcefI', 'BetI', 'BinI', 'BmgI', 'BsbI', 'BscAI', \
'BscGI', 'BsiI', 'BsiYI', 'Bsp24I', 'BspD6I', 'BspGI', 'BspLU11I', 'Bs\
pMII', 'BspNCI', 'BthCI', 'CauII', 'CdiI', 'CdpI', 'ChaI', 'CjeI', 'Cj\
eNII', 'CjePI', 'CjuI', 'CjuII', 'CstMI', 'CviRI', 'DraRI', 'DrdII', '\
DrdIV', 'DsaI', 'EcoHI', 'EsaBC3I', 'EsaSSI', 'EspI', 'FinI', 'FmuI', \
'FnuDII', 'GdiII', 'HaeI', 'HgiAI', 'HgiCI', 'HgiEII', 'HgiJII', 'Hin4\
...