Bioperl: Bio::Index examples bug?
James Gilbert
jgrg@sanger.ac.uk
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. bpfetch.pl 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.)
James
> 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
> ====================================================================
>
James G.R. Gilbert
The Sanger Centre
Wellcome Trust Genome Campus
Hinxton
Cambridge Tel: 01223 494906
CB10 1SA Fax: 01223 494919
=========== 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
====================================================================