[Bioperl-l] bioperl-db - Problems when trying to insert GenBank sequence into Pg BioSQL db

Chris Goddard cgoddard at flmnh.ufl.edu
Wed Apr 8 11:25:37 EDT 2009


I am running into problems when trying to insert a sequence object 
retrieved from GenBank into a BioSQL schema running in a Postgres 
database.  Whenever I use the 'create()' method on the sequence that has 
been made into a persistent object, the sequence isn't saved into the 
database properly.  No error messages are given, and the corresponding 
Postgres primary key sequences are incremented as if the data had been 
saved properly: the appropriate tables themselves remain empty though.

I am completely new to using the biosql-db modules, and so am probably 
missing something pretty simple.  Below you will see the basic code that 
causes the problem.

my $genbank_id = 'AYXXXXXX'

my $genDB = new Bio::DB::GenBank;
$sequence = $genDB->get_Seq_by_id($genbank_id);

my $db = Bio::DB::BioDB->new(-database => 'biosql',
                             -user => 'username',
                             -dbname => 'dbname',
                             -host => 'localhost',
                             -driver => 'Pg');

my $pobj = $db->create_persistent($sequence);
$pobj->create();

I am running the latest svn trunk versions of bioperl and bioperl-db (as 
of yesterday) and Postgres 8.3.7.  I also downloaded the NCBI taxonomy 
info using the script included in the BioSQL package, and that data 
seemed to install without error.  Any help or advice would be greatly 
appreciated.

Thanks,
Chris Goddard





More information about the Bioperl-l mailing list