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
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
Web Services Course CBS, DK. Perl Soap Client (synchronous) #!/usr/bin/env perl use SOAP::Lite; my $WSDL = ' my $fasta_client = SOAP::Lite->service($WSDL); my %params=(); $params{'program'}='fasta3'; $params{'database'}='uniprot'; $params{' '}='your '; $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);
Web Services Course CBS, DK. Perl Soap Client (asynchronous) #!/usr/bin/env perl use SOAP::Lite; my $WSDL = ' my $fasta_client = SOAP::Lite->service($WSDL); my %params=(); SOAP::Lite->import(+trace => debug); $params{'program'}='fasta3'; $params{'database'}='uniprot'; $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]));
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;
Web Services Course CBS, DK. Perl Rest Client #!/usr/bin/env perl use LWP::UserAgent; use use $URL=" my %params=(); $params{'tool'}="iprscan"; $params{'sequence'}="uniprot:slpi_human"; $params{'seqtype'}="P"; $ua= LWP::UserAgent->new(); $resp = $ua->request( POST $URL, 'Content' => print $resp->content();
Web Services Course CBS, DK. Python Soap Client #!/usr/bin/env python import sys from SOAPpy import WSDL blast_wsdUrl=' 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', '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
Web Services Course CBS, DK. Python Rest Client #!/usr/bin/env python import urllib url = ' params = {} params = urllib.urlencode({'tool':'iprscan', 'sequence':'uniprot:slpi_human', 'seqtype':'P'}) jobid = urllib.urlopen(url, params).read() print jobid
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
Web Services Course CBS, DK. Text output
Web Services Course CBS, DK. XML results
Web Services Course CBS, DK. Documentation
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, 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
Web Services Course CBS, DK. Acknowledgements