h3abionet / afpo

AfPO: African Population Ontology
1 stars 0 forks source link

Redundant subclassOf violation #19

Closed anitacaron closed 7 months ago

anitacaron commented 8 months ago

Many QCs in ODK are suggested and ready to use. For example, redundant-subClassOf-violation.sparql:

PREFIX oio: <http://www.geneontology.org/formats/oboInOwl#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

SELECT ?term ?xl ?y ?yl ?z ?zl WHERE {
  ?term rdfs:subClassOf ?y ;
     rdfs:label ?xl .
  ?y rdfs:subClassOf+ ?z ;
     rdfs:label ?yl .
  ?term rdfs:subClassOf ?z .
  ?z rdfs:label ?zl .

  FILTER(isIRI(?term) && (STRSTARTS(str(?term), "http://purl.obolibrary.org/obo/AfPO_")))
}

This detects a class being a subclass of both its parent and any superior class in the hierarchy.

At this moment, this QC is failing for this case:

term = http://purl.obolibrary.org/obo/AfPO_0000493
term label = Nyamwezi
y = http://purl.obolibrary.org/obo/AfPO_0000369
y label = Bantu Eastern
z = http://purl.obolibrary.org/obo/AfPO_0000188,
z label = Eastern African

Looking at Protégé:

Screenshot 2024-01-08 at 15 29 26

For this issue, there are two tasks:

anitacaron commented 8 months ago

What are your thoughts @abenkahla @Melek-C @daniwelter?

Melek-C commented 7 months ago

I think wa should remove redundant subclass .