[Biopython-dev] [Bug 2419] New: SeqUtils __init__.py missing	complement function (v1.43 and v1.44)
    bugzilla-daemon at portal.open-bio.org 
    bugzilla-daemon at portal.open-bio.org
       
    Wed Dec 12 15:07:12 UTC 2007
    
    
  
http://bugzilla.open-bio.org/show_bug.cgi?id=2419
           Summary: SeqUtils __init__.py missing complement function (v1.43
                    and v1.44)
           Product: Biopython
           Version: 1.44
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main Distribution
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: justin.t.riley at gmail.com
This issue exists in both 1.43 and 1.44.  You won't notice this bug on an
import of SeqUtils.  However, when you try to use the six_frame_translations
function like so:
from Bio import SeqUtils
SeqUtils.six_frame_translations('GTCA....AAT')
you get:
<type 'exceptions.NameError'>: global name 'complement' is not defined
at line 285 (for version 1.43 anyhow)
At first I searched all the Biopython modules for a "def complement" string and
found one in Seq but it was for the complement of an actual Seq object. 
Looking around the web I found:
def complement(seq):
    " returns the complementary sequence (NOT antiparallel) "
    return ''.join([IUPACData.ambiguous_dna_complement[x] for x in seq])
Pasting the above in Bio/SeqUtils/__init__.py solved the issue for me.  Thanks.
~jtriley
-- 
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
    
    
More information about the Biopython-dev
mailing list