SlideShare a Scribd company logo
1 of 20
Download to read offline
Querying Bio2RDF data
Tutorial @ ICBO 2013
Tutorial Roadmap
SPARQL: The query language of the
Semantic Web
● SPARQL: SPARQL Protocol And Query
Language
● SPARQL (“sparkle”) is a W3C
recommendation that is part of the semantic
web stack
● A SPARQL query allows you to search
linked data based on the structure of the
triples it contains
● SPARQL can be used to explore the
structure of RDF graphs and to transform
linked data
Anatomy of a SPARQL query
● SPARQL queries have a regular structure
composed of the following parts:
○ Prefix declarations: Shortcuts for URIs used in the
query (e.g. rdf, rdfs, bio2rdf)
○ Dataset definition: RDF graph to query (support for
this option is SPARQL endpoint engine dependent)
○ Result clause: Data returned by the query
○ Query pattern: Graph pattern used to search the
RDF data
○ Query modifiers: Limiting, ordering, other forms of
result rearrangements
Anatomy of a SPARQL query
#comments can be included
PREFIX prefixA: <http://example.org/prefixA#>
PREFIX prefixB: <http://example.org/prefixB:>
SELECT ...
FROM <http://example.org/myDataset>
WHERE {
...
} LIMIT 10
Federated SPARQL queries over >1 endpoint
use the SERVICE keyword
PREFIX prefixA: <http://example.org/prefixA#>
PREFIX prefixB: <http://example.org/prefixB:>
SELECT ...
FROM <http://example.org/myDataset>
WHERE {
SERVICE <http://somewhere.org/sparql> {
...
}
} LIMIT 10
Four SPARQL query variants
SELECT: SQL style result set retrieval. Lets you
specify the variables you wish to retrieve from the data.
CONSTRUCT: Create a custom RDF graph based on
a query criteria. Triples can be extracted verbatim as
they exist in the queried triple store or re-constructed
to create new RDF data.
ASK: Tests whether the triplestore or graph contains
the specified statement. Returns TRUE or FALSE.
DESCRIBE: Returns all of the triples that contain a
specified resource.
EXAMPLE: SELECT
Data from Bio2RDF Gene dataset:
<http://bio2rdf.org/geneid:19> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bio2rdf.org/geneid_vocabulary:Gene> .
<http://bio2rdf.org/geneid:19> <http://bio2rdf.org/geneid_vocabulary:has_symbol> "ABCA1" .
<http://bio2rdf.org/geneid:19> <http://bio2rdf.org/geneid_vocabulary:has_description> "ATP-binding cassette, sub-family A
(ABC1), member 1" .
<http://bio2rdf.org/geneid:19> <http://bio2rdf.org/geneid_vocabulary:has_taxid> <http://bio2rdf.org/taxon:9606> .
Query: Get taxonomic identifier and description for a specific gene symbol
PREFIX gene_vocab: <http://bio2rdf.org/geneid_vocabulary:>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?gene ?geneDescription ?taxid
WHERE {
?gene gene_vocab:has_symbol "ABCA1" .
?gene gene_vocab:has_description ?geneDescription .
?gene gene_vocab:has_taxid ?taxid .
}
EXAMPLE: CONSTRUCT
Data from Bio2RDF Gene dataset:
<http://bio2rdf.org/geneid:19> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bio2rdf.org/geneid_vocabulary:Gene>
.
<http://bio2rdf.org/geneid:19> <http://bio2rdf.org/geneid_vocabulary:has_symbol> "ABCA1" .
<http://bio2rdf.org/geneid:19> <http://bio2rdf.org/geneid_vocabulary:has_description> "ATP-binding cassette, sub-family A
(ABC1), member 1" .
<http://bio2rdf.org/geneid:19> <http://bio2rdf.org/geneid_vocabulary:has_taxid> <http://bio2rdf.org/taxon:9606> .
Query: Construct dc:identifier triple for an NCBI gene from description
PREFIX dc:http://purl.org/dc/terms/
PREFIX gene_vocab: <http://bio2rdf.org/geneid_vocabulary:>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
CONSTRUCT {
?gene dc:description ?geneDescription .
} WHERE {
?gene rdf:type gene_vocabulary:Gene .
?gene gene_vocab:has_symbol "ABCA1" .
?gene gene_vocab:has_description ?geneDescription .
}
EXAMPLE: ASK
Data from Bio2RDF DrugBank dataset:
<http://bio2rdf.org/drugbank_resource:DB00072_DB00563> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http:
//bio2rdf.org/drugbank_vocabulary:Drug-Drug-Interaction .
<http://bio2rdf.org/drugbank_resource:DB00072_DB00563> <http://www.w3.org/2000/01/rdf-schema#label> "DDI between
Trastuzumab and Methotrexate - Trastuzumab may increase the risk of neutropenia and anemia. Monitor closely for signs and
symptoms of adverse events. [drugbank_resource:DB00072_DB00563]" .
<http://bio2rdf.org/drugbank:DB00072> <http://bio2rdf.org/drugbank_vocabulary:is-ddi-interactor-in> <http://bio2rdf.
org/drugbank_resource:DB00072_DB00563> .
<http://bio2rdf.org/drugbank:DB00563> <http://bio2rdf.org/drugbank_vocabulary:is-ddi-interactor-in> <http://bio2rdf.
org/drugbank_resource:DB00072_DB00563> .
Query: Is there a drug-drug interaction between trastuzumab and methotrexate?
PREFIX drugbank_vocab: <http://bio2rdf.org/drugbank_vocabulary:>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
ASK WHERE {
?ddi rdf:type drugbank_vocab:Drug-Drug-Interaction .
<http://bio2rdf.org/drugbank:DB00072> drugbank_vocab:is-ddi-interactor-in ?ddi .
<http://bio2rdf.org/drugbank:DB00563> drugbank_vocab:is-ddi-interactor-in ?ddi .
}
EXAMPLE: DESCRIBE
Data from Bio2RDF PharmGKB dataset:
<http://bio2rdf.org/pharmgkb:PA443997> rdf:type <http://bio2rdf.org/pharmgkb_vocabulary:Disease> .
<http://bio2rdf.org/pharmgkb:PA443997> rdfs:label "Ehlers-Danlos Syndrome [pharmgkb:PA443997]" .
<http://bio2rdf.org/pharmgkb:PA443997> rdfs:seeAlso <http://bio2rdf.org/mesh:0004535> .
<http://bio2rdf.org/pharmgkb:PA443997> rdfs:seeAlso <http://bio2rdf.org/umls:C0013720> .
<http://bio2rdf.org/pharmgkb:PA443997> rdfs:seeAlso <http://bio2rdf.org/snomed:3A398114001> .
<http://bio2rdf.org/pharmgkb:PA443997> owl:sameAs <http://bio2rdf.org/pharmgkb:00072f176862ae5012d717f2858fcf03> .
<http://bio2rdf.org/pharmgkb:PA443997> <http://bio2rdf.org/pharmgkb_vocabulary:name> "Ehlers-Danlos Syndrome" .
<http://bio2rdf.org/pharmgkb:PA443997> <http://bio2rdf.org/pharmgkb_vocabulary:synonym> "Cutis Elastica" .
<http://bio2rdf.org/pharmgkb:PA443997> <http://bio2rdf.org/pharmgkb_vocabulary:synonym> "Cutis elastica" .
<http://bio2rdf.org/pharmgkb:PA443997> <http://bio2rdf.org/pharmgkb_vocabulary:synonym> "Cutis hyperelastica" .
<http://bio2rdf.org/pharmgkb:PA443997> <http://bio2rdf.org/pharmgkb_vocabulary:synonym> "Danlos disease" .
<http://bio2rdf.org/pharmgkb:PA443997> <http://bio2rdf.org/pharmgkb_vocabulary:synonym> "Cutis hyperelastica
dermatorrhexis " .
<http://bio2rdf.org/pharmgkb:PA443997> void:inDataset <http://bio2rdf.org/bio2rdf_dataset:bio2rdf-pharmgkb-20121015> .
Query: Get all triples involving the PharmGKB resource for Ehlers-Danlos Syndrome
DESCRIBE <http://bio2rdf.org/pharmgkb:PA443997>
Bio2RDF summary metrics can be
used to develop SPARQL queries
● Each Bio2RDF endpoint contains summary
metrics about the dataset, including:
○ unique predicate-object links and their frequencies
○ unique predicate-literal links and their frequencies
○ unique subject type-predicate-object type links and
their frequencies
○ unique subject type-predicate-literal links and their
frequencies
● These can inform SPARQL query
development by describing the links that
exist between entities of a given type
Bio2RDF summary metrics can be
used to develop SPARQL queries
http://download.bio2rdf.org/release/2/drugbank/drugbank.html
Bio2RDF summary metrics can be
used to develop SPARQL queries
PREFIX drugbank_vocabulary: <http://bio2rdf.
org/drugbank_vocabulary:>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?ddi ?d1name
WHERE {
?ddi a drugbank_vocabulary:Drug-Drug-Interaction .
?d1 drugbank_vocabulary:ddi-interactor-in ?ddi .
?d1 rdfs:label ?d1name .
?d2 drugbank_vocabulary:ddi-interactor-in ?ddi .
?d2 rdfs:label ?d2name .
FILTER (?d1 != ?d2)
}
Results: http://bit.ly/14qGfUh
Example Bio2RDF
SPARQL queries
Bio2RDF query: Retrieve diseases
associated with the BRCA1 gene
PREFIX ctd_vocab: <http://bio2rdf.org/ctd_vocabulary:>
SELECT ?disease ?diseaseLabel
FROM <http://bio2rdf.org/ctd>
WHERE {
?assoc rdf:type ctd_vocab:Gene-Disease-Association .
?assoc ctd_vocab:gene <http://bio2rdf.org/geneid:672> .
?assoc ctd_vocab:disease ?disease .
?disease rdfs:label ?diseaseLabel .
}
Results: http://bit.ly/162NM9L
Bio2RDF federated query: Retrieve GO function
labels from BioPortal for a gene in NCBI gene
SELECT *
WHERE {
<http://bio2rdf.org/geneid:3253304> <http://bio2rdf.
org/geneid_vocabulary:function> ?goFunction .
SERVICE <http://bioportal.bio2rdf.org/sparql> {
?goFunction rdfs:label ?label .
}
}
Results: http://bit.ly/13D20SR
Bio2RDF query: Count all the biochemical
reactions in the BioModels database involved in
"protein catabolic process"
SELECT ?go ?label count(distinct ?x)
WHERE {
{
# get all the biochemical reactions specifically labelled with protein catabolic
process
?go rdfs:label ?label .
FILTER regex(?label, "^protein catabolic process")
service <http://biomodels.bio2rdf.org/sparql> {
?x <http://bio2rdf.org/biopax_vocabulary:identical-to> ?go .
?x a <http://www.biopax.org/release/biopax-level3.owl#BiochemicalReaction> .
}
} UNION {
# get all the biochemical reactions that are more specific than "protein catabolic
process"
?go rdfs:label ?label .
?go rdfs:subClassOf ?tgo OPTION (TRANSITIVE) . # get all the subclasses of the
target to term
?tgo rdfs:label ?tlabel .
FILTER regex(?tlabel, "^protein catabolic process")
service <http://biomodels.bio2rdf.org/sparql> {
?x <http://bio2rdf.org/biopax_vocabulary:identical-to> ?go .
?x a <http://www.biopax.org/release/biopax-level3.owl#BiochemicalReaction> .
}
}
}
Results: http://bit.ly/14qGWwC
Use the VOS Faceted Browser to
explore Bio2RDF data
● Explore types and attributes
● Free text search
Explore Bio2RDF data on
your own!
http://download.bio2rdf.org/release/2/release.html

More Related Content

What's hot

The Role of Metadata in Reproducible Computational Research
The Role of Metadata in Reproducible Computational ResearchThe Role of Metadata in Reproducible Computational Research
The Role of Metadata in Reproducible Computational ResearchJeremy Leipzig
 
Contributing to the Smart City Through Linked Library Data
Contributing to the Smart City Through Linked Library DataContributing to the Smart City Through Linked Library Data
Contributing to the Smart City Through Linked Library DataMarcia Zeng
 
JVM Internals - NHJUG Jan 2012
JVM Internals - NHJUG Jan 2012JVM Internals - NHJUG Jan 2012
JVM Internals - NHJUG Jan 2012Doug Hawkins
 
Jarrar: SPARQL - RDF Query Language
Jarrar: SPARQL - RDF Query LanguageJarrar: SPARQL - RDF Query Language
Jarrar: SPARQL - RDF Query LanguageMustafa Jarrar
 
SemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n BoltsSemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n BoltsRinke Hoekstra
 
Dublin Core In Practice
Dublin Core In PracticeDublin Core In Practice
Dublin Core In PracticeMarcia Zeng
 
Linked data: spreading data over the web
Linked data: spreading data over the webLinked data: spreading data over the web
Linked data: spreading data over the webshellac
 
Understanding RDF: the Resource Description Framework in Context (1999)
Understanding RDF: the Resource Description Framework in Context  (1999)Understanding RDF: the Resource Description Framework in Context  (1999)
Understanding RDF: the Resource Description Framework in Context (1999)Dan Brickley
 
Jarrar: RDF Stores -Challenges and Solutions
Jarrar: RDF Stores -Challenges and SolutionsJarrar: RDF Stores -Challenges and Solutions
Jarrar: RDF Stores -Challenges and SolutionsMustafa Jarrar
 
2010 06 ipaw_prv
2010 06 ipaw_prv2010 06 ipaw_prv
2010 06 ipaw_prvJun Zhao
 
Fine-grained Evaluation of SPARQL Endpoint Federation Systems
Fine-grained Evaluation of SPARQL Endpoint Federation SystemsFine-grained Evaluation of SPARQL Endpoint Federation Systems
Fine-grained Evaluation of SPARQL Endpoint Federation SystemsMuhammad Saleem
 
Introduction To RDF and RDFS
Introduction To RDF and RDFSIntroduction To RDF and RDFS
Introduction To RDF and RDFSNilesh Wagmare
 
Ontologies and Semantic in OpenSource projects
Ontologies and Semantic in OpenSource projectsOntologies and Semantic in OpenSource projects
Ontologies and Semantic in OpenSource projectsjgato
 
Efficient Query Answering against Dynamic RDF Databases
Efficient Query Answering against Dynamic RDF DatabasesEfficient Query Answering against Dynamic RDF Databases
Efficient Query Answering against Dynamic RDF DatabasesAlexandra Roatiș
 
Linking Open Government Data at Scale
Linking Open Government Data at Scale Linking Open Government Data at Scale
Linking Open Government Data at Scale Bernadette Hyland-Wood
 

What's hot (20)

The Role of Metadata in Reproducible Computational Research
The Role of Metadata in Reproducible Computational ResearchThe Role of Metadata in Reproducible Computational Research
The Role of Metadata in Reproducible Computational Research
 
Contributing to the Smart City Through Linked Library Data
Contributing to the Smart City Through Linked Library DataContributing to the Smart City Through Linked Library Data
Contributing to the Smart City Through Linked Library Data
 
JVM Internals - NHJUG Jan 2012
JVM Internals - NHJUG Jan 2012JVM Internals - NHJUG Jan 2012
JVM Internals - NHJUG Jan 2012
 
Querying Linked Data
Querying Linked DataQuerying Linked Data
Querying Linked Data
 
Jarrar: SPARQL - RDF Query Language
Jarrar: SPARQL - RDF Query LanguageJarrar: SPARQL - RDF Query Language
Jarrar: SPARQL - RDF Query Language
 
SemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n BoltsSemanticWeb Nuts 'n Bolts
SemanticWeb Nuts 'n Bolts
 
Dublin Core In Practice
Dublin Core In PracticeDublin Core In Practice
Dublin Core In Practice
 
Introduction to RDF
Introduction to RDFIntroduction to RDF
Introduction to RDF
 
Linked data: spreading data over the web
Linked data: spreading data over the webLinked data: spreading data over the web
Linked data: spreading data over the web
 
Understanding RDF: the Resource Description Framework in Context (1999)
Understanding RDF: the Resource Description Framework in Context  (1999)Understanding RDF: the Resource Description Framework in Context  (1999)
Understanding RDF: the Resource Description Framework in Context (1999)
 
Jarrar: RDF Stores -Challenges and Solutions
Jarrar: RDF Stores -Challenges and SolutionsJarrar: RDF Stores -Challenges and Solutions
Jarrar: RDF Stores -Challenges and Solutions
 
2010 06 ipaw_prv
2010 06 ipaw_prv2010 06 ipaw_prv
2010 06 ipaw_prv
 
Fine-grained Evaluation of SPARQL Endpoint Federation Systems
Fine-grained Evaluation of SPARQL Endpoint Federation SystemsFine-grained Evaluation of SPARQL Endpoint Federation Systems
Fine-grained Evaluation of SPARQL Endpoint Federation Systems
 
GraphDB
GraphDBGraphDB
GraphDB
 
Introduction To RDF and RDFS
Introduction To RDF and RDFSIntroduction To RDF and RDFS
Introduction To RDF and RDFS
 
Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...
Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...
Embedding Linked Data Invisibly into Web Pages: Strategies and Workflows for ...
 
Ontologies and Semantic in OpenSource projects
Ontologies and Semantic in OpenSource projectsOntologies and Semantic in OpenSource projects
Ontologies and Semantic in OpenSource projects
 
Efficient Query Answering against Dynamic RDF Databases
Efficient Query Answering against Dynamic RDF DatabasesEfficient Query Answering against Dynamic RDF Databases
Efficient Query Answering against Dynamic RDF Databases
 
FOAF
FOAFFOAF
FOAF
 
Linking Open Government Data at Scale
Linking Open Government Data at Scale Linking Open Government Data at Scale
Linking Open Government Data at Scale
 

Viewers also liked

Best practices for generating Bio2RDF linked data
Best practices for generating Bio2RDF linked dataBest practices for generating Bio2RDF linked data
Best practices for generating Bio2RDF linked dataalison.callahan
 
Bio2RDF: Towards A Mashup To Build Bioinformatics Knowledge System
Bio2RDF: Towards A Mashup To Build Bioinformatics Knowledge SystemBio2RDF: Towards A Mashup To Build Bioinformatics Knowledge System
Bio2RDF: Towards A Mashup To Build Bioinformatics Knowledge SystemFrançois Belleau
 
Physics & Chemistry
Physics & ChemistryPhysics & Chemistry
Physics & Chemistryjmarin76
 
Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?
Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?
Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?Charles Nouyrit
 
In memoriam
In memoriamIn memoriam
In memoriamjmarin76
 
Social media in a public library
Social media in a public librarySocial media in a public library
Social media in a public librarySue Lawson
 
Compa 2009 Giurus
Compa 2009 GiurusCompa 2009 Giurus
Compa 2009 Giurusgiurus
 
Evolution unit notes
Evolution unit notesEvolution unit notes
Evolution unit notesjschmied
 
TARANCUEÑA 08
TARANCUEÑA 08TARANCUEÑA 08
TARANCUEÑA 08fiep
 
TAMALE Seminar: Evaluating scientific hypotheses using Semantic Web technologies
TAMALE Seminar: Evaluating scientific hypotheses using Semantic Web technologiesTAMALE Seminar: Evaluating scientific hypotheses using Semantic Web technologies
TAMALE Seminar: Evaluating scientific hypotheses using Semantic Web technologiesalison.callahan
 
APIdays 2015 - The State of Web API Languages
APIdays 2015 - The State of Web API LanguagesAPIdays 2015 - The State of Web API Languages
APIdays 2015 - The State of Web API LanguagesJerome Louvel
 
Industrialization Powerpoint
Industrialization PowerpointIndustrialization Powerpoint
Industrialization Powerpointacrumlish
 
The Future Of Horse Racing
The Future Of Horse RacingThe Future Of Horse Racing
The Future Of Horse Racingsafc
 
Test Slideshow
Test SlideshowTest Slideshow
Test SlideshowSjoerd Fit
 

Viewers also liked (20)

Best practices for generating Bio2RDF linked data
Best practices for generating Bio2RDF linked dataBest practices for generating Bio2RDF linked data
Best practices for generating Bio2RDF linked data
 
Bio2RDF: Towards A Mashup To Build Bioinformatics Knowledge System
Bio2RDF: Towards A Mashup To Build Bioinformatics Knowledge SystemBio2RDF: Towards A Mashup To Build Bioinformatics Knowledge System
Bio2RDF: Towards A Mashup To Build Bioinformatics Knowledge System
 
Bio2RDF @ W3C HCLS2009
Bio2RDF @ W3C HCLS2009Bio2RDF @ W3C HCLS2009
Bio2RDF @ W3C HCLS2009
 
Physics & Chemistry
Physics & ChemistryPhysics & Chemistry
Physics & Chemistry
 
Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?
Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?
Ignite Paris 2009 - Is World of Warcraft the best leadership training solution?
 
In memoriam
In memoriamIn memoriam
In memoriam
 
Svagr
SvagrSvagr
Svagr
 
Social media in a public library
Social media in a public librarySocial media in a public library
Social media in a public library
 
Warren Buffet
Warren BuffetWarren Buffet
Warren Buffet
 
Compa 2009 Giurus
Compa 2009 GiurusCompa 2009 Giurus
Compa 2009 Giurus
 
Einführung in Meteor
Einführung in MeteorEinführung in Meteor
Einführung in Meteor
 
Evolution unit notes
Evolution unit notesEvolution unit notes
Evolution unit notes
 
TARANCUEÑA 08
TARANCUEÑA 08TARANCUEÑA 08
TARANCUEÑA 08
 
TAMALE Seminar: Evaluating scientific hypotheses using Semantic Web technologies
TAMALE Seminar: Evaluating scientific hypotheses using Semantic Web technologiesTAMALE Seminar: Evaluating scientific hypotheses using Semantic Web technologies
TAMALE Seminar: Evaluating scientific hypotheses using Semantic Web technologies
 
APIdays 2015 - The State of Web API Languages
APIdays 2015 - The State of Web API LanguagesAPIdays 2015 - The State of Web API Languages
APIdays 2015 - The State of Web API Languages
 
Industrialization Powerpoint
Industrialization PowerpointIndustrialization Powerpoint
Industrialization Powerpoint
 
Nilai nilai Aqidah
Nilai nilai AqidahNilai nilai Aqidah
Nilai nilai Aqidah
 
Gezinsbond
GezinsbondGezinsbond
Gezinsbond
 
The Future Of Horse Racing
The Future Of Horse RacingThe Future Of Horse Racing
The Future Of Horse Racing
 
Test Slideshow
Test SlideshowTest Slideshow
Test Slideshow
 

Similar to Querying Bio2RDF data

GDG Meets U event - Big data & Wikidata - no lies codelab
GDG Meets U event - Big data & Wikidata -  no lies codelabGDG Meets U event - Big data & Wikidata -  no lies codelab
GDG Meets U event - Big data & Wikidata - no lies codelabCAMELIA BOBAN
 
Querying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQLQuerying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQLEmanuele Della Valle
 
Presentation at the EMBL-EBI Industry RDF meeting
Presentation at the EMBL-EBI  Industry RDF meetingPresentation at the EMBL-EBI  Industry RDF meeting
Presentation at the EMBL-EBI Industry RDF meetingJohannes Keizer
 
2009 0807 Lod Gmod
2009 0807 Lod Gmod2009 0807 Lod Gmod
2009 0807 Lod GmodJun Zhao
 
Producing, publishing and consuming linked data - CSHALS 2013
Producing, publishing and consuming linked data - CSHALS 2013Producing, publishing and consuming linked data - CSHALS 2013
Producing, publishing and consuming linked data - CSHALS 2013François Belleau
 
balloon Fusion: SPARQL Rewriting Based on Unified Co-Reference Information
balloon Fusion: SPARQL Rewriting Based on  Unified Co-Reference Informationballoon Fusion: SPARQL Rewriting Based on  Unified Co-Reference Information
balloon Fusion: SPARQL Rewriting Based on Unified Co-Reference InformationKai Schlegel
 
Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02eswcsummerschool
 
Sesam4 project presentation sparql - april 2011
Sesam4   project presentation sparql - april 2011Sesam4   project presentation sparql - april 2011
Sesam4 project presentation sparql - april 2011Robert Engels
 
Sesam4 project presentation sparql - april 2011
Sesam4   project presentation sparql - april 2011Sesam4   project presentation sparql - april 2011
Sesam4 project presentation sparql - april 2011sesam4able
 
Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601David Wood
 
A Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebA Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebShamod Lacoul
 
A hands on overview of the semantic web
A hands on overview of the semantic webA hands on overview of the semantic web
A hands on overview of the semantic webMarakana Inc.
 
Linked Data, Ontologies and Inference
Linked Data, Ontologies and InferenceLinked Data, Ontologies and Inference
Linked Data, Ontologies and InferenceBarry Norton
 
Data Integration And Visualization
Data Integration And VisualizationData Integration And Visualization
Data Integration And VisualizationIvan Ermilov
 

Similar to Querying Bio2RDF data (20)

GDG Meets U event - Big data & Wikidata - no lies codelab
GDG Meets U event - Big data & Wikidata -  no lies codelabGDG Meets U event - Big data & Wikidata -  no lies codelab
GDG Meets U event - Big data & Wikidata - no lies codelab
 
2013 eswc-bio2rdf-r2
2013 eswc-bio2rdf-r22013 eswc-bio2rdf-r2
2013 eswc-bio2rdf-r2
 
Querying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQLQuerying the Semantic Web with SPARQL
Querying the Semantic Web with SPARQL
 
AGROVOC, AGRIS and the CIARD RING, using RDF vocabularies and technologies f...
AGROVOC, AGRIS and the CIARD RING,  using RDF vocabularies and technologies f...AGROVOC, AGRIS and the CIARD RING,  using RDF vocabularies and technologies f...
AGROVOC, AGRIS and the CIARD RING, using RDF vocabularies and technologies f...
 
Presentation at the EMBL-EBI Industry RDF meeting
Presentation at the EMBL-EBI  Industry RDF meetingPresentation at the EMBL-EBI  Industry RDF meeting
Presentation at the EMBL-EBI Industry RDF meeting
 
2009 0807 Lod Gmod
2009 0807 Lod Gmod2009 0807 Lod Gmod
2009 0807 Lod Gmod
 
Producing, publishing and consuming linked data - CSHALS 2013
Producing, publishing and consuming linked data - CSHALS 2013Producing, publishing and consuming linked data - CSHALS 2013
Producing, publishing and consuming linked data - CSHALS 2013
 
Semantic Web
Semantic WebSemantic Web
Semantic Web
 
Semantic Web
Semantic WebSemantic Web
Semantic Web
 
balloon Fusion: SPARQL Rewriting Based on Unified Co-Reference Information
balloon Fusion: SPARQL Rewriting Based on  Unified Co-Reference Informationballoon Fusion: SPARQL Rewriting Based on  Unified Co-Reference Information
balloon Fusion: SPARQL Rewriting Based on Unified Co-Reference Information
 
Bio2RDF@BH2010
Bio2RDF@BH2010Bio2RDF@BH2010
Bio2RDF@BH2010
 
Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02Mon norton tut_queryinglinkeddata02
Mon norton tut_queryinglinkeddata02
 
Sesam4 project presentation sparql - april 2011
Sesam4   project presentation sparql - april 2011Sesam4   project presentation sparql - april 2011
Sesam4 project presentation sparql - april 2011
 
Sesam4 project presentation sparql - april 2011
Sesam4   project presentation sparql - april 2011Sesam4   project presentation sparql - april 2011
Sesam4 project presentation sparql - april 2011
 
Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601Functional manipulations of large data graphs 20160601
Functional manipulations of large data graphs 20160601
 
A Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebA Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic Web
 
A hands on overview of the semantic web
A hands on overview of the semantic webA hands on overview of the semantic web
A hands on overview of the semantic web
 
Linked Data, Ontologies and Inference
Linked Data, Ontologies and InferenceLinked Data, Ontologies and Inference
Linked Data, Ontologies and Inference
 
Sparql
SparqlSparql
Sparql
 
Data Integration And Visualization
Data Integration And VisualizationData Integration And Visualization
Data Integration And Visualization
 

Recently uploaded

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 

Recently uploaded (20)

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 

Querying Bio2RDF data

  • 3. SPARQL: The query language of the Semantic Web ● SPARQL: SPARQL Protocol And Query Language ● SPARQL (“sparkle”) is a W3C recommendation that is part of the semantic web stack ● A SPARQL query allows you to search linked data based on the structure of the triples it contains ● SPARQL can be used to explore the structure of RDF graphs and to transform linked data
  • 4. Anatomy of a SPARQL query ● SPARQL queries have a regular structure composed of the following parts: ○ Prefix declarations: Shortcuts for URIs used in the query (e.g. rdf, rdfs, bio2rdf) ○ Dataset definition: RDF graph to query (support for this option is SPARQL endpoint engine dependent) ○ Result clause: Data returned by the query ○ Query pattern: Graph pattern used to search the RDF data ○ Query modifiers: Limiting, ordering, other forms of result rearrangements
  • 5. Anatomy of a SPARQL query #comments can be included PREFIX prefixA: <http://example.org/prefixA#> PREFIX prefixB: <http://example.org/prefixB:> SELECT ... FROM <http://example.org/myDataset> WHERE { ... } LIMIT 10
  • 6. Federated SPARQL queries over >1 endpoint use the SERVICE keyword PREFIX prefixA: <http://example.org/prefixA#> PREFIX prefixB: <http://example.org/prefixB:> SELECT ... FROM <http://example.org/myDataset> WHERE { SERVICE <http://somewhere.org/sparql> { ... } } LIMIT 10
  • 7. Four SPARQL query variants SELECT: SQL style result set retrieval. Lets you specify the variables you wish to retrieve from the data. CONSTRUCT: Create a custom RDF graph based on a query criteria. Triples can be extracted verbatim as they exist in the queried triple store or re-constructed to create new RDF data. ASK: Tests whether the triplestore or graph contains the specified statement. Returns TRUE or FALSE. DESCRIBE: Returns all of the triples that contain a specified resource.
  • 8. EXAMPLE: SELECT Data from Bio2RDF Gene dataset: <http://bio2rdf.org/geneid:19> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bio2rdf.org/geneid_vocabulary:Gene> . <http://bio2rdf.org/geneid:19> <http://bio2rdf.org/geneid_vocabulary:has_symbol> "ABCA1" . <http://bio2rdf.org/geneid:19> <http://bio2rdf.org/geneid_vocabulary:has_description> "ATP-binding cassette, sub-family A (ABC1), member 1" . <http://bio2rdf.org/geneid:19> <http://bio2rdf.org/geneid_vocabulary:has_taxid> <http://bio2rdf.org/taxon:9606> . Query: Get taxonomic identifier and description for a specific gene symbol PREFIX gene_vocab: <http://bio2rdf.org/geneid_vocabulary:> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> SELECT ?gene ?geneDescription ?taxid WHERE { ?gene gene_vocab:has_symbol "ABCA1" . ?gene gene_vocab:has_description ?geneDescription . ?gene gene_vocab:has_taxid ?taxid . }
  • 9. EXAMPLE: CONSTRUCT Data from Bio2RDF Gene dataset: <http://bio2rdf.org/geneid:19> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://bio2rdf.org/geneid_vocabulary:Gene> . <http://bio2rdf.org/geneid:19> <http://bio2rdf.org/geneid_vocabulary:has_symbol> "ABCA1" . <http://bio2rdf.org/geneid:19> <http://bio2rdf.org/geneid_vocabulary:has_description> "ATP-binding cassette, sub-family A (ABC1), member 1" . <http://bio2rdf.org/geneid:19> <http://bio2rdf.org/geneid_vocabulary:has_taxid> <http://bio2rdf.org/taxon:9606> . Query: Construct dc:identifier triple for an NCBI gene from description PREFIX dc:http://purl.org/dc/terms/ PREFIX gene_vocab: <http://bio2rdf.org/geneid_vocabulary:> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> CONSTRUCT { ?gene dc:description ?geneDescription . } WHERE { ?gene rdf:type gene_vocabulary:Gene . ?gene gene_vocab:has_symbol "ABCA1" . ?gene gene_vocab:has_description ?geneDescription . }
  • 10. EXAMPLE: ASK Data from Bio2RDF DrugBank dataset: <http://bio2rdf.org/drugbank_resource:DB00072_DB00563> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http: //bio2rdf.org/drugbank_vocabulary:Drug-Drug-Interaction . <http://bio2rdf.org/drugbank_resource:DB00072_DB00563> <http://www.w3.org/2000/01/rdf-schema#label> "DDI between Trastuzumab and Methotrexate - Trastuzumab may increase the risk of neutropenia and anemia. Monitor closely for signs and symptoms of adverse events. [drugbank_resource:DB00072_DB00563]" . <http://bio2rdf.org/drugbank:DB00072> <http://bio2rdf.org/drugbank_vocabulary:is-ddi-interactor-in> <http://bio2rdf. org/drugbank_resource:DB00072_DB00563> . <http://bio2rdf.org/drugbank:DB00563> <http://bio2rdf.org/drugbank_vocabulary:is-ddi-interactor-in> <http://bio2rdf. org/drugbank_resource:DB00072_DB00563> . Query: Is there a drug-drug interaction between trastuzumab and methotrexate? PREFIX drugbank_vocab: <http://bio2rdf.org/drugbank_vocabulary:> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ASK WHERE { ?ddi rdf:type drugbank_vocab:Drug-Drug-Interaction . <http://bio2rdf.org/drugbank:DB00072> drugbank_vocab:is-ddi-interactor-in ?ddi . <http://bio2rdf.org/drugbank:DB00563> drugbank_vocab:is-ddi-interactor-in ?ddi . }
  • 11. EXAMPLE: DESCRIBE Data from Bio2RDF PharmGKB dataset: <http://bio2rdf.org/pharmgkb:PA443997> rdf:type <http://bio2rdf.org/pharmgkb_vocabulary:Disease> . <http://bio2rdf.org/pharmgkb:PA443997> rdfs:label "Ehlers-Danlos Syndrome [pharmgkb:PA443997]" . <http://bio2rdf.org/pharmgkb:PA443997> rdfs:seeAlso <http://bio2rdf.org/mesh:0004535> . <http://bio2rdf.org/pharmgkb:PA443997> rdfs:seeAlso <http://bio2rdf.org/umls:C0013720> . <http://bio2rdf.org/pharmgkb:PA443997> rdfs:seeAlso <http://bio2rdf.org/snomed:3A398114001> . <http://bio2rdf.org/pharmgkb:PA443997> owl:sameAs <http://bio2rdf.org/pharmgkb:00072f176862ae5012d717f2858fcf03> . <http://bio2rdf.org/pharmgkb:PA443997> <http://bio2rdf.org/pharmgkb_vocabulary:name> "Ehlers-Danlos Syndrome" . <http://bio2rdf.org/pharmgkb:PA443997> <http://bio2rdf.org/pharmgkb_vocabulary:synonym> "Cutis Elastica" . <http://bio2rdf.org/pharmgkb:PA443997> <http://bio2rdf.org/pharmgkb_vocabulary:synonym> "Cutis elastica" . <http://bio2rdf.org/pharmgkb:PA443997> <http://bio2rdf.org/pharmgkb_vocabulary:synonym> "Cutis hyperelastica" . <http://bio2rdf.org/pharmgkb:PA443997> <http://bio2rdf.org/pharmgkb_vocabulary:synonym> "Danlos disease" . <http://bio2rdf.org/pharmgkb:PA443997> <http://bio2rdf.org/pharmgkb_vocabulary:synonym> "Cutis hyperelastica dermatorrhexis " . <http://bio2rdf.org/pharmgkb:PA443997> void:inDataset <http://bio2rdf.org/bio2rdf_dataset:bio2rdf-pharmgkb-20121015> . Query: Get all triples involving the PharmGKB resource for Ehlers-Danlos Syndrome DESCRIBE <http://bio2rdf.org/pharmgkb:PA443997>
  • 12. Bio2RDF summary metrics can be used to develop SPARQL queries ● Each Bio2RDF endpoint contains summary metrics about the dataset, including: ○ unique predicate-object links and their frequencies ○ unique predicate-literal links and their frequencies ○ unique subject type-predicate-object type links and their frequencies ○ unique subject type-predicate-literal links and their frequencies ● These can inform SPARQL query development by describing the links that exist between entities of a given type
  • 13. Bio2RDF summary metrics can be used to develop SPARQL queries http://download.bio2rdf.org/release/2/drugbank/drugbank.html
  • 14. Bio2RDF summary metrics can be used to develop SPARQL queries PREFIX drugbank_vocabulary: <http://bio2rdf. org/drugbank_vocabulary:> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?ddi ?d1name WHERE { ?ddi a drugbank_vocabulary:Drug-Drug-Interaction . ?d1 drugbank_vocabulary:ddi-interactor-in ?ddi . ?d1 rdfs:label ?d1name . ?d2 drugbank_vocabulary:ddi-interactor-in ?ddi . ?d2 rdfs:label ?d2name . FILTER (?d1 != ?d2) } Results: http://bit.ly/14qGfUh
  • 16. Bio2RDF query: Retrieve diseases associated with the BRCA1 gene PREFIX ctd_vocab: <http://bio2rdf.org/ctd_vocabulary:> SELECT ?disease ?diseaseLabel FROM <http://bio2rdf.org/ctd> WHERE { ?assoc rdf:type ctd_vocab:Gene-Disease-Association . ?assoc ctd_vocab:gene <http://bio2rdf.org/geneid:672> . ?assoc ctd_vocab:disease ?disease . ?disease rdfs:label ?diseaseLabel . } Results: http://bit.ly/162NM9L
  • 17. Bio2RDF federated query: Retrieve GO function labels from BioPortal for a gene in NCBI gene SELECT * WHERE { <http://bio2rdf.org/geneid:3253304> <http://bio2rdf. org/geneid_vocabulary:function> ?goFunction . SERVICE <http://bioportal.bio2rdf.org/sparql> { ?goFunction rdfs:label ?label . } } Results: http://bit.ly/13D20SR
  • 18. Bio2RDF query: Count all the biochemical reactions in the BioModels database involved in "protein catabolic process" SELECT ?go ?label count(distinct ?x) WHERE { { # get all the biochemical reactions specifically labelled with protein catabolic process ?go rdfs:label ?label . FILTER regex(?label, "^protein catabolic process") service <http://biomodels.bio2rdf.org/sparql> { ?x <http://bio2rdf.org/biopax_vocabulary:identical-to> ?go . ?x a <http://www.biopax.org/release/biopax-level3.owl#BiochemicalReaction> . } } UNION { # get all the biochemical reactions that are more specific than "protein catabolic process" ?go rdfs:label ?label . ?go rdfs:subClassOf ?tgo OPTION (TRANSITIVE) . # get all the subclasses of the target to term ?tgo rdfs:label ?tlabel . FILTER regex(?tlabel, "^protein catabolic process") service <http://biomodels.bio2rdf.org/sparql> { ?x <http://bio2rdf.org/biopax_vocabulary:identical-to> ?go . ?x a <http://www.biopax.org/release/biopax-level3.owl#BiochemicalReaction> . } } } Results: http://bit.ly/14qGWwC
  • 19. Use the VOS Faceted Browser to explore Bio2RDF data ● Explore types and attributes ● Free text search
  • 20. Explore Bio2RDF data on your own! http://download.bio2rdf.org/release/2/release.html