geneontology / obographs

Basic and Advanced OBO Graphs: specification and reference implementation
64 stars 12 forks source link

Multiple inheritance not parsed to JSON #39

Closed danielapoliveira closed 6 years ago

danielapoliveira commented 6 years ago

I converted the EFO ontology from OWL to JSON using obographs but I came across an issue when dealing with the representation of multiple inheritance in this ontology. For example, the class http://www.ebi.ac.uk/efo/EFO_0005117 has its parents represented as:

<owl:Class rdf:about="http://www.ebi.ac.uk/efo/EFO_0005117">
        <rdfs:subClassOf>
            <owl:Class>
                <owl:intersectionOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="http://www.ebi.ac.uk/efo/EFO_0001444"/>
                    <owl:Restriction>
                        <owl:onProperty rdf:resource="http://purl.obolibrary.org/obo/IAO_0000136"/>
                        <owl:someValuesFrom rdf:resource="http://purl.obolibrary.org/obo/GO_0006954"/>
                    </owl:Restriction>
                    <owl:Restriction>
                        <owl:onProperty rdf:resource="http://purl.obolibrary.org/obo/IAO_0000136"/>
                        <owl:someValuesFrom rdf:resource="http://www.ebi.ac.uk/efo/EFO_0003786"/>
                    </owl:Restriction>
                </owl:intersectionOf>
            </owl:Class>
        </rdfs:subClassOf>
...

However, in the JSON file that obographs produces I can't find reference to these edges anywhere. Is the type of inheritance represented in some way that I'm not finding or is it not being parsed?

cmungall commented 6 years ago

Thanks. Currently not all of OWL is supported.

Regardless of the export format I would recommend either relaxing to a logically equivalent form that is easier to use.

E.g.

C SubClassOf (G and R1 some Y1 and ... Rn some Yn)
<=>
C SubClassOf G
C SubClassOf R1 some Y1
...
C SubClassOf Rn some Yn

(I would also recommend separating the axioms this way in the edit version of the ontology but that's personal preference)

danielapoliveira commented 6 years ago

Thank you for the tip. I will look into finding a workaround then.