Permalink
Browse files

Fix for hmmer2-text indexer

One bug: incorrect query start detection
  • Loading branch information...
1 parent 3ceed8f commit 55929323b92bd4806b77492d16a2d90ac308dcb3 @bow bow committed Dec 9, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Bio/SearchIO/HmmerIO/hmmer2_text.py
@@ -292,7 +292,7 @@ class Hmmer2TextIndexer(_BaseHmmerTextIndexer):
"""Indexer for hmmer2-text format."""
_parser = Hmmer2TextParser
- qresult_start = _as_bytes('Query ')
+ qresult_start = _as_bytes('Query')
# qresults_ends for hmmpfam and hmmsearch
# need to anticipate both since hmmsearch have different query end mark
qresult_end = _as_bytes('//')
@@ -301,7 +301,7 @@ def __iter__(self):
handle = self._handle
handle.seek(0)
start_offset = handle.tell()
- regex_id = re.compile(_as_bytes(r'Query (?:sequence|HMM):\s*(.*)'))
+ regex_id = re.compile(_as_bytes(r'Query\s*(?:sequence|HMM)?:\s*(.*)'))
# determine flag for hmmsearch
is_hmmsearch = False

0 comments on commit 5592932

Please sign in to comment.