[Bioperl-l] Error retrieving sequence from BioSQL

Seth Johnson johnson.biotech at gmail.com
Thu Sep 28 10:58:02 EDT 2006


This is under Windows, but using ActiveState Komodo 3.5 and their latest
Perl for Windows and latest BioPerl & BioPerl-db from CVS.

I actually just stumbled upon a solution.  It's described in the "Installing
Bioperl on Windows" by adding a comma after $class: in Bio::Root::Root
throw() subroutine.  Thanks for hinting me about what I run it on.

The code works now, BUT it spews whole bunch of warnings about "Subroutine
.... redefined":
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Subroutine new redefined at c:/Perl/site/lib/Bio\BioEntry.pm line 88.
Subroutine object_id redefined at c:/Perl/site/lib/Bio\BioEntry.pm line 128.
Subroutine version redefined at c:/Perl/site/lib/Bio\BioEntry.pm line 150.
Subroutine authority redefined at c:/Perl/site/lib/Bio\BioEntry.pm line 171.
Subroutine namespace redefined at c:/Perl/site/lib/Bio\BioEntry.pm line 192.
Subroutine display_name redefined at c:/Perl/site/lib/Bio\BioEntry.pm line
217.
Subroutine description redefined at c:/Perl/site/lib/Bio\BioEntry.pm line
241.
Subroutine new redefined at c:/Perl/site/lib/Bio\Root\Root.pm line 201.
Subroutine verbose redefined at c:/Perl/site/lib/Bio\Root\Root.pm line 234.
Subroutine _register_for_cleanup redefined at
c:/Perl/site/lib/Bio\Root\Root.pm line 246.
Subroutine _unregister_for_cleanup redefined at
c:/Perl/site/lib/Bio\Root\Root.pm line 256.
Subroutine _cleanup_methods redefined at c:/Perl/site/lib/Bio\Root\Root.pm
line 263.
Subroutine throw redefined at c:/Perl/site/lib/Bio\Root\Root.pm line 316.
Subroutine debug redefined at c:/Perl/site/lib/Bio\Root\Root.pm line 379.
Subroutine _load_module redefined at c:/Perl/site/lib/Bio\Root\Root.pm line
398.
Subroutine DESTROY redefined at c:/Perl/site/lib/Bio\Root\Root.pm line 426.
Subroutine new redefined at c:/Perl/site/lib/Bio\Root\RootI.pm line 117.
Subroutine _initialize redefined at c:/Perl/site/lib/Bio\Root\RootI.pm line
128.
...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

On 9/28/06, Hilmar Lapp <hlapp at gmx.net> wrote:
>
> Very odd. This is under Windows, presumably using Cygwin?
>
> The method Bio::Root::Root::throw() clearly exists, and
> PersistentObject inherits from it. The exception it was trying to
> throw has nothing to do with failure or success to find the database
> row (actually it did succeed since otherwise it wouldn't construct
> the object) but with dynamically loading a class, presumably
> Bio::DB::Persistent::Seq.
>
> Are you using the 1.5.x release of bioperl?
>
> Does anyone on the list have any experience with these sorts of
> things on Windows?
>
> (Seth, I've moved this thread to the bioperl list, since this is what
> the problem is about.)
>
>         -hilmar
>
> On Sep 27, 2006, at 1:39 PM, Seth Johnson wrote:
>
> > Hello guys,
> >
> > I successfully populated the biosql database, thanks to you.  Now, I'm
> > trying to retrieve a sequence from it following the example from
> > BOSC2003
> > slides and ran into uninformative error (at least to me it doesn't
> > mean
> > anyting).  I suspect that I'm missing something and hope you can
> > point me in
> > the right direction.  Here's my source code:
> > ----------------------------------------------------------------------
> > ---
> > #!/usr/bin/perl -w
> > use strict;
> > use warnings;
> >
> > use Bio::Seq;
> > use Bio::Seq::SeqFactory;
> > use Bio::DB::SimpleDBContext;
> > use Bio::DB::BioDB;
> >
> > my $dbc = Bio::DB::SimpleDBContext->new(
> >     -driver => 'mysql',
> >     -dbname => 'BioSQL_1',
> >     -host => '192.168.1.3',
> >     -user => 'xxxxx',
> >     -pass => 'xxxxxx'
> > );
> >
> > my $db = Bio::DB::BioDB->new(-database  => 'biosql',
> >                             -dbcontext => $dbc);
> >
> > my $seq = Bio::Seq->new(-accession_number => 'NM_014580', -
> > namespace =>
> > 'refseq_H_sapiens');
> > my $seqfact = Bio::Seq::SeqFactory->new(-type => 'Bio::Seq');
> > my $adp = $db->get_object_adaptor($seq);
> > my $dbseq = $adp->find_by_unique_key($seq, -obj_factory => $seqfact);
> >
> > my $out = Bio::SeqIO->newFh('-format' => 'EMBL');
> > print $out $dbseq;
> >
> > exit;
> > -----------------------------------------------------------------
> >
> > Just when the "find_by_unique_key" function is executed I get the
> > following
> > error:
> >
> > ================================
> > Undefined subroutine &Bio::Root::Root::throw called at
> > c:/Perl/site/lib/Bio/DB/Persistent/PersistentObject.pm line 199.
> > ================================
> >
> > The sequence does exist in the database. I checked that.  Any ideas???
> >
> > --
> > Best Regards,
> >
> >
> > Seth Johnson
> > Senior Bioinformatics Associate
> > _______________________________________________
> > BioSQL-l mailing list
> > BioSQL-l at lists.open-bio.org
> > http://lists.open-bio.org/mailman/listinfo/biosql-l
> >
>
> --
> ===========================================================
> : Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
> ===========================================================
>
>
>
>
>
>


-- 
Best Regards,


Seth Johnson
Senior Bioinformatics Associate

Ph: (202) 470-0900
Fx: (775) 251-0358


More information about the Bioperl-l mailing list