Permalink
Browse files

SearchIO hmmer3-text: HSP entries can be empty for valid hits

This should fix bug #3400 and still needs a test

Signed-off-by: Kai Blin <kai.blin@biotech.uni-tuebingen.de>
  • Loading branch information...
1 parent 1bbeb68 commit 9abb0e8875dc995723049ec3623a9e8d24daa865 Kai Blin committed with peterjc Dec 13, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 Bio/SearchIO/HmmerIO/hmmer3_text.py
@@ -220,7 +220,8 @@ def _create_hits(self, hit_attrs, qid):
# read through the hsp table header and move one more line
self._read_until(lambda line:
- line.startswith(' --- ------ ----- --------'))
+ line.startswith(' --- ------ ----- --------') or \
+ line.startswith(' [No individual domains'))
self.line = read_forward(self.handle)
# parse the hsp table for the current hit
@@ -229,6 +230,7 @@ def _create_hits(self, hit_attrs, qid):
# break out of hsp parsing if there are no hits, it's the last hsp
# or it's the start of a new hit
if self.line.startswith(' [No targets detected that satisfy') or \
+ self.line.startswith(' [No individual domains') or \
self.line.startswith('Internal pipeline statistics summary:') or \
self.line.startswith(' Alignments for each domain:') or \
self.line.startswith('>>'):

0 comments on commit 9abb0e8

Please sign in to comment.