[BioPython] FSSP
Shaheen Ahmed
ahmed at bioc.unizh.ch
Wed Apr 30 17:28:09 EDT 2003
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
More information about the BioPython
mailing list