[BioSQL-l] Error retrieving sequence from BioSQL

Seth Johnson johnson.biotech at gmail.com
Wed Sep 27 17:39:05 UTC 2006


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



More information about the BioSQL-l mailing list