UsingTheWSInterface: Difference between revisions
imported>MichaelDondrup No edit summary |
imported>MichaelDondrup No edit summary |
||
Line 16: | Line 16: | ||
--none-- | --none-- | ||
---- /!\ '''Edit conflict - other version:''' ---- | |||
---- /!\ '''Edit conflict - your version:''' ---- | |||
---- /!\ '''End of edit conflict''' ---- | |||
o Output: | o Output: | ||
tns:[[ArrayOfString]] -- The projects | tns:[[ArrayOfString]] -- The projects | ||
Line 22: | Line 27: | ||
o Input: | o Input: | ||
- xsd:string -- The project | - xsd:string -- The project | ||
---- /!\ '''Edit conflict - other version:''' ---- | |||
o Output: | |||
tns:[[ArrayOfString]] -- The experiments | |||
* <code><nowiki>fetchAllExperimentalFactorsByExperiment()</nowiki></code> | |||
---- /!\ '''Edit conflict - your version:''' ---- | |||
o Output: | o Output: | ||
tns:[[ArrayOfString]] -- The experiments | tns:[[ArrayOfString]] -- The experiments | ||
* <code><nowiki>fetchAllExperimentalFactorsByExperiment()</nowiki></code> | * <code><nowiki>fetchAllExperimentalFactorsByExperiment()</nowiki></code> | ||
---- /!\ '''End of edit conflict''' ---- | |||
o Gets all factors associated with the given experiment in the given project. | o Gets all factors associated with the given experiment in the given project. | ||
o Input: | o Input: | ||
Line 31: | Line 46: | ||
- xsd:string -- The experiment | - xsd:string -- The experiment | ||
---- /!\ '''Edit conflict - other version:''' ---- | |||
o Output: | |||
tns:[[ArrayOfString]] -- The factors | |||
* <code><nowiki>fetchAllExperimentalFactorValuesByFactorAndExperiment()</nowiki></code> | |||
---- /!\ '''Edit conflict - your version:''' ---- | |||
o Output: | o Output: | ||
tns:[[ArrayOfString]] -- The factors | tns:[[ArrayOfString]] -- The factors | ||
* <code><nowiki>fetchAllExperimentalFactorValuesByFactorAndExperiment()</nowiki></code> | * <code><nowiki>fetchAllExperimentalFactorValuesByFactorAndExperiment()</nowiki></code> | ||
---- /!\ '''End of edit conflict''' ---- | |||
o Gets all factor values for given project, experiment and factor. | o Gets all factor values for given project, experiment and factor. | ||
o Input: | o Input: | ||
Line 42: | Line 67: | ||
- xsd:string -- The factor | - xsd:string -- The factor | ||
---- /!\ '''Edit conflict - other version:''' ---- | |||
o Output: | |||
tns:[[ArrayOfString]] -- The factor values | |||
* <code><nowiki>fetchAllReporterByName()</nowiki></code> | |||
---- /!\ '''Edit conflict - your version:''' ---- | |||
o Output: | o Output: | ||
tns:[[ArrayOfString]] -- The factor values | tns:[[ArrayOfString]] -- The factor values | ||
* <code><nowiki>fetchAllReporterByName()</nowiki></code> | * <code><nowiki>fetchAllReporterByName()</nowiki></code> | ||
---- /!\ '''End of edit conflict''' ---- | |||
o Gets the valid reporter names for the given gene. | o Gets the valid reporter names for the given gene. | ||
o Input: | o Input: | ||
Line 53: | Line 88: | ||
- xsd:string -- The gene name | - xsd:string -- The gene name | ||
---- /!\ '''Edit conflict - other version:''' ---- | |||
o Output: | o Output: | ||
tns:[[ArrayOfString]] -- The valid reporter names | tns:[[ArrayOfString]] -- The valid reporter names | ||
* <code><nowiki>fetchLatestSignificantMeanM1WithBestQualityByExperimentAndReporterAndFactorAndFactorValue()</nowiki></code> | * <code><nowiki>fetchLatestSignificantMeanM1WithBestQualityByExperimentAndReporterAndFactorAndFactorValue()</nowiki></code> | ||
---- /!\ '''Edit conflict - your version:''' ---- | |||
o Output: | |||
tns:[[ArrayOfString]] -- The valid reporter names | |||
* <code><nowiki>fetchLatestSignificantMeanM1WithBestQualityByExperimentAndReporterAndFactorAndFactorValue()</nowiki></code> | |||
---- /!\ '''End of edit conflict''' ---- | |||
o Gets the latest significant mean expression value of best quality for the given project, experiment, reporter, factor, and factor value. | o Gets the latest significant mean expression value of best quality for the given project, experiment, reporter, factor, and factor value. | ||
o Input: | o Input: | ||
- xsd:string -- The project | - xsd:string -- The project | ||
---- /!\ '''Edit conflict - other version:''' ---- | |||
- xsd:string -- The experiment | - xsd:string -- The experiment | ||
Line 72: | Line 119: | ||
xsd:double -- The M-value | xsd:double -- The M-value | ||
* <code><nowiki>fetchMultipleMvalues()</nowiki></code> | * <code><nowiki>fetchMultipleMvalues()</nowiki></code> | ||
---- /!\ '''Edit conflict - your version:''' ---- | |||
- xsd:string -- The experiment | |||
- xsd:string -- The reporter | |||
- xsd:string -- The factor | |||
- xsd:string -- The factor value | |||
o Output: | |||
xsd:double -- The M-value | |||
* <code><nowiki>fetchMultipleMvalues()</nowiki></code> | |||
---- /!\ '''End of edit conflict''' ---- | |||
o Gets the latest significant mean expression as above but can handle a list of reporters. | o Gets the latest significant mean expression as above but can handle a list of reporters. | ||
o Input: | o Input: | ||
- xsd:string -- The project | - xsd:string -- The project | ||
---- /!\ '''Edit conflict - other version:''' ---- | |||
- xsd:string -- The experiment | |||
- Array of xsd:string -- The list of reporters | |||
- xsd:string -- The factor | |||
- xsd:string -- The factor value | |||
---- /!\ '''Edit conflict - your version:''' ---- | |||
- xsd:string -- The experiment | - xsd:string -- The experiment | ||
Line 84: | Line 159: | ||
- xsd:string -- The factor value | - xsd:string -- The factor value | ||
---- /!\ '''End of edit conflict''' ---- | |||
o Output: | o Output: | ||
Array of [[GeneMvalueStruct]] -- A list of GeneIDs and Mvalues | Array of [[GeneMvalueStruct]] -- A list of GeneIDs and Mvalues |
Revision as of 16:39, 11 July 2008
Using TheWeb-Services Interface
Synopsis
Web-services allow for interchange of structured data via the internet. EMMA provides a SOAP-based web-service layer to query for expression data.
Available Methods
EMMA WSDL location: https://www.cebitec.uni-bielefeld.de/groups/brf/software/emma/web_service_emma.wsdl Methods:
fetchAllProjects()
o Gets all available EMMA projects. o Input: --none--
/!\ Edit conflict - other version: ----
/!\ Edit conflict - your version: ----
/!\ End of edit conflict ----
o Output: tns:ArrayOfString -- The projects
fetchAllExperiments()
o Gets all experminents in the given project. o Input: - xsd:string -- The project
/!\ Edit conflict - other version: ----
o Output: tns:ArrayOfString -- The experiments
fetchAllExperimentalFactorsByExperiment()
/!\ Edit conflict - your version: ----
o Output: tns:ArrayOfString -- The experiments
fetchAllExperimentalFactorsByExperiment()
/!\ End of edit conflict ----
o Gets all factors associated with the given experiment in the given project. o Input: - xsd:string -- The project
- xsd:string -- The experiment
/!\ Edit conflict - other version: ----
o Output: tns:ArrayOfString -- The factors
fetchAllExperimentalFactorValuesByFactorAndExperiment()
/!\ Edit conflict - your version: ----
o Output: tns:ArrayOfString -- The factors
fetchAllExperimentalFactorValuesByFactorAndExperiment()
/!\ End of edit conflict ----
o Gets all factor values for given project, experiment and factor. o Input: - xsd:string -- The project
- xsd:string -- The experiment
- xsd:string -- The factor
/!\ Edit conflict - other version: ----
o Output: tns:ArrayOfString -- The factor values
fetchAllReporterByName()
/!\ Edit conflict - your version: ----
o Output: tns:ArrayOfString -- The factor values
fetchAllReporterByName()
/!\ End of edit conflict ----
o Gets the valid reporter names for the given gene. o Input: - xsd:string -- The project
- xsd:string -- The experiment
- xsd:string -- The gene name
/!\ Edit conflict - other version: ----
o Output: tns:ArrayOfString -- The valid reporter names
fetchLatestSignificantMeanM1WithBestQualityByExperimentAndReporterAndFactorAndFactorValue()
/!\ Edit conflict - your version: ----
o Output: tns:ArrayOfString -- The valid reporter names
fetchLatestSignificantMeanM1WithBestQualityByExperimentAndReporterAndFactorAndFactorValue()
/!\ End of edit conflict ----
o Gets the latest significant mean expression value of best quality for the given project, experiment, reporter, factor, and factor value. o Input: - xsd:string -- The project
/!\ Edit conflict - other version: ----
- xsd:string -- The experiment
- xsd:string -- The reporter
- xsd:string -- The factor
- xsd:string -- The factor value
o Output: xsd:double -- The M-value
fetchMultipleMvalues()
/!\ Edit conflict - your version: ----
- xsd:string -- The experiment
- xsd:string -- The reporter
- xsd:string -- The factor
- xsd:string -- The factor value
o Output: xsd:double -- The M-value
fetchMultipleMvalues()
/!\ End of edit conflict ----
o Gets the latest significant mean expression as above but can handle a list of reporters. o Input: - xsd:string -- The project
/!\ Edit conflict - other version: ----
- xsd:string -- The experiment
- Array of xsd:string -- The list of reporters
- xsd:string -- The factor
- xsd:string -- The factor value
/!\ Edit conflict - your version: ----
- xsd:string -- The experiment
- Array of xsd:string -- The list of reporters
- xsd:string -- The factor
- xsd:string -- The factor value
/!\ End of edit conflict ----
o Output: Array of GeneMvalueStruct -- A list of GeneIDs and Mvalues
Sample Perl-client
Have a look at the a very simple :-) SOAP::Lite client written in perl.
#!/usr/bin/env perl use strict; use warnings; use SOAP::Lite; use Data::Dumper; my $soap = SOAP::Lite-> service('https://www.cebitec.uni-bielefeld.de/groups/brf/software/emma/web_service_emma.wsdl'); print Dumper $soap->fetchAllProjects(); print Dumper $soap->fetchAllExperiments('EMMA2.Coryne-Center'); print Dumper $soap->fetchAllReporterByName('EMMA2.Coryne-Center', 'GlucoseAcetat', "cg0001"); print Dumper $soap-> fetchAllExperimentalFactorsByExperiment ('EMMA2.Coryne-Center','GlucoseAcetat'); print Dumper $soap-> fetchAllExperimentalFactorValuesByFactorAndExperiment ('EMMA2.Coryne-Center','GlucoseAcetat','Carbon Source'); print Dumper $soap->fetchMultipleMvalues('EMMA2.Coryne-Center', 'GlucoseAcetat',['R:cg0001', 'R:cg0012'], 'Carbon Source', 'Acetat.Glucose');
Here is a more sophisticated client, that can produce a heatmap web-page for some genes of interest:
#!/usr/bin/env perl use strict; use Getopt::Std; use SOAP::Lite; use Data::Dumper; use CGI qw/:standard/; my $soap = SOAP::Lite-> service('https://www.cebitec.uni-bielefeld.de/groups/brf/software/emma/web_service_emma.wsdl'); my @vals = (); my $min = my $max = 0; print "<html><head></head><body><table><tr><th>Gene name</th><th>WT</th><th>Delta hspR (cg3097)</th></tr>"; foreach (('0001'..'0020')) { #print "cg$_"; my $reps = $soap->fetchAllReporterByName('EMMA2:Coryne','Heat Shock',"cg$_"); next unless ref ($reps) and scalar @$reps; my $wt = $soap->fetchLatestSignificantMeanM1WithBestQualityByExperimentAndReporterAndFactorAndFactorValue('EMMA2:Coryne','Heat Shock',$reps->[0],'Strains','WT'); my $hspr = $soap->fetchLatestSignificantMeanM1WithBestQualityByExperimentAndReporterAndFactorAndFactorValue('EMMA2:Coryne','Heat Shock',$reps->[0],'Strains','Delta hspR (cg3097)'); push @vals ,["cg$_",$wt,$hspr]; $min = $wt if $wt < $min;$min = $hspr if $hspr < $min; $max = $wt if $wt > $max; $max = $hspr if $hspr > $max; print STDERR '.'; }; foreach (@vals) { my ($v1,$v2,$v3) = (@$_); my $red1 = my $red2 = my $green1 = my $green2 = 0; if ($max > 0) { $red1 = ($v2 > 0)?100*$v2 /$max : 0; $red2 = ($v3 > 0)?100*$v3 /$max : 0; }; if ($min < 0) { $green1 = ($v2 < 0)? 100*$v2 / $min : 0; $green2 = ($v3 < 0)? 100*$v3 / $min : 0; }; print qq| <tr> <td >$v1 </td> <td style="background-color:rgb($red1%,$green1%,0%)" > <span style="color:white">$v2 </span></td> <td style="background-color:rgb($red2%,$green2%,0%)" > <span style="color:white">$v3</span> </td></tr> | ; } print "</table></body></html>\n"; __END__
And here ist the resulting output: