genepio icon indicating copy to clipboard operation
genepio copied to clipboard

EMBL-EBI OLS search engine shows ontology items named "ERROR" at top level

Open Public-Health-Bioinformatics opened this issue 8 years ago • 2 comments

This happens when one annotates relations like "member of" RO_0002351 that an entity has in the OWL file. If the owl:onProperty RO_0002351 object property isn't defined in the genepio-edit.owl file directly, the error item will be created and displayed.

    <owl:Axiom>
        <owl:annotatedSource rdf:resource="http://purl.obolibrary.org/obo/GENEPIO_0001579"/>
        <owl:annotatedProperty rdf:resource="http://www.w3.org/2000/01/rdf-schema#subClassOf"/>
        <owl:annotatedTarget>
            <owl:Restriction>
                <owl:onProperty rdf:resource="http://purl.obolibrary.org/obo/RO_0002351"/>
                <owl:qualifiedCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">1</owl:qualifiedCardinality>
                <owl:onClass rdf:resource="http://purl.obolibrary.org/obo/GENEPIO_0001572"/>
            </owl:Restriction>
        </owl:annotatedTarget>
        <rdfs:label>Relevance</rdfs:label>
    </owl:Axiom>

To fix, ensure that the appropriate object property is placed directly in genepio-edit.owl . Then the ontology parsing machinery can correctly annotate.

<!-- http://purl.obolibrary.org/obo/RO_0002351 -->
<owl:ObjectProperty rdf:about="&obo;RO_0002351">
    <rdf:type rdf:resource="&owl;IrreflexiveProperty"/>
    <rdfs:label xml:lang="en">has member</rdfs:label>
</owl:ObjectProperty>

I've done this for latest GenEpiO to fix OLS display error.

This situation can arise as well with erroneous annotation property definitions that reference object properties defined elsewhere, e.g.

<!-- http://purl.obolibrary.org/obo/RO_0002351 -->
<owl:AnnotationProperty rdf:about="http://purl.obolibrary.org/obo/RO_0002351"/>

Delete these. Happens when an object property or parent accidentally marked up as an annotation property.

What is happening is that OLS is loading the main ontology file probably using OWLAPI, and that has the weakness that annotatedTarget/Restriction/onProperty references, if they aren't defined, throw an error. Unfortunately the RO import isn't performed before this, or else the needed references would be found there. So main file has to have duplicates of ObjectProperty entries.