biopython/biopython — pull request #111 by bow (2012-12-05 06:44:31+00:00)
Title: Patch searchio raw string indexing

This pull request fixes the recent issues on raw string equality testing for `Bio.SearchIO` indexing.

It turns out it was caused by three separate issues:

* In `blast-tab`, it was caused by a filler text that adds extra length to the raw query results string, so I adjusted the parser & indexer not to parse the filler text.

* In `hmmer3-tab` and `hmmer3-domtab`, it was caused by an incorrect text length calculation. The length is only used in `Bio.SearchIO.index_db`, so the error only shows up when `index_db` is used. Here, I fixed the calculation.

* In `hmmer3-text`, it was caused by the way the parser works. The parser needs information from the preamble text, which is always read from the source file. For now, I decided to skip text length calculation and let `index_db` use the indexer's `get_raw`, just like in `index`.

Also, I've changed the `check_raw` test so that any text inequality will result in a test failure.