searchio.pl


#!/usr/bin/perl -w

use strict;

use Bio::SearchIO;

my $in = new Bio::SearchIO(
    -format => 'blast',
    -file   => 'bcrabl.blastp'
);

while ( my $result = $in->next_result ) {
   while ( my $hit = $result->next_hit ) {
      while ( my $hsp = $hit->next_hsp ) {
         if ( ( $hsp->evalue < 1e-20 ) && ( $hit->name =~ /BCR_/ ) ) {
             print "Query=", $result->query_name,
              " Hit=",        $hit->name,
              " Percent_id=", $hsp->percent_identity,
              "\n";
            }
        }
    }
}