NAME

CompBio::DB - Methods for accessing data stored acording to the CompBio base schema.


SYNOPSIS

  use CompBio::DB;
  my $cbdb = CompBio::DB->new({host => "foo.bar.edu");
  my $AR_defs = $cbdb->get_annotation([keys %seqs]);

Example code for parsing the return for a simple print:

 my $AR_result = $cbdb->get_aa_seq(\@id_list);
 foreach my $AR_row (@$AR_result) {
    next unless @$AR_row;
    print join("\t",@$AR_row) , "\n";
 } # return list


DESCRIPTION

This module and the related database schemas where developed to be used with a MySQL server. Although I would certainly prefer it to be portable, that was not a priority at this time. However, I expect the manual alterations that may be necisary to use this module should be very resonable for someone sufficiently familiar with the new target database server, and I would be happy to collaborate with anyone who wants to work on this!

Most of the methods in this database fetch a type of data from a given id or list of ids. Unless otherwise stated for a specific method, only two arguments are ever used; the id or an array reference to a list of ids, and a hash reference containing any optional arguments. The request will be made against the default database defined when the CompBio::DB object was created, but most methods accept a ``database'' option to use a different database on the same server.

All methods that return query results return a reference to a 2D array. See the documentaion for specific methods for the order of returned fields.

EXPORT

db_help

db_help

Call to run perldoc on CompBio::DB. Uses exec to launch perldoc, so should be last ditch effort in place of die, perhaps when caller can't negotiate proper usage and will fail regardless.

new

Creates the CompBio::DB object. This requires succesfully connecting to the default database. There are no required arguments. Below are the optional parameters. Defaults may be changed by setting them in environment variables, such as COMPBIO_DBUSER, or by altering the defaults in CompBio.conf.

OPTIONS:

get_aa_seq

Returns the peptide sequence for the supplied id(s).

OPTIONS:

gen_get_annotation

OPTIONS:

gen_get_cds

OPTIONS:

method

stub method pod

OPTIONS:


HISTORY

  1. 01
    Original version; created by h2xs 1.20 with options
      -AXC -n CompBio::DB

  2. 2 Sun Jun 16 23:08:45 EDT 2002
    Stable base code. Two internal functions for getting results from database for a given query. Could be one but avoids looping for single ids. Handles multiple possible row returns for single ids. Three working get methods passed basic tests. Most of the parts of the methods that were always the same are now in AUTOLOAD, which calls an internal method to generate the appropriate SQL statement.


TO DO

All basic optional parameters that effect building the should be defined now, at least as much as possible, so that the stub for new methods can be fairly complete and stable.

Fix case discrepencies between CompBio ID table and actual database names.

How to handle using suffixes, in search and returns.

A seperate README is needed on creating the databases!


COPYRIGHT

Developed at the BioMolecular Engineering Research Center at Boston University under the NHLBI's Programs for Genomic Applications grant.

Copyright Sean Quinlan, Trustees of Boston University 2000-2002.

All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


AUTHOR

Sean Quinlan, seanq@molbio.mgh.harvard.edu

Please email me with any changes you make or suggestions for changes/additions. Latest versions are available through SourceForge http://sourceforge.net/projects/compbio/, or you can get the latest release version on the CPAN http://www.cpan.org/authors/id/S/SE/SEANQ/. Thank you!


SEE ALSO

perl(1), CompBio.