I would like to determine how semantically specific a MonDO disease is, using the distance from the disease root as a proxy.
Right now I'm doing
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX mydata: <http://example.com/resource/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
select *
where {
graph <http://purl.obolibrary.org/obo/mondo.owl> {
?mid
a owl:Class ;
rdfs:subClassOf+ <http://purl.obolibrary.org/obo/MONDO_0000001> .
?leaf
rdfs:subClassOf* ?mid .
filter(isuri(?mid))
}
}
But the results look funny to me, like the number of ?mid
s could be the sum over multiple different (not necessarily shortest) paths.
I'd like to try the Stardog path notation, but I feel like I have seen at least two styles:
from Home | Stardog Documentation Latest
PATHS START ?x = :Alice END ?y = :Charlie VIA ?p
from A Path of Our Own | Stardog
PATH ?p FROM ([startNode AS] ?s) TO ([endNode AS] ?e) {
GRAPH PATTERN
}
[ORDER BY condition]
[LIMIT int]
Are both of these still functional?
Can either be used to report the lenght of the shortest path?