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

Source Code for Module Bio.Restriction.DNAUtils

 1  # This code is part of the Biopython distribution and governed by its 
 2  # license.  Please see the LICENSE file that should have been included 
 3  # as part of this package. 
 4   
 5  """DNA utilities for Bio.Restriction (DEPRECATED). 
 6   
 7  DNAUtils was written in C and therefore would not be available on Jython etc. 
 8  It offered three string based functions: 
 9   - complement, duplicating the functionality of the Seq object 
10   - antiparallel, duplicating the functionality of the Seq object and 
11     the reverse_complement function in Bio.Seq 
12   - check_bases, a very odd validation routine unlikely to be of general use. 
13  """ 
14   
15  import warnings 
16  warnings.warn("Bio.Restriction.DNAUtils is deprecated, and will be " 
17                "removed in a future release of Biopython.") 
18  del warnings 
19   
20  #expose these existing functions mimicking the old DNAUtils names: 
21  from Bio.Seq import reverse_complement as antiparallel 
22   
23  #quick and dirty complement function, maybe we should add one to Bio.Seq? 
24 -def complement(seq_string) :
25 return antiparallel(seq_string)[::-1]
26 27 #expose this re-implementation of the old C code function check_bases: 28 from Bio.Restriction.Restriction import _check_bases as check_bases 29