[Biopython-dev] buglet in BLASTX parsing
Jeffrey Chang
jchang at jeffchang.com
Thu May 8 13:01:14 EDT 2003
Hey Mike,
Thanks for the report. I have submitted a fix to NCBIStandalone.py.
The fix I used is to check if the line is blank first. If it is, then
the parser does not attempt to parse the S2 line.
# not in blastx 2.2.1
# first we make sure we have additional lines to work with, if
# not then the file is done and we don't have a final S2
if not is_blank_line(uhandle.peekline(), allow_spaces=1):
read_and_call(uhandle, consumer.blast_cutoff, start='S2')
Please wait a few hours for the fix to propogate to the anonymous CVS
server at cvs.biopython.org. Let me know if there continue to be
problems!
Jeff
On Thursday, May 8, 2003, at 09:28 AM, Coleman, Michael wrote:
> Parsing by NCBIStandalone.py fails for BLASTX 2.2.5 output, due to a
> missing 'S2' line. The current code seems to assume that either an S2
> line or an immediate EOF will be hit. The 2.2.5 output cleverly
> defeats this assumption by including an extra newline before the EOF.
> :-)
>
> One solution is to change the read_and_call to an attempt, like so
>
> attempt_read_and_call(uhandle, consumer.blast_cutoff, start='S2')
>
> I'm not sure whether that's the best solution, though.
>
> Mike
>
> Mike Coleman, Scientific Programmer, +1 816 926 4419
> Stowers Institute for Biomedical Research
> 1000 E. 50th St., Kansas City, MO 64110
>
> _______________________________________________
> Biopython-dev mailing list
> Biopython-dev at biopython.org
> http://biopython.org/mailman/listinfo/biopython-dev
More information about the Biopython-dev
mailing list