A set of SPARQL examples that are used in different TGX resources
Counts publication references that appear in both Reactome-approved and WikiPathways Analysis Collection 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 }
{ ?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
v1 --"dcterms:isPartOf"--> a2
a2 --"wp:ontologyTag"--> c6
bind1[/"count(?pubmed)"/]
v1 --o bind1
bind1 --as--o v2