[Bioperl-l] Bio::Index::BlastTable->fetch_report

Tristan Lefebure tristan.lefebure at gmail.com
Tue Apr 6 15:33:21 EDT 2010


I am fetching blast results from an indexed blast table. 
Everything works great except when a sequence shows no hit 
to anything. Because of the table format, the protein does 
not show up in the table, and when you try to fetch the 
report, you get something like that:

my $p = 'Sag4|SAL_2304';
my $inx = Bio::Index::BlastTable->new(-filename => $blastdb,
                                   -write_flag => 0);
my $blast_result = $inx->fetch_report($p);

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: Unable to find a record for Sag4|SAL_2304 in the flat 
file index
STACK: Error::throw
STACK: Bio::Root::Root::throw /opt/src/bioperl-
STACK: Bio::Index::Abstract::get_stream /opt/src/bioperl-
STACK: Bio::Index::BlastTable::fetch_report 

I think that there is not much we can do, but would it be 
possible to have fetch_report() just return an error or an 
empty result, instead of an error? Any other way to detect 
and skip sequences that have no hits would also work....



More information about the Bioperl-l mailing list