[Bioperl-l] error parsing -m8 blast output

Arya Akmal akmala at nmrc.navy.mil
Tue May 17 10:01:43 EDT 2005


Hello-

  I'm running bioperl 1.5 on mac OSX (10.3.9). I've run into a problem 
with Parsing m8 blast output with Bio::SearchIO::blasttable. 
Specifically, the following lines:

 >use Bio::SearchIO;
 >$file='test.out';
 >$parser = new Bio::SearchIO(-file => $file, -format => 'blasttable');
 >$result = $parser->next_result;

result in the following error message:

 >Can't call method "bits" on an undefined value at 
/Library/Perl/5.8.1/Bio/Search/Hit/GenericHit.pm line 349, <GEN1> line 
2.

the blast report I'm parsing looks like:

 >b0002   b0002   100.00  820     0       0       1       820     1      
  820     0.0     1599.7
 >b0002   YE0600  82.07   820     146     1       1       820     1      
  819     0.0     1336.2
 >b0002   YPTB0602        81.95   820     147     1       1       820    
  1       819     0.0     1335.1
 >b0002   YPO0459 81.95   820     147     1       1       820     1      
  819     0.0     1335.1

note that the bitscore on line 2 is 1336.2, and is not undefined. 
However, it seems to me that $hit_object, which should contain the 
information in line 2 has not been defined for some reason. If I try to 
parse a report with only one line, then I crash on line 1, otherwise I 
always crash on line 2, as indicated in the error message above.

note, also that I can access other information in the object, depending 
on the method used. For example,

 >print $parser->result_count;

returns 1.

Also, I have no problem parsing standard blast output with  
Bio::SearchIO, and all the relevant methods seem to work fine in that 
case.
I have also tried this on a different installation of bioperl 1.5 on 
Mac OSX, and didn't run into this problem. I can't determine how that 
installation is different from mine.

I'd appreciate whatever insight anyone could offer ...

thanks.



More information about the Bioperl-l mailing list