[Bioperl-l] Problem with parsing blast results

Jacob Bunk Nielsen bunk at novozymes.com
Tue Nov 29 16:46:54 UTC 2011


Hi

anastsia shapiro <uni.anastasia at gmail.com> writes:

> I'm running a script that should parse a blast results, using searchIO.
>
> Sometimes the script work fines, however sometimes it stops, and I receive
> the following error.
>
> ------------- EXCEPTION -------------
> MSG: no data for midline Query
> ------------------------------------------------------------
> STACK Bio::SearchIO::blast::next_result C:/Perl64/site/lib/Bio\SearchIO\
> blast.pm:1805
> STACK toplevel
> D:\D\uni-anastasia\project\scripts\ParsingBlastResults\ParsingBlastResults.pl:36
> -------------------------------------
> While the blast results files were received as a result of running the
> following blast command:
> blastn -task blastn -db xxxxxxxxx.txt -evalue 1e-10 -perc_identity 80 -dust
> no -num_descriptions 0  -query xxxxx.txt -out results.txt -strand plus

I don't know why this exact problem arises, but I think you should
consider using an output format that is better machine parseable, like
the XML format.

You specify XML as output format of blastn by using -m 7. When reading
the result with Bioperl you must specify =>'blastxml' for Bio::SearchIO.

That way I think you are likely to see a lot fewer problems regarding
the parsing of blast output.

If the above doesn't solve the problem you better show us the code that
fails.

Best regards

Jacob




More information about the Bioperl-l mailing list