allpy
changeset 896:6134ae1dfdae
fix error caused by applying secondary structure markup
This bug should be digged.
For some reason BioPython's DSSP failed to get secondary structure
information of a residue:
$ ./pair_cores/pair_cores.py -i test/aln1.fasta -y aaa -e True
...
('A', (' ', 51, ' '))
caused by dssp.__getitem__
author | Boris Nagaev <bnagaev@gmail.com> |
---|---|
date | Fri, 23 Sep 2011 14:10:25 +0400 |
parents | 5731e5043a71 |
children | cae08a1f7517 |
files | allpy/markups.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line diff
1.1 --- a/allpy/markups.py Fri Sep 23 14:06:43 2011 +0400 1.2 +++ b/allpy/markups.py Fri Sep 23 14:10:25 2011 +0400 1.3 @@ -202,7 +202,10 @@ 1.4 pdb_file.close() 1.5 dssp=DSSP(model, pdb_file.name, dssp='dsspcmbi') 1.6 for monomer in self.sequence: 1.7 - monomer.ss = dssp[(chain.get_id(), monomer.pdb_residue.get_id())][1] 1.8 + try: 1.9 + monomer.ss = dssp[(chain.get_id(), monomer.pdb_residue.get_id())][1] 1.10 + except: 1.11 + monomer.ss = '?' # FIXME 1.12 os.unlink(pdb_file.name) 1.13 1.14 # This MUST be the last statement in this module.