Skip to content

repair --merge-axiom-annotations is removing axioms it shouldn’t remove #1239

@gouttegd

Description

@gouttegd

I believe there are two (maybe related) problems with the repair --merge-axiom-annotations feature.

They can both be illustrated with the following minimal example:

Ontology(<http://purl.obolibrary.org/obo/cl/imports/merged_import.owl>

# Declarations omitted for brevity...

# Object Property: <http://purl.obolibrary.org/obo/RO_0001025> (located in)
AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/RO_0001025> "located in")
ObjectPropertyDomain(Annotation(<http://purl.obolibrary.org/obo/IAO_0000116> "Some annotation.") <http://purl.obolibrary.org/obo/RO_0001025> <http://purl.obolibrary.org/obo/BFO_0000004>)
ObjectPropertyDomain(<http://purl.obolibrary.org/obo/RO_0001025> ObjectComplementOf(<http://purl.obolibrary.org/obo/BFO_0000006>))

# Class: <http://purl.obolibrary.org/obo/GO_0005319> (lipid transporter activity)
AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/GO_0005319> "lipid transporter activity")
SubClassOf(<http://purl.obolibrary.org/obo/GO_0005319> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/BFO_0000050> <http://purl.obolibrary.org/obo/GO_0006869>))
SubClassOf(Annotation(<http://www.geneontology.org/formats/oboInOwl#source> "GO_REF:0000090") <http://purl.obolibrary.org/obo/GO_0005319> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/BFO_0000050> <http://purl.obolibrary.org/obo/GO_0006869>))

)

Running robot repair -i minimal.ofn --merge-axiom-annotations true -o repaired.ofn yields

Ontology(<http://purl.obolibrary.org/obo/cl/imports/merged_import.owl>

# Declarations omitted for brevity...

# Object Property: <http://purl.obolibrary.org/obo/RO_0001025> (located in)
AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/RO_0001025> "located in")
ObjectPropertyDomain(<http://purl.obolibrary.org/obo/RO_0001025> ObjectComplementOf(<http://purl.obolibrary.org/obo/BFO_0000006>))

# Class: <http://purl.obolibrary.org/obo/GO_0005319> (lipid transporter activity)
AnnotationAssertion(rdfs:label <http://purl.obolibrary.org/obo/GO_0005319> "lipid transporter activity")
SubClassOf(<http://purl.obolibrary.org/obo/GO_0005319> ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/BFO_0000050> <http://purl.obolibrary.org/obo/GO_0006869>))

)

The first problem is with the RO:0001025 property: note how the following axiom

ObjectPropertyDomain(Annotation(http://purl.obolibrary.org/obo/IAO_0000116 "Some annotation.") http://purl.obolibrary.org/obo/RO_0001025 http://purl.obolibrary.org/obo/BFO_0000004)

is completely removed.

The second problem is with the GO:0005319 class. The original file contains the same axiom (GO:0005319 SubClassOf BFO:0000050 some GO:0006869) twice: one unannotated, one carrying a GO_REF:0000090 cross-reference annotation. After “repair”, the annotated axiom is completely removed, meaning the cross-reference annotation is lost. This is not the behaviour I would expect for --merge-axiom-annotations -- I would have the annotation to be preserved, and the unannotated axiom to be removed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions