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 = Seq
  dna_alphabet = {'A': 'A', 'C': 'C', 'G': 'G', 'T': 'T', 'R': '...
  complement_alphabet = {'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C',...
  enzymedict = {}
  suppliersdict = {}
  classdict = {}
  typedict = {}
  start = '...
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', 'C': 'C', 'G': 'G', 'T': 'T', 'R': 'AG', 'Y': 'CT', 'W': 'A\
T', 'S': 'CG', 'M': 'AC', 'K': 'GT', 'H': 'ACT', 'B': 'CGT', 'V': 'ACG\
', 'D': 'AGT', 'N': 'ACGT', 'a': 'a', 'c': 'c', 'g': 'g', 't': 't', 'r\
': 'ag', 'y': 'ct', 'w': 'at', 's': 'cg', 'm': 'ac', 'k': 'gt', 'h': '\
act', 'b': 'cgt', 'v': 'acg', 'd': 'agt', 'n': 'acgt'}

complement_alphabet

Value:
{'A': 'T', 'T': 'A', 'C': 'G', 'G': 'C', 'R': 'Y', 'Y': 'R', 'W': 'W',\
 'S': 'S', 'M': 'K', 'K': 'M', 'H': 'D', 'D': 'H', 'B': 'V', 'V': 'B',\
 'N': 'N', 'a': 't', 'c': 'g', 'g': 'c', 't': 'a', 'r': 'y', 'y': 'r',\
 'w': 'w', 's': 's', 'm': 'k', 'k': 'm', 'h': 'd', 'd': 'h', 'b': 'v',\
 'v': 'b', 'n': 'n'}

start

Value:
'\n\
#!/usr/bin/env python\n\
#\n\
#      Restriction Analysis Libraries.\n\
#      Copyright (C) 2004. Frederic Sohm.\n\
#\n\
# This code is part of the Biopython distribution and governed by its\\
n\
...