Created
August 20, 2016 13:00
-
-
Save andrawaag/4da71db85e6cb8e6cf3513de124ac2f9 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 * WHERE { | |
SERVICE <https://query.wikidata.org/bigdata/namespace/wdq/sparql> { | |
# Below is the Wikidata specific part of the query | |
?wd_compound wdt:P235 ?inchikey . | |
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } | |
} | |
# Below is the Wikipathways specific part of the query | |
?wp_compound wp:bdbWikidata ?wd_compound . | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment