[Bioperl-l] UCSC database backend

Chris Fields cjfields at uiuc.edu
Wed Aug 9 14:41:02 UTC 2006


Sean, 

If you have your CVS account set up you could go ahead and add it in.  I
think the plan is to try and include this in the next dev release (1.5.5),
which we are trying to get out by end-Sept at the latest.  I think a few RCs
may be made beforehand, but that's really up to the pumpkin.

As RandomAccessI is already available, we could use that as a start to
implement sequence retrieval.  Other interfaces would be added over time to
round out getting data into the proper Bio* objects.

Chris

> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org [mailto:bioperl-l-
> bounces at lists.open-bio.org] On Behalf Of Sean Davis
> Sent: Wednesday, August 09, 2006 8:10 AM
> To: bioperl-l at lists.open-bio.org list
> Subject: [Bioperl-l] UCSC database backend
> 
> I have put together a variation of the database backend.  It is based on
> DBIx::Abstract and exposes a bit more of the SQL and DBI.  Since UCSC uses
> cross-database queries, it might be a better fit for the problem than an
> ORM.  It is pretty simple, but I don't know that we need much more here.
> The harder problem, as I mentioned earlier, is to determine what to
> return,
> not how to return it.  I am showing only a couple of the DBIx::Abstract
> methods here; there are a number of others for fetching data.  In
> particular, pretty much any of the fetch_* are available.
> 
> Here is the basic POD:
> 
> 
> 
> NAME
>        Bio::DB::UCSC::DB - database abstraction for UCSC
> 
> SYNOPSIS
>           use Bio::DB::UCSC::DB;
> 
>           # By default, connect to MySQL server at UCSC, hg18 database
>           my $db =  Bio::DB::UCSC::DB->new();
> 
>           if ($db->select('*','refGene')->rows) {
>               while (my $data = $db->fetchrow_hashref) {
>                   ....
>               }
>           }
> 
>           #get table database descriptions from hgcentral database
>           my $db_descriptions = $db->db_descriptions(); #arrayref of
> hashrefs
> 
>           #get full listing of tables (and attributes)
>           my $dbi_table_info = $db->dbi_table_info(); #arrayref of
> hashrefs
> 
>           #get full column information for the "tissue" table
>           my $dbi_column_info = $db->dbi_column_info('tissue'); #arrayref
> of
> hashrefs
> 
>           #get table descriptions from UCSC tableDescriptions table
>           #Still needs a bit of cleanup, but....
>           my $table_descriptions = $db->table_descriptions(); #arrayref of
> hashrefs
> 
> DESCRIPTION
>        This module provides some database abstraction via DBIx::Abstract.
> The
>        connection parameters are currently passed directly to
>        DBIx::Abstract->connect().  All the methods of DBIx::Abstract are
>        available, with the addition of a ->dbh() method to get at the DBI
>        database handle and the database introspection methods noted above.
> 
> TODO
>        A fair bit of work on the connection end.  In particular, I will
> proba-
>        bly make a "Bio::DB::SQL" class that encapsulates some methods for
>        working with SQL databases and some kind of abstraction for
> connection
>        information, making it easier to switch from local to remote
> versions
>        of a database.
> 
> See Also
>            L<DBIx::Abstract>,L<DBI>
> 
> Author
>        Sean Davis <sdavis2 at mail.nih.gov>
> 
> 
> _______________________________________________
> 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