[Bioperl-l] [BULK] Re: can't parse blast file anymore

Chris Fields cjfields at uiuc.edu
Fri May 5 20:07:53 UTC 2006


Oops!  This is what happens when I copy and paste in a hurry.

> use File::Find;
> use Bio::SearchIO;
> 
> my @dirlist = ("/home/Hubert/test");
> 
> find (\&dir, @dirlist);
> 
> sub printdir {
  ^^^^^^^^^^^

Should be: sub dir {

>     return unless /txt$/;
>     return if (-d);
>     my $parser = Bio::SearchIO->new(-file => $_,
>                                     -format => 'blast');
>     while (my $result = $parser->next_result) {
>         while (my $hit = $result->next_hit) {
>             while (my $hsp = $hit->next_hsp) {
>                 # do stuff here
>             }
>         }
>     }
> }

Hubert, if the file you are parsing looks fine (i.e. valid BLAST output),
post it and your script on Bugzilla and let us take a look.  Leave out your
password though ; >

Chris




More information about the Bioperl-l mailing list