[Bioperl-l] Re: bl2seq reader chokes when no results (PR#927)
Tue, 24 Apr 2001 19:37:14 -0400
[Moving to bioperl-l from guts]
Ann Loraine writes:
> Attached please find two files (no_alignment.1 and no_alignment.2) which
> contain output from bl2seq's failed attempt to align two different
> sequence pairs.
[description and examples of horribly truncated reports]
I noticed a similar problem using the Biopython Blast parser. My problem
was with truncated blastall reports, but they looked very similar to
the files Ann provided. I thought I would just chime in really quick
and let you know my experience, in case it helps.
After starting and these for a while and trying to massage the parser
into dealing with them, what I ended up doing was giving up and using
an ErrorParser class that could be run "on-top" of the regular
parser. The ErrorParser would just make calls to the parser for each
report in a big file, but would be able to recover in case of an error
like this. In the Biopython case, I also added the ability to return
the raw reports that fail to parse (I just used this to diagnose the
problem reports "by hand" and see which blasts had failed).
My rationale behind doing things like this was that I really don't
want to parse these bogus reports, I just don't want them to mess up
the rest of the parsing. Additionally, I also didn't want to muck
around in a working parser just to make it happy about a bad report.
I don't know if this approach will work for you all (or if it even
seems rational to you :-), but I just thought I would share.