[Bioperl-l] Bio::Index::BlastTable->fetch_report
Tristan Lefebure
tristan.lefebure at gmail.com
Tue Apr 6 19:33:21 UTC 2010
Hello,
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-
live//Bio/Root/Root.pm:368
STACK: Bio::Index::Abstract::get_stream /opt/src/bioperl-
live//Bio/Index/Abstract.pm:306
STACK: Bio::Index::BlastTable::fetch_report
/opt/src/bioperl-live//Bio/Index/BlastTable.pm:162
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....
Thanks!
--Tristan
More information about the Bioperl-l
mailing list