[Bioperl-l] Fast BLAST parsing

Chris Fields cjfields at illinois.edu
Thu Oct 23 17:09:04 UTC 2008


Could you index the BLAST report using Bio::Index::Blast?  From the  
synopsis:

     use Bio::Index::Blast;
     my ($indexfile,$file1,$file2,$query);
     my $index = Bio::Index::Blast->new(-filename => $indexfile,
				       -write_flag => 1);
     $index->make_index($file1,$file2);

     my $data = $index->get_stream($query);

     my $blast_report = $index->fetch_report($query);
     print "query is ", $blast_report->query, "\n";
     while ( my $result = $blast_report->next_result ) {
             print $result->algorithm, "\n";
             while ( my $hsp = $result->next_hit ) {
               print "\t name ", $hsp->name,
             }
             print "\n";
     }

I think you can index using a callback on the query name (so you can  
look up by various means).

chris


On Oct 23, 2008, at 11:22 AM, Brian Osborne wrote:

> Bioperl,
>
> I'm not familiar with the very latest and greatest in BLAST parsing,  
> perhaps you can help me here. I have a large Blast output file, it  
> has multiple results in it. I'd like to rapidly find the relevant  
> result for a given query name, I don't want to iterate over the  
> results checking for query_name() each time. How can I directly pull  
> out a result using query name?
>
>
> Thanks again,
>
> Brian O.
> --
> Brian Osborne, PhD
> BioTeam: http://bioteam.net
> email: briano at bioteam.net
> mobile: 978-317-3101
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

Christopher Fields
Postdoctoral Researcher
Lab of Dr. Marie-Claude Hofmann
College of Veterinary Medicine
University of Illinois Urbana-Champaign







More information about the Bioperl-l mailing list