Skip to content
Browse files

Fix hmmer3-tab indexing raw text length calculation error

The error caused SearchIO.index_db on hmmer3-tab to return raw text in the
wrong range.
  • Loading branch information...
1 parent 6525656 commit e0548f01868658d2fdbf92142987c170e97bb406 @bow bow committed with peterjc Dec 5, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 Bio/SearchIO/HmmerIO/hmmer3_tab.py
View
5 Bio/SearchIO/HmmerIO/hmmer3_tab.py
@@ -181,10 +181,11 @@ def __iter__(self):
curr_key = list(filter(None, cols))[query_id_idx]
if curr_key != qresult_key:
+ adj_end = end_offset - len(line)
yield _bytes_to_string(qresult_key), start_offset, \
- end_offset - start_offset
+ adj_end - start_offset
qresult_key = curr_key
- start_offset = end_offset - len(line)
+ start_offset = adj_end
line = handle.readline()
if not line:

0 comments on commit e0548f0

Please sign in to comment.
Something went wrong with that request. Please try again.