A set of SPARQL examples that are used in different TGX resources
Lists pathways that have no associated publication references, returning species, title, and pathway identifier sorted alphabetically.
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
SELECT (STR(?speciesLabelLit) AS ?species) (STR(?titleLit) AS ?title) ?pathway WHERE {
?pathway a wp:Pathway ; dc:title ?titleLit ; wp:organismName ?speciesLabelLit .
MINUS { ?pubmed a wp:PublicationReference .
?pubmed dcterms:isPartOf ?pathway }
} ORDER BY ASC(?species) ASC(?title)
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v3("?pathway"):::projected
v6("?pubmed")
v7("?species")
v5("?speciesLabelLit"):::projected
v7("?title")
v4("?titleLit"):::projected
c5(["wp:PublicationReference"]):::iri
c2(["wp:Pathway"]):::iri
v3 --"a"--> c2
v3 --"dc:title"--> v4
v3 --"wp:organismName"--> v5
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v6 --"a"--> c5
v6 --"dcterms:isPartOf"--> v3
end
bind1[/"str(?speciesLabelLit)"/]
v5 --o bind1
bind1 --as--o v7
bind2[/"str(?titleLit)"/]
v4 --o bind2
bind2 --as--o v7