remove a rdfs:subClassOf entry (triplet)

classic Classic list List threaded Threaded
2 messages Options
gp
Reply | Threaded
Open this post in threaded view
|

remove a rdfs:subClassOf entry (triplet)

gp
Hi there,

I tried to modify some ontology by removing some s rdfs:subClassOf o triplet, but did not know how to do it:

if I look at the child entity, child.is_a only contains owl.Thing. The triplet is properly found when parsing the file as list(child.descendants()) (or the other way around using ancestors() ) does list the class of interest.

I guess in this one case rdflib should be able to do the trick but did I miss something ?

Cheers,
Guillaume

For reference the relevant few lines of the xml/owl file:
    <owl:Class rdf:about="http://purl.obolibrary.org/obo/GO_0005623">
        <rdfs:label rdf:datatype="http://www.w3.org/2001/XMLSchema#string">cell</rdfs:label>
        <rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/BFO_0000002"/>
        <rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/GO_0005575"/>
        <obo:IAO_0000412 rdf:resource="http://purl.obolibrary.org/obo/cl.owl"/>
    </owl:Class>
gp
Reply | Threaded
Open this post in threaded view
|

Re: remove a rdfs:subClassOf entry (triplet)

gp
My bad, there was an owl:equivalentClass entry involved! so it is only that is_a does not do some inference, which is plain fine I believe.

Hopefully these few lines do help someone who also wonders why is_a would not list some class.