[Bioperl-l] generate a fasta file from the blast report

DeeGee gdorjee at hotmail.com
Mon Apr 30 16:05:45 EDT 2007


hi all,
if i have the following script working on my blast report, can anyone plz
tell me how can i generate a fasta format file of just the hits (subject)
sequence.
thanks alot.
 
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 &&
              $hsp->percent_identity >= 75 ) {
              print "Hit= ", $hit->name, 
                    ", len=",$hsp->length('total'), 
                    ", percent_id=", $hsp->percent_identity, "\n";
          }
        }  
      }
    }
-- 
View this message in context: http://www.nabble.com/generate-a-fasta-file-from-the-blast-report-tf3671549.html#a10259461
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.



More information about the Bioperl-l mailing list