[Bioperl-l] How to parse BLAST output - all hits of each query in new file

Tim timbourine81 at gmail.com
Wed Nov 25 12:40:52 EST 2009

Dear bioperl users,

I am a real newbie and have - maybe a very trivial - question.

I searched the mailing list archive and many howtos but I have not found
a concrete answer to my problem. So hopefully you can help me :)

Background: I use the latest Bioperl version (installed it two weeks
When I use Bio::Tools::Run::StandAloneBlast to BLAST one fasta file
including different sequences, I get a BLAST output with many queries
each having several hits / sbjcts.

My problem is how to parse *all* hits of *one* query into a single new
file. And this for all the queries I have in my BLAST output file.

Or is it better the other way round; first to make fasta files with only
single sequences inside and BLAST each file? But how can I automize that
using Bioperl?

I tried Bio::SearchIO but can only parse all queries and their
respective hits in only one file...
I think iteration is also necessary here, but I do not really know how
to include that into Bio::SearchIO.
Or do I have to use Module:Bio::Index::Blast?

I can index a file (see below), but I have no idea what comes next...

###How I index a file...

#!/usr/bin/perl -w


use Bio::Index::Fasta;

$file_name = "8_to_BLAST_two_seq_index.fasta";
$id = "48882";
$inx = Bio::Index::Fasta->new (-filename => $file_name . ".idx",
-write_flag => 1);

Hopefully, you can give me at least hints what to look for.

A big THANKS in advance!



More information about the Bioperl-l mailing list