Example Of Queries
Our sparql Endpoint is in a beta test phase. Beware if you want to use it in a production environment
From an ORPHAcode, getting the disease label, its associated HPO IDs with related frequencies, sources and dates of the created associations.
select DISTINCT ?association ?Property ?value ?date ?label ?comment
where {
?association owl:equivalentClass ?collection .
?collection owl:intersectionOf ?list .
?list rdf:rest*/rdf:first ?item .
?item owl:someValuesFrom <http://www.orpha.net/ORDO/Orphanet_2331>
OPTIONAL {
?association owl:equivalentClass ?node .
?node owl:intersectionOf ?list .
?list rdf:rest*/rdf:first ?item2 .
?item2 owl:onProperty ?Property. OPTIONAL {
?item2 owl:someValuesFrom ?value . OPTIONAL {?value rdfs:comment ?label} . OPTIONAL {?value rdfs:label ?comment}
}
OPTIONAL {
?item2 owl:hasValue ?date .}
}
}
ORDER BY ?association
Get the number of Disorder-HPO associations.
Get the list of disorders which have at least 10 HPO associations.
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.
}
PREFIX hoom: <http://www.semanticweb.org/ontology/HOOM#>
SELECT ?dis ?Association_Amount
WHERE {
{
SELECT ?disorder (COUNT(?association) as ?Association_Amount)
WHERE {
?association rdfs:subClassOf hoom:Association .
?association owl:equivalentClass ?node .
?node owl:intersectionOf ?list .
?list rdf:rest*/rdf:first ?item .
?item owl:onProperty ?Property.
?item owl:someValuesFrom ?disorder .
?disorder rdfs:subClassOf hoom:Orpha_Num
}
GROUP BY ?disorder
}
filter (?Association_Amount > 10)
BIND (?disorder as ?dis)
}
ORDER BY (?Association_Amount)
}
Get the number of HPO associations for one disorder (i.e Marfan syndrome)
PREFIX hoom: <http://www.semanticweb.org/ontology/HOOM#>
SELECT (COUNT(?association) as ?Association_Amount)
WHERE {
?association rdfs:subClassOf <http://www.semanticweb.org/ontology/HOOM#Association> .
?association owl:equivalentClass ?node .
?node owl:intersectionOf ?list .
?list rdf:rest*/rdf:first ?item .
?item owl:onProperty ?Property.
?item owl:someValuesFrom <http://www.orpha.net/ORDO/Orphanet_558>
}
Get the number of Disorder-HPO assosiations for each disorder.
PREFIX hoom: <http://www.semanticweb.org/ontology/HOOM#>
SELECT ?disorder (COUNT(?association) as ?Association_Amount)
WHERE {
?association rdfs:subClassOf hoom:Association .
?association owl:equivalentClass ?node .
?node owl:intersectionOf ?list .
?list rdf:rest*/rdf:first ?item .
?item owl:onProperty ?Property.
?item owl:someValuesFrom ?disorder .
?disorder rdfs:subClassOf hoom:Orpha_Num
}
GROUP BY ?disorder