[Bioperl-l] parsing multiple blast reports

Gert Thijs gert.thijs@esat.kuleuven.ac.be
Fri, 26 Apr 2002 12:01:57 +0200


Hi,

I have a question concerning the parsing of multiple blast reports in one 
large file. I have already scanned the list and the doc files but I did not 
find an answer.
I use the program 'blastcl3' to send blast requests to the server at NCBI. 
Typically I submit a file with several sequence instead of submitting many 
requests with one sequence. The result is a large file wih many concatenated 
blast reports.
To me it seems that Bio::SearchIO is the right candidate to step through this 
file and do select the right HSPs for each query sequence.
Below is the code I use to test this approach. This script works fine for the 
first report but it stops at the end of the first report. I switched on 
verbose to see if there was a problem but no warning/error message was printed.

----
my $searchObj = new Bio::SearchIO( -format => 'blast',
                                    -file => "<$blastReport",
                                    -verbose => 1
                                   );
while ( my $result = $searchObj->next_result ){
     my $query = $result->query_name;
     print $query,"\n";
     while ( my $hit = $result->next_hit ){
         print "$hit: ",$hit->name,"|",$hit->description,"\n";
     }
}
$searchObj->close;
----


Has anyone any idea what I am missing or doing wrong?

Many thanks,
Gert



-- 
+ Gert Thijs
+
+ email: gert.thijs@esat.kuleuven.ac.be
+ homepage: http://www.esat.kuleuven.ac.be/~thijs
+
+ K.U.Leuven
+ ESAT-SISTA
+ Kasteelpark Arenberg 10
+ B-3001 Leuven-Heverlee
+ Belgium
+ Tel : +32 16 32 85 88 (new number)
+ Fax : +32 16 32 19 70