[Bioperl-l] How to retrieve a persistent object by bioperl-db?

zhihuali lzhtom at hotmail.com
Thu Dec 6 23:25:42 EST 2007

Hi netters,
I've installed BioSQL and bioperl-db, and successfully created and stored a persistent object:
use strict;use warnings;use Bio::Seq;use Bio::DB::BioDB;
my $dbadp=Bio::DB::BioDB->new(-database=>'biosql',                             -user=>'annoymous',                             -dbname=>'bioseqdb');
my $seqobj=Bio::Seq->new(-accession_number=>"test",                      -id=>"test1",                      -seq=>"AGCTAGCT",                      -version=>1);my $dbobj=$dbadp->create_persistent($seqobj);$dbobj->create;$dbobj->commit;
It's successful because I found corresponding rows in the bioseqdb tables.
Now I want to retrieve the object back from the database. There's not much documents available and I've tried find_by_unique_key/primary_key but all failed. Maybe I didn't use them correctly. Could anyone give me an example as how to retrieve the stored Bio::Seq object?
Thanks a lot!
Zhihua Li
Óà Live Search ËѾ¡ÌìÏÂ×ÊѶ£¡

More information about the Bioperl-l mailing list