[Biopython-dev] [Bug 1524] New: Bio.Blast.Record.multiple_alignment should be in multiple alignment format

bugzilla-daemon at portal.open-bio.org bugzilla-daemon at portal.open-bio.org
Wed Sep 24 06:33:16 EDT 2003


http://bugzilla.bioperl.org/show_bug.cgi?id=1524

           Summary: Bio.Blast.Record.multiple_alignment should be in
                    multiple alignment format
           Product: Biopython
           Version: 1.10
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Main Distribution
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: j.a.casbon at qmul.ac.uk


I think Bio.Blast.Record.multiple_alignment should return an instance of 
Bio.Align.Generic rather than a list of tuples. 
 
Maybe this is a matter of taste, but it perhaps warrants another method 
implementing this feature. 
 
This method will convert, if this helps: 
 
def blast_alignment_to_generic(b_record): 
    seq = {} 
     
    for frag in b_record.multiple_alignment.alignment: 
        if frag[0] in seq: 
            seq[frag[0]] = seq[frag[0]] + frag[2] 
        else: 
            seq[frag[0]] = frag[2] 
             
    generic = Alignment(IUPAC.IUPACProtein) 
 
    for prot in seq: 
        generic.add_sequence(prot, seq[prot]) 
 
    return generic



------- 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