[Biopython-dev] [Bug 1438] New: fssp parsing bug

bugzilla-daemon at cvs.open-bio.org bugzilla-daemon at cvs.open-bio.org
Wed Apr 30 12:31:46 EDT 2003


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

           Summary: fssp parsing bug
           Product: Biopython
           Version: Not Applicable
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main Distribution
        AssignedTo: biopython-dev at biopython.org
        ReportedBy: idoerg at burnham.org


reported by Shaheen Ahmed:

Dear all,

I have problems when trying to generate a clustalw alignment of the fssp
database file -> 1ycc.fssp.

I use the following biopython script:

-------------------------------------------------------------------

#!/usr/bin/python

from Bio import FSSP
from Bio.FSSP import FSSPTools
from Bio import Align
from Bio.Align import AlignInfo
from Bio.Align.FormatConvert import FormatConverter
from Bio import SubsMat
from Bio.SubsMat import SeqMat
from Bio import Alphabet
from Bio.Alphabet import IUPAC
from Bio import Clustalw
from Bio.SeqRecord import SeqRecord

import sys
import string

for arg in sys.argv[1:]:
my_header, my_sum, my_align = FSSP.read_fssp(open(arg))

# To Filter From The Alignment Only Those Alignments With A Percent Id
# Above 30%:

filtered_sum, filtered_alignment = FSSPTools.filter( my_sum,my_align,'pID',30,100)
filtered_ali = FSSPTools.mult_align(filtered_sum, filtered_alignment)
converter = FormatConverter(filtered_ali)
clustal_align = converter.to_clustal()
print clustal_align

----------------------------------------------------------------------

The alignment is not generated, but I get the following error messages:

----------------------------------------------------------------------

  File "./fssp_example.py", line 30, in ?
    filtered_ali = FSSPTools.mult_align(filtered_sum, filtered_alignment)
  File "/usr/lib/python2.0/site-packages/Bio/FSSP/FSSPTools.py", line 22, in
mult_align
    for j in align_dict.abs(1).pos_align_dict.keys():
  File "/usr/lib/python2.0/site-packages/Bio/FSSP/__init__.py", line 168, in abs
    return self[self.abs_res_dict[num]]
KeyError: 1

----------------------------------------------------------------------

Does anybody have a clue what's going wrong? I'd be greatful for any suggestions.

Best wishes,

Shaheen

P.S.: For most of the other fssp database files I tried, the above script seems
to work and a clustalw alignment is generated and printed.

-- 
Shaheen Ahmed
Department of Biochemistry
University of Zuerich
Winterthurerstrasse 190
8057 Zuerich (Switzerland)

tel: ++41 1 635 55 68
mailto:ahmed at bioc.unizh.ch



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