Last active
June 23, 2017 19:06
-
-
Save egonw/e010ea9ed30d7fc45cbe1b596ce1c230 to your computer and use it in GitHub Desktop.
Reactome-WikiPathways related SPARQL queries. Run on http://sparql.wikipathways.org/ and see http://rdf.wikipathways.org/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX cur: <http://vocabularies.wikipathways.org/wp#Curation:> | |
SELECT DISTINCT ?metabolite (str(?identifierLit) as ?identifier) | |
WHERE { | |
?pathway wp:ontologyTag cur:Reactome_Approved ; | |
dc:title ?titleLit . | |
?metabolite a wp:Metabolite ; | |
dcterms:isPartOf ?pathway ; | |
dcterms:identifier ?identifierLit | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX cur: <http://vocabularies.wikipathways.org/wp#Curation:> | |
SELECT DISTINCT ?pathway (str(?titleLit) as ?title) | |
WHERE { | |
?pathway wp:ontologyTag cur:Reactome_Approved ; | |
dc:title ?titleLit . | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PREFIX cur: <http://vocabularies.wikipathways.org/wp#Curation:> | |
SELECT count (DISTINCT ?metabolite) | |
WHERE { | |
?pathway wp:ontologyTag cur:Reactome_Approved ; | |
dc:title ?titleLit . | |
?metabolite a wp:Metabolite ; | |
dcterms:isPartOf ?pathway ; | |
dcterms:identifier ?identifierLit | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% RUN ON http://query.wikidata.org/ | |
PREFIX cur: <http://vocabularies.wikipathways.org/wp#Curation:> | |
PREFIX wp: <http://vocabularies.wikipathways.org/wp#> | |
PREFIX dcterms: <http://purl.org/dc/terms/> | |
SELECT DISTINCT * WHERE { | |
?wikidata wdt:P2057 ?hmdb | |
{SELECT DISTINCT * WHERE { | |
{SELECT DISTINCT * WHERE { | |
SERVICE <http://sparql.wikipathways.org/> { | |
?metabolite a wp:Metabolite ; | |
dcterms:isPartOf/wp:ontologyTag cur:Reactome_Approved ; | |
dcterms:identifier ?identifierLit ; | |
wp:bdbWikidata ?wikidata | |
} | |
}}}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment