[Bioperl-l] Bio::Tools::Blast parsing & report generation

Brian A. Desany, Ph.D. bdesany@bcm.tmc.edu
Wed, 18 Oct 2000 15:53:48 -0500


I have a bunch of blast reports generated by using "blastall -p blastn -i
concatenated.fa ...", where the fa file has 126 query sequences. I updated
to bioperl 0.6.2 and created a script a la "Using the Static $Blast Object",
which is basically identical to the example except it takes the filename of
the report as an argument instead of from STDIN.

For completeness here is the script:

use Bio::Tools::Blast qw(:obj);

use diagnostics;
use strict;

my $file = shift;

sub process_blast {
  my $blastObj = shift;
  print $blastObj->table();
  $blastObj->destroy;
}

$Blast->parse (-parse       => 1,
               -exec_func   => \&process_blast,
               -file        => $file,
              );

It outputs a table that includes all the query sequences that matched
anything, but the error stream outputs this at the beginning:

Use of uninitialized value at
	/home/dicty1//resource//perl/lib//Bio/Tools/Blast/HSP.pm line 1058, <GEN1>
chunk 3 (#1)

The error stream also outputs some stuff when it gets to the end of the
report, which I put at the bottom of this post. The last Query entry in the
report has a name very similar to all the other query names. It doesn't
match anything, but neither do most of the other query sequences. Is there
an explanation for this? The table itself seems OK, but I don't feel
comfortable with my tools spitting out error messages. Thanks for any
assistance -
-Brian.

-------------------- WARNING --------------------
MSG: Can't determine query sequence name from BLAST report.
-------------------------------------------------
Uncaught exception from user code:

-------------------- EXCEPTION --------------------
MSG: Can't determine sequence length from BLAST report.
CONTEXT: Error in uNKNOWN CONTEXT
SCRIPT: /home/dicty1/bdesany/bin/bioblast.pl
STACK:
Bio::Tools::Blast::_set_length(2523)
Bio::Tools::Blast::_parse_header(1935)
Bio::Tools::Blast::__ANON__(1734)
Bio::Root::IOManager::read(727)
Bio::Root::Object::read(1437)
Bio::Tools::Blast::_parse_blast_stream(1588)
Bio::Tools::Blast::parse(1438)
main::/home/dicty1/bdesany/bin/bioblast.pl(16)
---------------------------------------------------
	Bio::Root::RootI::throw('Bio::Root::IOManager=HASH(0x31d474)', 'Unexpected
error during read: Uncaught exception from user code:...') called at
/home/dicty1//resource//perl/lib//Bio/Root/IOManager.pm line 738
	Bio::Root::IOManager::read('Bio::Root::IOManager=HASH(0x31d474)',
'-REC_SEP', '^J>', '-FUNC', 'CODE(0x2cda20)', '-parse', 1, '-file', ...)
called at /home/dicty1//resource//perl/lib//Bio/Root/Object.pm line 1437
	Bio::Root::Object::read('Bio::Tools::Blast=HASH(0x2c9070)', '-REC_SEP',
'^J>', '-FUNC', 'CODE(0x2cda20)', '-parse', 1, '-file', ...) called at
/home/dicty1//resource//perl/lib//Bio/Tools/Blast.pm line 1588
	Bio::Tools::Blast::_parse_blast_stream('Bio::Tools::Blast=HASH(0x2c9070)',
'-parse', 1, '-exec_func', 'CODE(0xcd1e4)', '-file',
'/home/dicty6//Assemblies//DY3322/t20b100.0010171821/i08/consed/e...')
called at /home/dicty1//resource//perl/lib//Bio/Tools/Blast.pm line 1438
	Bio::Tools::Blast::parse('Bio::Tools::Blast=HASH(0x2c9070)', '-parse', 1,
'-exec_func', 'CODE(0xcd1e4)', '-file',
'/home/dicty6//Assemblies//DY3322/t20b100.0010171821/i08/consed/e...')
called at /home/dicty1/bdesany/bin/bioblast.pl line 16