Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Tiago Hori <tiago.hori <at> gmail.com>
Subject: Search::IO example from HOWTO
Newsgroups: gmane.comp.lang.perl.bio.general
Date: Tuesday 5th February 2013 15:33:32 UTC (over 3 years ago)
Hi All,

I am trying to run tha example from the Search::IO how to use strict;
use Bio::SearchIO;

my $in = new Bio::SearchIO(-format => 'blast'
               -file => 'test.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";
        }
      }
    }  
  }
}

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

Can anybody help!

Cheers,

T.
 
CD: 3ms