Bioperl: Bio::Index examples bug?

Mark Dalphin mdalphin@amgen.com
Mon, 24 Apr 2000 12:23:20 -0700


Hi,

I haven't played with the Bio::Index modules much, but they look perfect for a
task at hand.  I believe I have found a bug in the examples released with
BioPerl 0.6, however.

scripts/bpindex.pl - works as advertised.

scripts/bpfetch.pl - has a problem.

Everytime I call bpfetch.pl on an index created by bpindex.pl, it fails long
before it ever tries to access the DBM file. It seems that for "local" indexes,
it first checks its "type_and_version" which calls "_version" to check that the
versions match. So far, quite nice, however, in bpfetch.pl, it does a clever
trick of calling Bio::Index::Abstract->new() to open the DBM index file and then
having the index object re-blessed into the correct type.  The problem is that
Bio::Index::Abstract->_version() throws an error, claiming that the method must
be declared by the sub-type. Unless, I badly misunderstand what is going on
here, I think bpfetch.pl is broken.

Since I needed a Fasta Index anyway, I merely replaced
Bio::Index::Abtract->new() with Bio::Index::Fasta->new() and things worked well.

SUMMARY: It appears to me that the example, bpfetch.pl, is out of date with the
current (and apparently good) version of Bio::Index::Abstract.  I might be able
to make changes to bpfetch.pl, but the original author has done a very pretty
job of coding things so before I try and submit fixes, I'll mention the bug and
perhaps the author can find a pretty solution for fixing them.

Thanks to all the authors for a very useful set of modules!

Mark

--
Mark Dalphin                          email: mdalphin@amgen.com
Mail Stop: 29-2-A                     phone: +1-805-447-4951 (work)
One Amgen Center Drive                       +1-805-375-0680 (home)
Thousand Oaks, CA 91320                 fax: +1-805-499-9955 (work)



=========== Bioperl Project Mailing List Message Footer =======
Project URL: http://bio.perl.org/
For info about how to (un)subscribe, where messages are archived, etc:
http://www.techfak.uni-bielefeld.de/bcd/Perl/Bio/vsns-bcd-perl.html
====================================================================