Last active
June 26, 2017 19:54
-
-
Save andrawaag/7e2e793342011f66bb6a3ea7bb5a1326 to your computer and use it in GitHub Desktop.
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
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 ?mass1 ?mass2 ?metabolite2Label WHERE { | |
?metabolite2 wdt:P2067 ?mass2 . | |
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". } | |
{SELECT * WHERE { | |
{SELECT * WHERE { | |
?metabolite1 wdt:P2067 ?mass1 . | |
{SELECT * WHERE { | |
{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