WORLD Sign In Sign Out

Web Services


Content


Description

This help document describes the infrastructure for automated and remote access to data within the database. Web services are provided using common standards, such as Simple Object Access Protocol (SOAP). This enables both local and remote researchers to connect to an installation of the database and retrieve data using pre-defined methods, without needing to resort to use of a web browser. The methods that are currently available are described below.

Data can currently be retrieved by an experiment handle. An experiment handle is retrieved by an experiment identification number, or the ExptID. Currently, one can obtain the meta data for a hybridization or a public url to download raw data for an hybridization.

There are also services to retrieve all experiment handles for an experimenter, an organism, or a publication within the database. Sample scripts are included below.

Obtaining List Data

There are four methods for obtaining data from hybridizations within the database: by experimenter, by organism, by category, and by publication. In order to know what data currently exist in the database, there are three methods that allow one to list data within the database.

Obtaining An Experiment Identifier

If you know an experiment identifier (exptid) for which you would like to retrieve data than you may skip this step. If you do not already have an expeirment identifier, you may use one of the methods above to obtain a group of experiments for a particular annotaion, such as category, experimenter or publication.

Obtaining Experiment Information

Once you have an experiment identifier(s), you can obtain either the meta data for that experiment or grab the raw data via a public ftp URL.

Sample Client Script

#!/usr/bin/perl -w
use strict;
use SOAP::Lite;
##############################################
#########Get List Data from SMD #############
##############################################

##Get a hash of all organisms with public data in the database
my $organismHash = SOAP::Lite
-> uri('http://genome-www5.stanford.edu/listData')
-> proxy('http://genome-www5.stanford.edu/cgi-bin/tools/webservices/listData.pl')
-> Organism
-> result;
foreach my $organism (keys %{$organismHash}){
print "$organism\t$$organismHash{$organism}\n";
}

##Get an array of all categories with public data in the database
my $catHash = SOAP::Lite
-> uri('http://genome-www5.stanford.edu/listData')
-> proxy('http://genome-www5.stanford.edu/cgi-bin/tools/webservices/listData.pl')
-> Category
-> result;

foreach my $cat (keys %{$catHash}{
print "$cat\t$$catHash{$cat}\n";
}

##Get a hash of all publications in the database
my $publicationHash = SOAP::Lite
-> uri('http://genome-www5.stanford.edu/listData')
-> proxy('http://genome-www5.stanford.edu/cgi-bin/tools/webservices/listData.pl')
-> Publication
-> result;

foreach my $pub (keys %{$publicationHash}){
print "$pub\t$$publicationHash{$pub}\n";
}

###########################################
#######Grab an SMD experiment handle#######
###########################################

########by experimenter####################
my $exptExpter = SOAP::Lite
-> uri('http://genome-www5.stanford.edu/Experiment')
-> proxy('http://genome-www5.stanford.edu/cgi-bin/tools/webservices/exptHandle.pl')
-> ExptByExperimenter ('SPELLMAN')
-> result;

print "@{$exptExpter}\n" if defined $$exptExpter[0];

#########by organism#######################
my $exptOrg = SOAP::Lite
-> uri('http://genome-www5.stanford.edu/Experiment')
-> proxy('http://genome-www5.stanford.edu/cgi-bin/tools/webservices/exptHandle.pl')
-> ExptByOrgansim ('VC')
-> result;
print "@{$exptOrg}\n" if defined ($$exptOrg[0]);

########by category#######################
my $resCat = SOAP::Lite
-> uri('http://genome-www5.stanford.edu/Experiment')
-> proxy('http://genome-www5.stanford.edu/cgi-bin/tools/webservices/exptHandle.pl')
-> ExptCategory('Batten disease')
-> result;
#print "@{$resCat}\n" if defined ($$resCat[0]);
########by publication#######################
my $resPub = SOAP::Lite
-> uri('http://genome-www5.stanford.edu/Experiment')
-> proxy('http://genome-www5.stanford.edu/cgi-bin/tools/webservices/exptHandle.pl')
-> ExptPub('7')
-> result;
print "@{$resPub}\n" if defined ($$resCat[0]);

###########################################
####### Get Experiment Data #######
###########################################
#get meta data from an experiment
my $metaData = SOAP::Lite
-> uri('http://genome-www5.stanford.edu/Experiment')
-> proxy('http://genome-www5.stanford.edu/cgi-bin/tools/webservices/exptHandle.pl')
-> ExptMetaData (2341, 'xml')
###state the form of returned data, either 'xml' or 'hash table'
-> result;
print "$metaData\n";

#########Get Raw Data For ExptID #############

my $exptURL = SOAP::Lite
-> uri('http://genome-www5.stanford.edu/Experiment')
-> proxy('http://genome-www5.stanford.edu/cgi-bin/tools/webservices/exptHandle.pl')
-> ExptFTP (2341)
-> result;
print "$exptURL\n";

©2007-2010 Broad Institute and Stanford School of Medicine | Sponsored by The Bill & Melinda Gates Foundation Contact | Access Policies