A set of SPARQL examples that are used in different TGX resources
Counts publication references found in the WikiPathways Analysis Collection but not in Reactome-approved pathways.
PREFIX cur: <http://vocabularies.wikipathways.org/wp#Curation:>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX wp: <http://vocabularies.wikipathways.org/wp#>
SELECT (COUNT(DISTINCT ?pubmed) AS ?count)
WHERE {
?pubmed a wp:PublicationReference .
{ ?pubmed dcterms:isPartOf/wp:ontologyTag cur:AnalysisCollection }
MINUS { ?pubmed dcterms:isPartOf/wp:ontologyTag cur:Reactome_Approved }
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v2("?count")
v1("?pubmed"):::projected
a1((" "))
a2((" "))
c6(["wp:Curation:Reactome_Approved"]):::iri
c2(["wp:PublicationReference"]):::iri
c5(["wp:Curation:AnalysisCollection"]):::iri
v1 --"a"--> c2
v1 --"dcterms:isPartOf"--> a1
a1 --"wp:ontologyTag"--> c5
subgraph minus0["MINUS"]
style minus0 stroke-width:6px,fill:pink,stroke:red;
v1 --"dcterms:isPartOf"--> a2
a2 --"wp:ontologyTag"--> c6
end
bind2[/"count(?pubmed)"/]
v1 --o bind2
bind2 --as--o v2