Created
June 26, 2017 19:46
-
-
Save andrawaag/ba1b7d1b9adf06e9d45afa98c1d1e239 to your computer and use it in GitHub Desktop.
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 wp: <http://vocabularies.wikipathways.org/wp#> | |
PREFIX dcterms: <http://purl.org/dc/terms/> | |
PREFIX dc: <http://purl.org/dc/elements/1.1/> | |
SELECT DISTINCT ?metabolite1Label ?metabolite2Label ?mass1 ?mass2 WHERE { | |
?metabolite2 wdt:P2067 ?mass2 . | |
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | |
{SELECT * WHERE { | |
?metabolite1 wdt:P2067 ?mass1 . | |
{SELECT * WHERE { | |
?pathwayItem wdt:P2410 "WP706" ; | |
wdt:P2888 ?pwIri . | |
FILTER (?metabolite1 != ?metabolite2) | |
SERVICE <http://sparql.wikipathways.org/> { | |
?pathway dc:identifier ?pwIri . | |
?interaction rdf:type wp:Interaction ; | |
wp:participants ?wpmb1, ?wpmb2 ; | |
dcterms:isPartOf ?pathway . | |
?wpmb1 wp:bdbWikidata ?metabolite1 . | |
?wpmb2 wp:bdbWikidata ?metabolite2 . | |
FILTER (?wpmb1 != ?wpmb2)} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment