[Bioperl-l] bitscore and rawscore for blast reports

Razi Khaja razi at genet.sickkids.on.ca
Wed Dec 15 16:20:24 EST 2004


Sorry for my previous incomplete posting ... 

Im am parsing BLASTN reports using the Bio::SearchIO system, and have run
into some problems in obtaining bit score and raw score data.

I need to be able to get the bit score and raw score for *each* of the
hsps, but HSPI provides no methods to get this data.

The HitI object provides methods raw_score() and bits() to get this data,
however these only return the raw score and bit score of the first/best hsp
in the blast report. I need this data not only for the first/best hsp but
for each of them.

Any input would be appreciated.
Thanks
Razi


==== Partial BLAST Report =====
>chrX
          Length = 153692391

 Score =  682 bits (344), Expect = 0.0
 Identities = 354/356 (99%), Gaps = 1/356 (0%)
 Strand = Plus / Minus

                                                                           
 
Query:        17 aaaatga ...
                 |||||||
Sbjct: 107395915 aaaaaga ... 

                                                                           
 .
.
.

 Score =  172 bits (87), Expect = 2e-40
 Identities = 120/131 (91%)
 Strand = Plus / Minus

                                                                           

Query: 490      ctctctctctctctct ...
                |||||||||||||||| 
Sbjct: 52902264 ctctctctctctctct ...

===== Code Snippet ===== 
#!/usr/bin/perl
use strict;
use Bio::SearchIO;
my( $blastFile ) = @ARGV;
my $searchio = new Bio::SearchIO( -file=>$blastFile, -format=>'blast' );
while( my $result = $searchio->next_result() ){
    while( my $hit = $result->next_hit() ) {
        while( my $hsp = $hit->next_hsp() ) {
             # Want to collect bit score and raw score data here
        }
    }
}



More information about the Bioperl-l mailing list