A set of SPARQL examples that are used in different ERDERA resources
HOOM - Counting the total number of Disorder-HPO associations in HOOM.
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT (COUNT(?association) as ?Association_Amount)
WHERE {
?association rdfs:subClassOf ?type .
?association owl:equivalentClass ?node .
?node owl:intersectionOf ?list .
?list rdf:rest*/rdf:first ?item .
?item owl:onProperty ?Property .
?item owl:someValuesFrom ?Id .
}
graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
v8("?Association_Amount")
v7("?Id")
v6("?Property")
v1("?association"):::projected
v5("?item")
v4("?list")
v3("?node")
v2("?type")
a1((" "))
v1 --"rdfs:subClassOf"--> v2
v1 --"owl:equivalentClass"--> v3
v3 --"owl:intersectionOf"--> v4
v4 --"rdf:rest"--> a1
a1 --"rdf:first"--> v5
v5 --"owl:onProperty"--> v6
v5 --"owl:someValuesFrom"--> v7
bind1[/"count(?association)"/]
v1 --o bind1
bind1 --as--o v8