[BioSQL-l] querying your biosql db with the bioperl-db API

Amit Indap indapa at gmail.com
Wed Aug 24 18:39:51 EDT 2005


Hi,

I added a collection of bioentries read from a set of fasta files
using a custom SeqProcessor (thanks Hilmar and Marc)

What I want to do next is do some simple queries using the Bio::DB
modules  (like retriveing sequences based on their accession numbers
or bioentry_id's)

I've been reading through the test scripts that came with the
bioperl-db code, in particular the 14query.t code.

I think I understand how the sql statements are being generated and translated. 

What I don't know how to do is connect to my biosql db and execute my queries. 

I have this code that creates a db adapter (would this be something
similiar to a DBI object?)

I read Hilmar's slides on biosql/bioperl form BOSC 2003 and understand
the concept that using the bioperld-db api you can access your biosql
schema. I'm just having a hard time understanding the necessary APIs.
I guess I could query the biosql db using DBI but that would be
defeating the whole purpose.

my $dbadp = Bio::DB::BioDB->new(
                               -database => 'biosql',
                               -user     => 'amit',
                               -dbname   =>  'test',
                               -host     => 'foo.bar.edu',
                               -port     => ****,
                               -driver   => 'mysql',
                   );

Much thanks from a biosql and bioperl newbie

Amit



--



More information about the BioSQL-l mailing list