[Biopython-dev] [Biopython - Bug #3441] (New) DSSP parser fails for some DSSP 2.1.0 output files
redmine at redmine.open-bio.org
redmine at redmine.open-bio.org
Mon Jul 15 09:30:20 UTC 2013
Issue #3441 has been reported by Ahmet Sinan Yavuz.
----------------------------------------
Bug #3441: DSSP parser fails for some DSSP 2.1.0 output files
https://redmine.open-bio.org/issues/3441
Author: Ahmet Sinan Yavuz
Status: New
Priority: High
Assignee:
Category:
Target version:
URL:
Some of the DSSP files created by mkdssp 2.1.0 starts with following header:
<pre>
==== Secondary Structure Definition by the program DSSP, CMBI version by M.L. Hekkelman/2010-10-21 ==== DATE=2013-07-15 .
REFERENCE W. KABSCH AND C.SANDER, BIOPOLYMERS 22 (1983) 2577-2637 .
.
336 1 0 0 0 TOTAL NUMBER OF RESIDUES, NUMBER OF CHAINS, NUMBER OF SS-BRIDGES(TOTAL,INTRACHAIN,INTERCHAIN) .
</pre>
and following parsing code (make_dssp_dict function, line 121, @sl[1]@ part) fails for the 3rd line in the example given above with "IndexError: list index out of range" as expected.
<pre>
try:
start = 0
keys = []
for l in handle.readlines():
sl = l.split()
if sl[1] == "RESIDUE":
# Start parsing from here
start = 1
continue
...
</pre>
Potential temp. solution:
<pre>
try:
start = 0
keys = []
for l in handle.readlines():
sl = l.split()
if len(sl) > 1:
if sl[1] == "RESIDUE":
# Start parsing from here
start = 1
continue
...
</pre>
----------------------------------------
You have received this notification because this email was added to the New Issue Alert plugin
--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here and login: http://redmine.open-bio.org
More information about the Biopython-dev
mailing list