[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 12:30:24 EDT 2009

That was it.  I guess I just incorrectly assumed that create() did an 
auto-commit.  That was simple to fix.  Thank you!


Hilmar Lapp wrote:
> This all sounds like you aren't issuing commit. Are you sure your code 
> contains $popj->commit() and what you are looking at is *after* that 
> is executed?
> Bioperl-db is transactional, so you decide when to commit (or rollback).
>     -hilmar
> On Apr 8, 2009, at 11:25 AM, Chris Goddard wrote:
>> 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
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l

More information about the Bioperl-l mailing list