-
-
Save egonw/4f8de6f74c7a1313cbbc522b850b37e4 to your computer and use it in GitHub Desktop.
SPARQL query to link Wikidata and Wikipathways with an InchiKey
This file contains hidden or 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
#QUERY <http://sparql.wikipathways.org> | |
PREFIX wdt: <http://www.wikidata.org/prop/direct/> | |
PREFIX wd: <http://www.wikidata.org/entity/> | |
PREFIX p: <http://www.wikidata.org/prop/> | |
PREFIX wikibase: <http://wikiba.se/ontology#> | |
PREFIX bd: <http://www.bigdata.com/rdf#> | |
SELECT DISTINCT str(?inchikeyLit) as ?inchikey str(?pathwayIDLit) as ?pathwayID WHERE { | |
SERVICE <https://query.wikidata.org/bigdata/namespace/wdq/sparql> { | |
?wd_compound wdt:P235 ?inchikeyLit . | |
} | |
?wp_compound wp:bdbWikidata ?wd_compound . | |
?wp_compound dcterms:isPartOf ?pathway . | |
?pathway a wp:Pathway ; | |
dcterms:identifier ?pathwayIDLit . | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment