Tiago Hori | 5 Feb 16:21 2013
Picon

Search I::O

Hi All,

I am trying to find the best putative orthologs for 44K Atlantic Salmon 
sequences, and so I need to parse 44K BLAST reports to find the best human 
hit. I am trying to learn Seach::IO, but when I try the first example on 
the HOWTO: use strict;
use Bio::SearchIO;

my $in = new Bio::SearchIO(-format => 'blast'
               -file => 'C001R047.txt');

while( my $result = $in->next_result ) {
  ## $result is a Bio::Search::Result::ResultI compliant object
  while( my $hit = $result->next_hit ) {
    ## $hit is a Bio::Search::Hit::HitI compliant object
    while( my $hsp = $hit->next_hsp ) {
      ## $hsp is a Bio::Search::HSP::HSPI compliant object
      if( $hsp->length('total') > 50 ) {
        if ( $hsp->percent_identity >= 75 ) {
          print "Query=",   $result->query_name,
            " Hit=",        $hit->name,
            " Length=",     $hsp->length('total'),
            " Percent_id=", $hsp->percent_identity, "\n";
        }
      }
    }  
  }
}

I get this error: Odd number of elements in hash assignment at 
/usr/local/share/perl/5.14.2/Bio/SearchIO.pm line 189.

I am using BioPerl version 1.6.901. Is there a format problem with the 
blast reports?

Any help would be greatly appreciated!

T.

Gmane