sparql-examples

A set of SPARQL examples that are used in different ERDERA resources

View the Project on GitHub ERDERA/sparql-examples

007

This query identifies which external database identifiers (dbxrefs) are most frequently referenced across Orphanet disease terms

Use at

PREFIX ORDO: <http://www.orpha.net/ORDO/>
PREFIX oboInOwl: <http://www.geneontology.org/formats/oboInOwl#>

SELECT ?dbxref (COUNT(DISTINCT ?disease) AS ?linkedDiseases) WHERE {
  ?disease oboInOwl:hasDbXref ?dbxref .
}
GROUP BY ?dbxref
ORDER BY DESC(?linkedDiseases)

graph TD
classDef projected fill:lightgreen;
classDef literal fill:orange;
classDef iri fill:yellow;
  v3("?dbxref"):::projected 
  v2("?disease"):::projected 
  v4("?linkedDiseases")
  v2 --"oboInOwl:hasDbXref"-->  v3
  bind1[/"count(?disease)"/]
  v2 --o bind1
  bind1 --as--o v4