1 / 14

EBI Web Services

EBI Web Services. Teresa Miyar EMBL-EBI External Services Group. jobid. run(params, data). getResults (jobid). checkStatus (jobid). poll (jobid, type). results available. status. result file. EBI web services (analysis tools). Perl Soap Client (synchronous). #!/usr/bin/env perl

Download Presentation

EBI Web Services

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EBI Web Services Teresa Miyar EMBL-EBI External Services Group

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

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

  10. Text output

  11. XML results

  12. Documentation http://www.ebi.ac.uk/Tools/webservices

  13. 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 Stacey’s 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. Acknowledgements

More Related