uniprot:slpi_human"}; my $jobid = $fasta_client->runFasta( SOAP::Data->name('params')->type(map=>\%params), SOAP::Data->name( content => [$data])); print $fasta_client->poll($jobid);"> uniprot:slpi_human"}; my $jobid = $fasta_client->runFasta( SOAP::Data->name('params')->type(map=>\%params), SOAP::Data->name( content => [$data])); print $fasta_client->poll($jobid);">

Presentation is loading. Please wait.

Presentation is loading. Please wait.

EBI is an Outstation of the European Molecular Biology Laboratory. Web Services Course CBS, DK. EBI Web Services Teresa Miyar EMBL-EBI External Services.

Similar presentations


Presentation on theme: "EBI is an Outstation of the European Molecular Biology Laboratory. Web Services Course CBS, DK. EBI Web Services Teresa Miyar EMBL-EBI External Services."— Presentation transcript:

1 EBI is an Outstation of the European Molecular Biology Laboratory. Web Services Course CBS, DK. EBI Web Services Teresa Miyar EMBL-EBI External Services Group

2 Web Services Course CBS, DK. EBI web services (analysis tools) jobid getResults (jobid) results available checkStatus (jobid) status run(params, data) poll (jobid, type) result file

3 Web Services Course CBS, DK. Perl Soap Client (synchronous) #!/usr/bin/env perl use SOAP::Lite; my $WSDL = 'http://www.ebi.ac.uk/Tools/webservices/wsdl/WSFasta.wsdl'; my $fasta_client = SOAP::Lite->service($WSDL); my %params=(); $params{'program'}='fasta3'; $params{'database'}='uniprot'; $params{'email'}='youremail'; $data={type=>"sequence", content=>uniprot:slpi_human"}; my $jobid = $fasta_client->runFasta( SOAP::Data->name('params')->type(map=>\%params), SOAP::Data->name( content => [$data])); print $fasta_client->poll($jobid);

4 Web Services Course CBS, DK. Perl Soap Client (asynchronous) #!/usr/bin/env perl use SOAP::Lite; my $WSDL = 'http://www.ebi.ac.uk/Tools/webservices/wsdl/WSFasta.wsdl'; my $fasta_client = SOAP::Lite->service($WSDL); my %params=(); SOAP::Lite->import(+trace => debug); $params{'program'}='fasta3'; $params{'database'}='uniprot'; $params{'email'}='teresam@ebi.ac.uk'; $params{'async'}= 1; $data={type=>"sequence", content=>"uniprot:slpi_human"}; my $jobid = $fasta_client->runFasta( SOAP::Data->name('params')->type(map=>\%params), SOAP::Data->name( content => [$data]));

5 Web Services Course CBS, DK. Perl Soap Client (asynchronous cont.) # set a loop for checking job submission status # RUNNING, NOT_FOUND, ERROR, DONE my $status = $fasta_client ->checkStatus($jobid); while ($status eq "RUNNING") { sleep 10; $status = $fasta_client-checkStatus($jobid); } # when job is done, poll for the results my $result = $fasta_client ->poll($jobid) if ($status eq "DONE") ; print $result;

6 Web Services Course CBS, DK. Perl Rest Client #!/usr/bin/env perl use LWP::UserAgent; use HTTP::Request; use HTTP::Request::Common; $URL="http://www.ebi.ac.uk/Tools/webservices/rest/submit"; my %params=(); $params{'tool'}="iprscan"; $params{'sequence'}="uniprot:slpi_human"; $params{'seqtype'}="P"; $params{'email'}=youremail"; @args=%{\%params}; $ua= LWP::UserAgent->new(); $resp = $ua->request( POST $URL, 'Content' => \@args); print $resp->content();

7 Web Services Course CBS, DK. Python Soap Client #!/usr/bin/env python import sys from SOAPpy import WSDL blast_wsdUrl='http://www.ebi.ac.uk/Tools/webservices/wsdl/WSWUBlast.wsdl' server = WSDL.Proxy(blast_wsdUrl) server.soapproxy.config.dumpSOAPOut = 1 server.soapproxy.config.dumpSOAPIn = 1 seq = """>UniProt/TrEMBL|Q8E5Q5|Q8E5Q5_STRA3 Hypothetical protein gbs0925 MKLSKRYRFWQKVIKALGVLALIATLVLVVYLYKLGILNDSNELKDLVHKYEFWGPMIFI VAQIVQIVFPVIPGGVTTVAGFLIFGPTLGFIYNYIGIIIGSVILFWLVKFYGRKFVLLF MDQKTFDKYESKLETSGYEKFFIFCMASPISPADIMVMITGLSNMSIKRFVTIIMITKPI SIIGYSYLWIYGGDILKNFLN""" blast_params = {'program':'blastp','database':'uniref90', 'email':'your@email.com', 'async':0} blast_data = [{'type':'sequence', 'content':seq}] jobid = server.runWUBlast(params=blast_params,content=blast_data) print jobid sys.stdout.flush() result = server.poll(jobid,'tooloutput') print result

8 Web Services Course CBS, DK. Python Rest Client #!/usr/bin/env python import urllib url = 'http://www.ebi.ac.uk/Tools/webservices/rest/submit' params = {} params = urllib.urlencode({'tool':'iprscan', 'sequence':'uniprot:slpi_human', 'email':'your@email.com', 'seqtype':'P'}) jobid = urllib.urlopen(url, params).read() print jobid

9 Web Services Course CBS, DK. Ensembl (Martservice) Data Retrieval (WSDbfetch) Data Retrieval (WSDbfetch) Expression Profiler Protein families, motifs and domains (WSInterProScan) Protein families, motifs and domains (WSInterProScan) Protein structure & function: (MSD API) Literature and text mining (Whatizit, CiteXplore) Literature and text mining (Whatizit, CiteXplore) Sequence homology WSWUBlast WSFasta WSMPsrch WSScanPS Wise, PromoterWise, ScanWise Sequence homology WSWUBlast WSFasta WSMPsrch WSScanPS Wise, PromoterWise, ScanWise Sequence alignment WSClustalW WSMuscle WSTCoffee Sequence alignment WSClustalW WSMuscle WSTCoffee Sequence analysis (WSEmboss) Sequence analysis (WSEmboss) Ontologies (OntologyLookup) DaliLite, Maxsprout Integr8 API Uniprot API Available Services ID mapping (Picr, Martservice) Search (EB-Eye) ChEBI API

10 Web Services Course CBS, DK. Text output

11 Web Services Course CBS, DK. XML results

12 Web Services Course CBS, DK. Documentation http://www.ebi.ac.uk/Tools/webservices

13 Web Services Course CBS, DK. Exercise Proposal Stacey, G., Koh, S., Granger, C. & Becker, J. M. (2002). Peptide transport in plants. Trends Plant Sci 7, 257-263. Reproduce the philogenetic tree from Staceys article Find in Uniprot an id for a PTR (Peptide Transporters) protein Do a Blast using Uniprot Download the sequences of the hits Align These sequences using a MSA (Muscle, Mafft, TCoffee) Generate ClustalW tree

14 Web Services Course CBS, DK. Acknowledgements


Download ppt "EBI is an Outstation of the European Molecular Biology Laboratory. Web Services Course CBS, DK. EBI Web Services Teresa Miyar EMBL-EBI External Services."

Similar presentations


Ads by Google