![Page 1: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/1.jpg)
LS4LS Linked Services for Life Science
Sebas2an Speiser, KIT, DE Ruben Verborgh, Ghent University, BE
![Page 2: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/2.jpg)
LS4LS Linked for Life Science
Linked APIs is the joint effort of independently developed approaches to align Linked Data and “func2onali2es”
APIs
![Page 3: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/3.jpg)
Agenda
• Mo2va2on • Linked Data • REST APIs • Linked APIs • Describing APIs • Working with Linked APIs • Conclusions
![Page 4: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/4.jpg)
Mo2va2ng example
• Find poten2al drugs for disease – Get disease and associated genes – Get proteins produced by the genes – Find similar proteins for which drugs exist – Output drugs
![Page 5: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/5.jpg)
Mo2va2ng example: sources • Diseases and associated genes: – OMIM -‐ Online Mendelian Inheritance in Man, hUp://www.ncbi.nlm.nih.gov/omim/
• Proteins produced by the genes – UniProt, hUp://www.uniprot.org/
• Finding similar proteins – E.g., UniProt BLAST service
• Findings drugs targe2ng given proteins – DrugBank, hUp://www.drugbank.ca/
• Good news: all sources available
![Page 6: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/6.jpg)
Automa2on by workflows
• Integra2ng the sources and services by hand? • No problem for one 2me procedure: just copy/paste from/to Web sites
• But: diseases affect mul2ple genes, drugs target mul2ple proteins, …
• Workflows formally specify the procedure using machine-‐accessible services
• Repeatable, documented, automated
![Page 7: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/7.jpg)
The details of Workflows
• Powerful tools with nice UI available,e.g. Taverna
• But: a lot of power wasted for parsing, selec2ng and transforming data to make services interoperable
• “Gluing code” wriUen again and again
![Page 8: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/8.jpg)
RDF for integra2on
• Use common data model for data and services • Take RDF! • Why not XML, JSON, CSV, … ? 1. Data and vocabulary terms iden2fied by URIs 2. Graph structure 3. Extendable vocabulary 4. Support for data and vocabulary alignment
(subClassOf, subPropertyOf, sameAs)
![Page 9: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/9.jpg)
RDF for integra2on
• Graph merging is easy
disease:D1 gene:G1
gene:G1 prot:P1
associatedGene
produces
![Page 10: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/10.jpg)
RDF for integra2on
• Graph merging is easy
disease:D1 gene:G1
prot:P1
associatedGene
produces
![Page 11: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/11.jpg)
Where should the data live?
• Many Life Science datasets available in RDF • How to work with the data? Possibility 1: load all datasets into a warehouse • Many different redundant copies of data exist • Every copy has to be kept up-‐to-‐date • Lot of storage required even for simple problems • Not every provider wants to give away all his data
![Page 12: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/12.jpg)
Where should the data live?
• Many Life Science datasets available in RDF • How to work with the data? Possibility 2: access live data over the Web • Data is always up-‐to-‐date • Only required data is taken • Pay-‐as-‐you-‐go data integra2on • Providers keeps control of their data Linked Data as a standardized way to access data
![Page 13: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/13.jpg)
Agenda
• Mo2va2on • Linked Data • REST APIs • Linked APIs • Describing APIs • Working with Linked APIs • Conclusions
![Page 14: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/14.jpg)
Linked Data
• Data resides at provider/owner • Access is given in small units • Standard way to access data given its ID (URI) • Links to other datasets containing further relevant informa2on
• Lots of data available: Linked Open Data
![Page 15: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/15.jpg)
Linked Open Data
hUp://linkeddata.org/
![Page 16: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/16.jpg)
Linked Open Data – Life Sciences
hUp://linkeddata.org/
![Page 17: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/17.jpg)
Linked Data Principles
1. Use URIs to name things; not only documents, but also people, loca2ons, concepts, etc.
2. To enable agents (human users and machine agents alike) to look up those names, use HTTP URIs
3. When someone looks up a URI we provide useful informa;on; with 'useful' in the strict sense we usually mean structured data in RDF.
4. Include links to other URIs allowing agents (machines and humans) to discover more things
h>p://www.w3.org/DesignIssues/LinkedData
![Page 18: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/18.jpg)
Principles 1&2: name things with HTTP URIs
• URIs for informa2on resources: http://www.uniprot.org http://speiserweb.de/sebastian/foaf.rdf
• URIs for instances: http://www4.wiwiss.fu-berlin.de/diseasome/resource/diseases/1021
• Prefixes for more readability: PREFIX diseasome: <http://www4.wiwiss.fu-berlin.de/diseasome/resource/diseasome/>
• URIs for classes: diseasome:diseases
• URIs for proper2es: diseasome:associatedGene
![Page 19: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/19.jpg)
Principle 3: provide RDF when URI is dereferenced • Informa2on resources are documents which can be retrieved directly
• Non-‐informa2on resources either – use local names, e.g.: http://www.w3.org/2000/01/rdf-schema#label, or
– use HTTP redirects to informa2on resources, e.g.: diseasome:diseases/1021
• Looking up an URI results in a RDF descrip2on of the iden2fied 2ng
![Page 20: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/20.jpg)
Principle 3: provide RDF when URI is dereferenced Example: HTTP GET on http://www4.wiwiss.fu-berlin.de/diseasome/ resource/diseases/1021
Redirect to: http://…/data/diseases/1021 containg: PREFIX diseasome: <http://…/diseasome/> diseasome:diseases/1021 diseasome:associatedGene diseasome:genes/ACE.
diseasome:diseases/1012 rdfs:label
“SARS, progression of”.
![Page 21: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/21.jpg)
Principle 4: include links to other URIs
• Links enable discovery of further relevant data • E.g.: diseasome:diseases/1021 diseasome:associatedGene diseasome:genes/ACE • Retrieving URI of associated gene returns descrip2on of gene with further informa2on and links
• Valuable: links crossing dataset boundaries
![Page 22: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/22.jpg)
Missing from Linked Data: APIs
• Not all data sources will be published as fully materialised data sets
• Reasons include: – Data is changing constantly (e.g. sensor data) – Data is calculated based on infinitely many inputs (e.g. similarity between two gene sequences)
– Provider does not want arbitrary access (e.g. flight 2cket prices, social networks)
![Page 23: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/23.jpg)
Agenda
• Mo2va2on • Linked Data • REST APIs • Linked APIs • Describing APIs • Working with Linked APIs • Conclusions
![Page 24: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/24.jpg)
HTML and HTTP drive the human Web.
HTTP HTML
![Page 25: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/25.jpg)
HTML and HTTP drive the human Web.
HTTP HTML
![Page 26: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/26.jpg)
HyperText Markup Language
<h1>Genes associated with Parkinson’s</h1>
<p>Associated with Parkinson’s:</p>
<ol>
<li><a href="/genes/47">Gene A</a></li>
<li><a href="/genes/80">Gene B</a></li>
<li><a href="/genes/21">Gene C</a></li>
</ol>
![Page 27: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/27.jpg)
HyperText Markup Language
<h1>Genes associated with Parkinson’s</h1>
<p>Associated with Parkinson’s:</p>
<ol>
<li><a href="/genes/47">Gene A</a></li>
<li><a href="/genes/80">Gene B</a></li>
<li><a href="/genes/21">Gene C</a></li>
</ol>
![Page 28: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/28.jpg)
HyperText Markup Language
<h1>Genes associated with Parkinson’s</h1>
<p>Associated with Parkinson’s:</p>
<ol>
<li><a href="/genes/47">Gene A</a></li>
<li><a href="/genes/80">Gene B</a></li>
<li><a href="/genes/21">Gene C</a></li>
</ol>
![Page 29: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/29.jpg)
HyperText Markup Language
<h1>Genes associated with Parkinson’s</h1>
<p>Associated with Parkinson’s:</p>
<ol>
<li><a href="/genes/47">Gene A</a></li>
<li><a href="/genes/80">Gene B</a></li>
<li><a href="/genes/21">Gene C</a></li>
</ol>
![Page 30: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/30.jpg)
HTML and HTTP drive the human Web.
HTTP HTML
![Page 31: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/31.jpg)
HyperText Transfer Protocol
• Simple model – resources
• Limited ac2ons – GET, POST, PUT, DELETE
• Extensible headers – Accept
HTML JPEG HTML
![Page 32: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/32.jpg)
HTTP works with messages.
GET /genes HTTP/1.1 HTTP/1.1 200 OK
HTTP
HTTP HTML
![Page 33: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/33.jpg)
HTTP works with messages.
HTTP
HTTP HTML
POST /genes HTTP/1.1 HTTP/1.1 200 OK
![Page 34: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/34.jpg)
This is the Web for humans.
HTML JPEG HTML
![Page 35: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/35.jpg)
This does not work for machines.
GET /genes HTTP/1.1 HTTP/1.1 200 OK
HTTP
HTTP HTML
?
![Page 36: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/36.jpg)
“Simple” Object Access Protocol
POST /GeneService.php HTTP/1.1 <?xml version="1.0"?> <soap:Envelope xmlns:soap= "http://www.w3.org/2003/05/soap-envelope"> <soap:Header> </soap:Header> <soap:Body> <m:GetGenes xmlns:m="http://www.ex.org/genes" /> </soap:Body> </soap:Envelope>
![Page 37: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/37.jpg)
Let’s try things the “simple” way.
GET /genes HTTP/1.1 HTTP/1.1 200 OK
HTTP SOAP x
HTTP SOAP y
![Page 38: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/38.jpg)
SOAP is not the Web for machines.
• SOAP is not about resources. – uses HTTP as a tunneling protocol
• SOAP is programming over the Web. – basically doing site.getGenes() – but HTTP already has verbs
![Page 39: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/39.jpg)
So suddenly, there were two Webs.
HTML JPEG HTML
HTTP SOAP
x
![Page 40: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/40.jpg)
A JavaScript revolu2on came.
• Dynamic pages require JavaScript. • JavaScript uses JSON.
JSON
JSON
JSON
![Page 41: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/41.jpg)
JSON has a tree structure.
{ "disease": "Parkinson's", "associatedGenes": [ { "id": 47, "name": "A"}, { "id": 80, "name": "B"}, { "id": 21, "name": "C"}, ] }
![Page 42: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/42.jpg)
People thought they needed APIs.
• Idea: get things in JSON. – /api/getGenes.php?diseaseId=32&format=json – /api/listDeseases.php?beginLeUer=P&format=json
• Again, this is not resource-‐oriented. – Again, it is stuff for programmers.
![Page 43: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/43.jpg)
JSON APIs have serious drawbacks.
• Every API is different. • No seman2cs inside the data. • Client need to be programmed specifically.
![Page 44: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/44.jpg)
There are s2ll two Webs.
HTML JPEG HTML
JSON
JSON
JSON
![Page 45: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/45.jpg)
And it doesn't end there.
• What if we also need seman2cs? • No problem, just create a new API.
– /diseases/parkinsons/associated-genes.html – /api/getGenes.php?diseaseId=32&format=json – /api/getGenes.php?diseaseId=32&format=rdf
RDF
![Page 46: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/46.jpg)
Now there are three Webs.
And whose are they anyway?
HTML JPEG HTML
JSON
JSON
JSON
RDF
![Page 47: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/47.jpg)
?
We need only one Web.
![Page 48: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/48.jpg)
Every new service claims to be REST. Raise your hand if you’ve heard about any of: – REST. – RESTful API. – More RESTful API. – RESTful Web service. – Representa2onal State Transfer. – RESTful prac2ces. – This is not REST. – This is REST. – REST!!!
![Page 49: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/49.jpg)
REST is just proper HTTP.
![Page 50: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/50.jpg)
Representa2onal State Transfer
• Resources are the essen2al elements. • Resources are your building blocks: – genes /genes/37 – diseases /diseases/32 – proteines /proteines/45
![Page 51: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/51.jpg)
Resources have representa2ons.
• The server cannot serve resources. – How would you send a gene across a cable?
• The server sends representa2ons. – HTML – JSON – RDF – JPEG – ...
• The client nego2ates about the representa2on.
/genes/37
![Page 52: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/52.jpg)
Humans understand text.
GET /genes/37 HTTP/1.1 Accept: text/html
HTTP/1.1 200 OK Content-type: text/html
HTTP
HTTP HTML
![Page 53: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/53.jpg)
Humans understand images.
GET /genes/37 HTTP/1.1 Accept: image/*
HTTP/1.1 200 OK Content-type: image/jpeg
HTTP
HTTP JPEG
![Page 54: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/54.jpg)
Machines interpret JSON.
GET /genes/37 HTTP/1.1 Accept: text/json
HTTP/1.1 200 OK Content-type: text/json
HTTP
HTTP JSON
![Page 55: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/55.jpg)
Machines interpret RDF.
GET /genes/37 HTTP/1.1 Accept: text/turtle
HTTP/1.1 200 OK Content-type: text/turtle
HTTP
HTTP RDF
![Page 56: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/56.jpg)
REST is driven by hyperlinks.
• Hypermedia constraint: serve representa2on and controls.
• Typed hypermedia links.
/genes/37
associatedWith /diseases/parkinsons associatedWith /diseases/dementia produces /proteines/78
![Page 57: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/57.jpg)
REST
No services. One resource. Different representa2ons with hypermedia links.
![Page 58: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/58.jpg)
Agenda
• Mo2va2on • Linked Data • REST APIs • Linked APIs • Describing APIs • Working with Linked APIs • Conclusions
![Page 59: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/59.jpg)
What can be Linked in APIs?
Descrip2ons of APIs can be exposed as Linked Data • linked from API directory • linked from schema elements to relevant APIs – e.g., property descrip2on of gene sequence could link to API
• linked from instance data – e.g., descrip2on of organism could link to database search API
![Page 60: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/60.jpg)
What can be Linked in APIs?
API calls can be given URI, and be linkable from other data sets, e.g. • descrip2on of person links to API call returning its geographic coordinates
• API descrip2on can link to another API call returning the load factor of the hos2ng server
• list of genes links for every gene to an API call returning list of gene databases that have informa2on about the gene available (two steps)
![Page 61: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/61.jpg)
What can be Linked in APIs? Output of API can contain links to • … other data sets, e.g., diseases to DBpedia concepts • … other API calls, e.g., search in other databases • … other API descrip2ons,
e.g., specialised API directory
Links help to discover APIs,
interpret their output, and integrate with data from others sources.
![Page 62: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/62.jpg)
Agenda
• Mo2va2on • Linked Data • REST APIs • Linked APIs • Describing APIs • Working with Linked APIs • Conclusions
![Page 63: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/63.jpg)
Linked API principles
• Restrict to data APIs (today) • Describe APIs as Linked Data prosumers – No grounding: just communicate RDF
• Make rela2on between input and output explicit
![Page 64: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/64.jpg)
Data APIs
• Given input, provide output • API-‐specific rela2on btw. input and output
• Example: – input gene with sequence, output: list of genes – rela2on: “have similar sequences”
Input Output
Service
rela2on
defines
![Page 65: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/65.jpg)
Linked APIs as LD Prosumers
• Linked APIs consume and produce RDF • Standard way to describe subgraphs for RDF: Basic Graph PaUerns (BGPs) as in SPARQL
Example: • Input: ?prot1 lals:proteinSequence ?seq
• Output: ?prot1 lals:similar_to ?prot2
![Page 66: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/66.jpg)
Explicit rela2on between Input and Output
• API invoca2on can be regarded as rule applica2ons: [input] => [output]
• Output contains unbound variables (not occurring in input)
• Unbound variables are bound by API • At least one bound variable in output makes rela2on between input and output explicit
Example: ?prot1 lals:proteinSequence ?seq
=> ?prot1 lals:similar_to ?prot2 bound unbound
![Page 67: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/67.jpg)
Describing API Call Construc2on
• Besides describing input, output and their rela2on, one needs to know which URIs to call
• Several possibili2es: – Constant URI to which RDF of input is sent – Conven2on how to construct URI from parameters (bindings to input paUern)
– Rule-‐based URI genera2on
![Page 68: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/68.jpg)
Concrete Linked API approaches
• Several independently developed approaches: – Linked Data Services by Sebas2an Speiser, Andreas Harth
– RESTdesc by Ruben Verborgh, Thomas Steiner – Linked Open Services by Barry Norton, Reto Krummenacher, Steffen Stadtmüller
• Currently in the process of aligning them
![Page 69: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/69.jpg)
LInked Data Services (LIDS) • Descrip2ons: – Input and output BGPs – Endpoint (base URI) – Service en2ty (a bound variable in the output BGP)
• Conven2on to create URIs for service calls: – Endpoint + parameter bindings + # + service en2ty
• Parameter binding can be LD URI for further lookup
• Dereferencing service call URI results in descrip2on of service en2ty that relates to output data
![Page 70: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/70.jpg)
LInked Data Services (LIDS) Example: Input: ?prot lals:proteinSequence ?seq Output: ?prot lals:similar_to ?prot2 Endpoint: http://localhost:8080/LALS/simProts Service en2ty: prot • Binding for ?seq = “MRVVLAALTALAART …” • Construct service call: http://…simProts?seq=MRV…#prot
• Service call URI iden2fies the protein with the given sequence
• Dereferencing the URI returns descrip2on: <http://…simProts?seq=MRV…#prot> lals:similar_to <http://…/protXYZ> .
![Page 71: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/71.jpg)
RESTdesc describes hyperlinks.
• REST APIs have hypermedia links. • Machines should browse the Web like humans. • What does it mean to follow a link? – explain to machines in RDF – using if/then contruct
resource A
resource B hypermedia link
![Page 72: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/72.jpg)
A client receives unknown links.
/proteins/53
producedBy /genes/37
producedBy /genes/54
similarTo /proteins/4
similarTo /proteins/6
hasSequenceSimilarTo /sequences/9
![Page 73: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/73.jpg)
RESTdesc describes this link.
protein A
sequence B hasSequenceSimilarTo
protein B
similarTo hasSequence
![Page 74: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/74.jpg)
RESTdesc describes this link. { ?proteinA lals:hasSequenceSimilarTo ?sequenceB. } => { _:req http:methodName "GET"; http:requestURI ?sequenceB; http:resp ?sequenceB. ?proteinA lals:similarTo _:proteinB. _:proteinB lals:hasSequence ?sequenceB. }.
![Page 75: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/75.jpg)
If you have this link... { ?proteinA lals:hasSequenceSimilarTo ?sequenceB. } => { _:req http:methodName "GET"; http:requestURI ?sequenceB; http:resp ?sequenceB. ?proteinA lals:similarTo _:proteinB. _:proteinB lals:hasSequence ?sequenceB. }.
![Page 76: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/76.jpg)
...then you can make a request... { ?proteinA lals:hasSequenceSimilarTo ?sequenceB. } => { _:req http:methodName "GET"; http:requestURI ?sequenceB; http:resp ?sequenceB. ?proteinA lals:similarTo _:proteinB. _:proteinB lals:hasSequence ?sequenceB. }.
![Page 77: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/77.jpg)
...and the response will mean this. { ?proteinA lals:hasSequenceSimilarTo ?sequenceB. } => { _:req http:methodName "GET"; http:requestURI ?sequenceB; http:resp ?sequenceB. ?proteinA lals:similarTo _:proteinB. _:proteinB lals:hasSequence ?sequenceB. }.
![Page 78: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/78.jpg)
RESTdesc: towards a shared Web.
• Humans and machines – same Web – same resources
• mul2ple representa2ons • various hypermedia links
• Explaining hypermedia links • hUp://restdesc.org/
![Page 79: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/79.jpg)
Agenda
• Mo2va2on • Linked Data • REST APIs • Linked APIs • Describing APIs • Working with Linked APIs • Conclusions
![Page 80: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/80.jpg)
Execu2ng a Workflow
• LD and LAPIs produce RDF • LAPIs consume RDF • Query for informa2on need consumes RDF • Execute workflows on triple spaces (similar to blackboard approach) – Create an empty triple space (RDF graph) – Load triples from LD lookups – Send subgraphs to services, add resul2ng triples to space
– Evaluate target query over triple space
![Page 81: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/81.jpg)
Execu2ng a Workflow
• Remember example: find poten2al drugs for disease: d:1021
• Informa2on need as SPARQL: SELECT ?diseaselabel ?druglabel WHERE { d:1021 diseasome:associatedGene ?g . ?g lals:produces_protein ?p . ?p lals:similar_to ?simprot . ?drug drugbank:target ?simprot . ?drug rdfs:label ?druglabel . d:1021 rdfs:label ?diseaselabel }
![Page 82: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/82.jpg)
Execu2ng a Workflow
• Step 1: find associated genes for d:1021 • Add to triple space: LD lookup for d:1021 d:1012 rdf:type diseasome:diseases; d:associatedGene d:genes/ACE; d:class d:Immunological; rdfs:label “SARS, progression of”;
• Lookup all associated genes, i.e., all ?g, s.t. SELECT ?g WHERE {d:1012 d:associatedGene ?g}
• i.e., lookup d:genes/ACE and add triples
![Page 83: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/83.jpg)
Execu2ng a Workflow • Step 2: find proteins produced by genes • Apply lookup to LAPI wrapping UniProt:
Input: ?gene rdf:type diseasome:genes . ?gene rdfs:label ?name Output: ?gene lals:produces ?prot . ?prot lals:sequence ?seq . Endpoint: http://…/LALS/genes Service en2ty: gene
• Service call: http://…/LALS/genes?name=ACE#gene • Adds to triple space: PREFIX : <http://…/LALS/genes?name=ACE#> . :gene lals:produces [lals:sequence “…” . :gene lals:produces [lals:sequence “…”] . …
![Page 84: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/84.jpg)
Execu2ng a Workflow • Step 3: find similar proteins • Apply lookup to LAPI searching for similar proteins
Input: ?prot lals:sequence ?seq Output: ?prot lals:similar_to ?prot2 . Endpoint: http://…/LALS/simProt Service en2ty: prot
• Service call: http://…/LALS/simProt?seq=XYZ#prot for every found protein sequence
• Adds to triple space: PREFIX : <http://…/LALS/simProt?seq=XYZ#> . :prot lals:similar_to drugbank:target20 . :prot lals:similar_to drugbank:target143 . …
![Page 85: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/85.jpg)
Execu2ng a Workflow • Step 4: find drugs for similar proteins • Output of previous service described found proteins as
DrugBank targets (URIs) • Lookup all target URIs, adds for each target to triple space: drugbank:target143 drugbank:proteinSequence “…” .
drugbank:drugs/DB00492 drugbank:target drugbank:target143 .
...
• Lookup all drug URIs
![Page 86: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/86.jpg)
Execu2ng a Workflow • Step 5: execute informa2on need query • Triple space contains informa2on about disease, associated
genes, produced and similar proteins, and applicable drugs • SELECT ?diseaselabel ?druglabel WHERE ... • Results:
?diseaselabel ?druglabel
SARS Deserpidine
SARS Captopril
SARS Enalapril
SARS …
![Page 87: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/87.jpg)
Observa2ons
• No manual connec2ng of inputs and outputs => automa2cally matched
• Selec2ng URIs for lookups could be automated => LD query processors lookup par2al bindings
• Vocabulary alignments by rules/ontologies can be integrated
![Page 88: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/88.jpg)
Agenda
• Mo2va2on • Linked Data • REST APIs • Linked APIs • Describing APIs • Working with Linked APIs • Conclusions
![Page 89: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/89.jpg)
Linked APIs the story so far …
• REST principles make APIs first-‐class Web ci2zens
• Descrip2ons enable: – Discovery of APIs – Understanding APIs – Integra2on of APIs into workflows – Invoca2on of APIs
![Page 90: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/90.jpg)
Linked APIs for Life Scien2sts
• Already a lot of Life Science LD available • Linked APIs enables dynamic data to blend in • And more: – Func2ons – Real-‐world ac2ons – …
![Page 91: LS4LS LinkedServicesforLifeScience$ - SWAT4LS · LS4LS LinkedforLifeScience$ Linked$APIs$is$the$jointeffortof$ independently$developed$approaches$to$ align$Linked$Dataand$“func2onali2es”$](https://reader035.vdocuments.net/reader035/viewer/2022071210/6020a74f66fc6067757151c1/html5/thumbnails/91.jpg)
How you can contribute
• Integrate Linked APIs in your favorite workflow tool
• Publish your API as a Linked API • Tell us about your use cases
Mailing list: [email protected]
Ruben Verborgh [email protected] – @RubenVerborgh
Sebas2an Speiser [email protected]