Bioperl: Bio::Index examples bug?

James Gilbert
Wed, 26 Apr 2000 11:08:19 +0100 (BST)

Hi Mark,

Thanks for pointing this out.  The mistake was
actually in Bio::Index::Abstract, where we shold
have doen upcast to Bio::Index::Fasta before
performing the version checks. was
also slightly out of step with the release.

I've fixed this in the bioperl-0.6 branch and in
the main trunk, and made sure that the tests will
catch this in future.  (The changes won't be
immediately visible on the public sites.)


> 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/ - works as advertised.
> scripts/ - has a problem.
> Everytime I call on an index created by, 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, 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 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,, is out of date with the
> current (and apparently good) version of Bio::Index::Abstract.  I might be able
> to make changes to, 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:
> 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:
> For info about how to (un)subscribe, where messages are archived, etc:
> ====================================================================

James G.R. Gilbert
The Sanger Centre
Wellcome Trust Genome Campus
Cambridge                        Tel: 01223 494906
CB10 1SA                         Fax: 01223 494919

=========== Bioperl Project Mailing List Message Footer =======
Project URL:
For info about how to (un)subscribe, where messages are archived, etc: