Back to index

python-biopython  1.60
Classes | Functions | Variables
Bio.Restriction.Restriction Namespace Reference

Classes

class  FormattedSeq
class  RestrictionType
class  AbstractCut
class  NoCut
class  OneCut
class  TwoCuts
class  Meth_Dep
class  Meth_Undep
class  Palindromic
class  NonPalindromic
class  Unknown
class  Blunt
class  Ov5
class  Ov3
class  Defined
class  Ambiguous
class  NotDefined
class  Commercially_available
class  Not_available
class  RestrictionBatch
class  Analysis

Functions

def _check_bases

Variables

dictionary matching
 DNA = Seq
tuple CommOnly = RestrictionBatch()
tuple NonComm = RestrictionBatch()
tuple bases = tuple([eval(x) for x in bases])
tuple T = type.__new__(RestrictionType, 'RestrictionType', bases, {})
tuple newenz = T(k, bases, enzymedict[k])
 AllEnzymes = CommOnly|NonComm
list names = [str(x) for x in AllEnzymes]
list __all__ = ['FormattedSeq', 'Analysis', 'RestrictionBatch','AllEnzymes','CommOnly','NonComm']

Function Documentation

def Bio.Restriction.Restriction._check_bases (   seq_string) [private]
Check characters in a string (PRIVATE).

Remove digits and white space present in string. Allows any valid ambiguous
IUPAC DNA single letters codes (ABCDGHKMNRSTVWY, lower case are converted).

Other characters (e.g. symbols) trigger a TypeError.

Returns the string WITH A LEADING SPACE (!). This is for backwards
compatibility, and may in part be explained by the fact that
Bio.Restriction doesn't use zero based counting.

Definition at line 95 of file Restriction.py.

00095 
00096 def _check_bases(seq_string):
00097     """Check characters in a string (PRIVATE).
00098 
00099     Remove digits and white space present in string. Allows any valid ambiguous
00100     IUPAC DNA single letters codes (ABCDGHKMNRSTVWY, lower case are converted).
00101     
00102     Other characters (e.g. symbols) trigger a TypeError.
00103     
00104     Returns the string WITH A LEADING SPACE (!). This is for backwards
00105     compatibility, and may in part be explained by the fact that
00106     Bio.Restriction doesn't use zero based counting.
00107     """
00108     #Remove white space and make upper case:
00109     seq_string = "".join(seq_string.split()).upper()
00110     #Remove digits
00111     for c in "0123456789" : seq_string = seq_string.replace(c,"")
00112     #Check only allowed IUPAC letters
00113     if not set(seq_string).issubset(set("ABCDGHKMNRSTVWY")) :
00114         raise TypeError("Invalid character found in %s" % repr(seq_string))
00115     return " " + seq_string
00116 


Variable Documentation

Definition at line 2437 of file Restriction.py.

Definition at line 2426 of file Restriction.py.

tuple Bio.Restriction.Restriction.bases = tuple([eval(x) for x in bases])

Definition at line 2403 of file Restriction.py.

Definition at line 2383 of file Restriction.py.

Definition at line 124 of file Restriction.py.

Initial value:
00001 {'A' : 'ARWMHVDN', 'C' : 'CYSMHBVN', 'G' : 'GRSKBVDN',
00002             'T' : 'TYWKHBDN', 'R' : 'ABDGHKMNSRWV', 'Y' : 'CBDHKMNSTWVY',
00003             'W' : 'ABDHKMNRTWVY', 'S' : 'CBDGHKMNSRVY', 'M' : 'ACBDHMNSRWVY',
00004             'K' : 'BDGHKNSRTWVY', 'H' : 'ACBDHKMNSRTWVY',
00005             'B' : 'CBDGHKMNSRTWVY', 'V' : 'ACBDGHKMNSRWVY',
00006             'D' : 'ABDGHKMNSRTWVY', 'N' : 'ACBDGHKMNSRTWVY'}

Definition at line 117 of file Restriction.py.

Definition at line 2430 of file Restriction.py.

tuple Bio.Restriction.Restriction.newenz = T(k, bases, enzymedict[k])

Definition at line 2415 of file Restriction.py.

Definition at line 2384 of file Restriction.py.

Definition at line 2408 of file Restriction.py.