450 likes | 580 Views
WormBase: An Update. WormBase: new datasets. SAGE tags Y2H interactions Genetic interactions Gene regulation Antibodies Systematic expression patterns Phenotypes. Bio::GMOD. A unified programming interface to Model Organism Databases. Todd W. Harris (harris@cshl.edu)
E N D
WormBase: An Update Bio::GMOD - GMOD Meeting, 5/2005, SRI
WormBase: new datasets • SAGE tags • Y2H interactions • Genetic interactions • Gene regulation • Antibodies • Systematic expression patterns • Phenotypes Bio::GMOD - GMOD Meeting, 5/2005, SRI
Bio::GMOD A unified programming interface to Model Organism Databases Todd W. Harris (harris@cshl.edu) Cold Spring Harbor Laboratory
Embryonic Bio::GMOD - GMOD Meeting, 5/2005, SRI
Outline • Rationale and objectives • Bio::GMOD tour • Examples • Limitations • How to support Bio::GMOD Bio::GMOD - GMOD Meeting, 5/2005, SRI
Strengths Weaknesses In-roads - standardized vocabularies - shared software systems - standard URLs Bio::GMOD - GMOD Meeting, 5/2005, SRI
Introducing Bio::GMOD Unified programming interface to MODs Written in the Perl programming language Available on CPAN Intended audience • researchers conducting comparative studies across MODs • Users who want to access a MOD programmatically but not be concerned about model, terminology fluctuations Bio::GMOD - GMOD Meeting, 5/2005, SRI
Design objectives 1. Insulate end users from: • fluctuations in data model • inconsistencies in vocabulary • data mining protocols 2. Frameworks for: • checking the installed version of a MOD • querying a MOD for popular features • programmatically access the standard URLs • installing / updating a MOD 3. “Let a thousand flowers bloom” • extremely flexible architecture Bio::GMOD - GMOD Meeting, 5/2005, SRI
A new era of solidarity for the MODs! Bio::GMOD - GMOD Meeting, 5/2005, SRI
Bio::GMOD Tour Bio::GMOD - GMOD Meeting, 5/2005, SRI
generic factory for Bio::GMOD::* objects • instantiates MOD adaptor object… $mod = Bio::GMOD->new(-mod => ‘WormBase’); $mod = Bio::GMOD->new(-species => ‘elegans’); # Or even… $mod = Bio::GMOD->new(-organism => ‘worm’); Bio::GMOD - GMOD Meeting, 5/2005, SRI
Methods new() Methods AUTOLOAD() • Adaptors contain default values for the selected MOD related to mining, versioning, installation • Automatically instantiated by Bio::GMOD and cached $mod = Bio::GMOD::Adaptor::WormBase->new(-new_default=> ‘foo’); Bio::GMOD - GMOD Meeting, 5/2005, SRI
Loading default values Bio::GMOD - GMOD Meeting, 5/2005, SRI
Anatomy of an adaptor package Bio::GMOD::Adaptor::WormBase; use strict; use vars qw/@ISA $AUTOLOAD/; use Bio::GMOD::Adaptor; use Bio::GMOD::Util::Rearrange; @ISA = qw/Bio::GMOD::Adaptor/; my %DEFAULTS = ( NAME => ’WormBase', LIVE_URL => 'http://www.wormbase.org', LIVE_DESCRIPTION => 'WormBase, the database of C. elegans', DEFAULTS_CGI => 'http://www.wormbase.org/db/gmod/defaults', VERSION_LIVE => 'http://www.wormbase.org/version', STANDARD_URLS_XML => 'http://www.wormbase.org/standard_urls.xml’ ); 1; Bio::GMOD - GMOD Meeting, 5/2005, SRI
Methods available_species() releases() datasets() supported_datasets() current_release() $mod = Bio::GMOD::StandardURLs->new(-mod => ‘WormBase’); print $mod->available_species; Bio::GMOD - GMOD Meeting, 5/2005, SRI
Methods fetch() search() Methods gene() protein() locus() sequence() $mod = Bio::GMOD::Query->new(-mod => ‘WormBase’); @genes = $mod->fetch(-class=>’gene’,-name=>’unc-26); Bio::GMOD - GMOD Meeting, 5/2005, SRI
Query sub gene { my ($self,@p) = @_; my ($name,@remainder) = rearrange([qw/NAME/],@p); my $adaptor = $self->adaptor; my $db = $self->_connect_to_ace; my $query = sprintf($adaptor->gene_fetch_query,$name); my @genes = $db->aql($query); my @results = _do_grep($db,'Gene',$name) unless @genes; if (@results) { @genes = map { [ $_,$_->Public_name, $_->Concise_description ] } @results; } return \@genes; } GENE_FETCH_QUERY => 'select a,a->Public_name,a->Concise_description from a in class Gene where a->Public_name="%s"'
Methods update() rsync() cvs() mirror() check_disk_space() Methods update() $mod = Bio::GMOD::Update->new(-mod => ‘WormBase’); $current_version = $mod->live_version; $mod->update(-version = $current_version); Bio::GMOD - GMOD Meeting, 5/2005, SRI
Putting it all together Bio::GMOD - GMOD Meeting, 5/2005, SRI
Examples Bio::GMOD - GMOD Meeting, 5/2005, SRI
Check Version use Bio::GMOD::CheckVersion; $mod = Bio::GMOD::CheckVersion->new(-mod=>’WormBase’); my %live = $gmod->live_version(); print map { “$_: $live{$_}\n” } keys %live; version: WS142 title: WormBase date_released: 08 May 2005 Bio::GMOD - GMOD Meeting, 5/2005, SRI
Standard URLS use Bio::GMOD::StandardURLs; $mod = Bio::GMOD::StandardURLs->new(-mod=>’WormBase’); # /genome @species = $mod->available_species(); # /genome/Binomial_name @releases = $mod->releases(-species=>’C_elegans’); # /genome/Binomial_name/release @datasets = $mod->datasets(-species=>’C_elegans’, -release=>’WS142’); @supported_datasets = $mod->supported_datasets(); $current = $mod->current_release(-species=>’C_briggsae’); Bio::GMOD - GMOD Meeting, 5/2005, SRI
Query use Bio::GMOD::Query; my $mod = shift or die “Unproductive not to provide a MOD!”; my $term = shift; my $agent = Bio::GMOD::Query->new(-mod => $mod); my @genes = $agent->fetch(-class => ‘gene’, -name => $term); print map { join(“; “,@$_),”\n” } @genes; Bio::GMOD - GMOD Meeting, 5/2005, SRI
How to support Bio::GMOD 1. Write a Bio::GMOD::Adaptor::YourMod module package Bio::GMOD::Adaptor::WormBase; use strict; use vars qw/@ISA $AUTOLOAD/; use Bio::GMOD::Adaptor; use Bio::GMOD::Util::Rearrange; @ISA = qw/Bio::GMOD::Adaptor/; my %DEFAULTS = ( NAME => ’WormBase', LIVE_URL => 'http://www.wormbase.org', LIVE_DESCRIPTION => 'WormBase, the database of C. elegans', DEFAULTS_CGI => 'http://www.wormbase.org/db/gmod/defaults', VERSION_LIVE => 'http://www.wormbase.org/db/gmod/version', STANDARD_URLS_XML => 'http://www.wormbase.org/standard_urls/standard_urls.xml’ ); ... 1; Bio::GMOD - GMOD Meeting, 5/2005, SRI
How to support Bio::GMOD 2. Add a text file (or CGI) to provide default values (optional; recommended) # WormBase Site Defaults # This page provides default values for a typical WormBase # installation. It is intended for use with Bio::GMOD.pm # NAME=WormBase # #######################################; # SERVERS ####################################### # The WormBase live server LIVE_NAME=WormBase live server LIVE_URL=http://www.wormbase.org Bio::GMOD - GMOD Meeting, 5/2005, SRI
How to support Bio::GMOD 3. Versioning: Create an XML file (or CGI) I to display version information (optional; recommended) <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mod_version SYSTEM "http://www.wormbase.org/dtd/bio-gmod/version.dtd">} <mod_version> <name>WormBase</name> <description></description> <version>WS142</version> <release_date>08 May 2005</release_date> </mod_version> Place the file on your site (e.g. http://yourmod.org/version); specify the URL as VERSION_URL in your adaptor. Bio::GMOD - GMOD Meeting, 5/2005, SRI
How to support Bio::GMOD 4. Subclass desired features Bio::GMOD - GMOD Meeting, 5/2005, SRI
How to support Bio::GMOD 5. Standard URLs: create an XML file that adheres to http://www.wormbase.org/standard_urls/dtd/standard_urls.dtd Tell scripts where to find the XML by setting the STANDARD_URLS_XML in the adaptor or the defaults file on your site. Bio::GMOD - GMOD Meeting, 5/2005, SRI
Limitations • one instance = one MOD • Possibly some WormBase centric code! • Possible name space clashes to resolve Bio::GMOD - GMOD Meeting, 5/2005, SRI
Summary - Bio::GMOD aims to be a unified API to MODs - Flexible, adaptor-based approach - Easy to support; add features on an as-needed / desired basis by subclassing Support for: - querying and fetching - checking installed version - standard URLs - installing, updating, and monitoring Call for participation: architecture? Utility? Data types? Bio::GMOD - GMOD Meeting, 5/2005, SRI
Acknowledgements Lincoln Stein, CSHL David Craig, Stanford Erich Schwarz, Caltech Nektarios Tavernakis, IMBB, Crete The WormBase Consortium Bio::GMOD - GMOD Meeting, 5/2005, SRI
Standard URLs Bio::GMOD - GMOD Meeting, 5/2005, SRI
Standard URLs Bio::GMOD - GMOD Meeting, 5/2005, SRI
Components DTD http://www.wormbase.org/standard_urls/dtd/standard_urls.dtd 2. XML http://www.wormbase.org/standard_urls/standard_urls.xml XSL Perl glue Appropriate files on your filesystem! Bio::GMOD - GMOD Meeting, 5/2005, SRI
Availability Developers: cvs -d:ext:username@cvs.sourceforge.net:/cvsroot/gmod co standard-urls or anonymously: cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/gmod login cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/gmod co standard-urls Bio::GMOD - GMOD Meeting, 5/2005, SRI