[Bioperl-l] BLASTing with a seqio/seq object...

Chris Fields cjfields at uiuc.edu
Thu Nov 30 12:50:03 EST 2006


Katie,

Make sure you keep the posts on the mail list, just in case I can't respond
but someone else can.

> Hi all.
> 
> I just ran the following test script:
> 
> use strict;
> use Bio::SearchIO;
> my $in = new Bio::SearchIO(-format => 'blast', 
>                             -file   => 'report.bls');
> while( my $result = $in->next_result ) {
>   while( my $hit = $result->next_hit ) {
>    while( my $hsp = $hit->next_hsp ) {
>     if( $hsp->length('total') > 100 ) {
>      if ( $hsp->percent_identity >= 75 ) {
>       print "Hit= ",       $hit->name, 
>             ",Length=",     $hsp->length('total'), 
>             ",Percent_id=", $hsp->percent_identity, "\n";
>      }
>     }
>    }
>   }
> }
> 
> and saw the following output:
> 
> ------------- EXCEPTION: Bio::Root::Exception -------------
> MSG: Could not open report.bls: No such file or directory
> STACK: Error::throw
> STACK: Bio::Root::Root::throw C:/Perl/site/lib/Bio/Root/Root.pm:350
> STACK: Bio::Root::IO::_initialize_io
> C:/Perl/site/lib/Bio/Root/IO.pm:310
> STACK: Bio::Root::IO::new C:/Perl/site/lib/Bio/Root/IO.pm:223
> STACK: Bio::SearchIO::new C:/Perl/site/lib/Bio/SearchIO.pm:145
> STACK: Bio::SearchIO::new C:/Perl/site/lib/Bio/SearchIO.pm:177
> STACK: test.pl:3
> -----------------------------------------------------------
> 
> I'm using BioPerl 1.5.2 RC2
> Perl 5.8.8 (Build 819).
> WinXP (SP2)
> 
> Thanks,
> 
> ~Katie

Is there a BLAST report file named 'report.bls' in the same directory as
your script?  That's what the error indicates.

Chris



More information about the Bioperl-l mailing list