GenEpiO / genepio

The Genomic Epidemiology Application Ontology describes the genomics, laboratory, clinical and epidemiological contextual information required to support data sharing and integration for foodborne infectious disease surveillance and outbreak investigations.
Other
19 stars 10 forks source link

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

Open Public-Health-Bioinformatics opened 7 years ago

Public-Health-Bioinformatics commented 7 years ago

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.

Public-Health-Bioinformatics commented 6 years ago

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.

Public-Health-Bioinformatics commented 6 years ago

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.