A set of SPARQL examples that are used in different TGX resources
Returns the total number of pathways that have no associated publication references.
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
SELECT (count(DISTINCT ?pathway) AS ?pathwayCount) WHERE {
?pathway a wp:Pathway ; dc:title ?titleLit ; wp:organismName ?speciesLabelLit .
MINUS { ?pubmed a wp:PublicationReference .
?pubmed dcterms:isPartOf ?pathway }
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v1("?pathway"):::projected
v5("?pathwayCount")
v4("?pubmed")
v3("?speciesLabelLit")
v2("?titleLit")
c5(["wp:PublicationReference"]):::iri
c2(["wp:Pathway"]):::iri
v1 --"a"--> c2
v1 --"dc:title"--> v2
v1 --"wp:organismName"--> v3
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v4 --"a"--> c5
v4 --"dcterms:isPartOf"--> v1
end
bind2[/"count(?pathway)"/]
v1 --o bind2
bind2 --as--o v5