Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OBI import is causing DL violations #1500

Closed
shawntanzk opened this issue Feb 24, 2022 · 3 comments · Fixed by #1501
Closed

OBI import is causing DL violations #1500

shawntanzk opened this issue Feb 24, 2022 · 3 comments · Fixed by #1501
Assignees

Comments

@shawntanzk
Copy link

I'm trying to import OBI into an ontology and it is causing error in qc

PROFILE VIOLATION ERROR http://purl.obolibrary.org/obo/tmn.owl violates profile DL
For details see: http://robot.obolibrary.org/validate-profile#profile-violation-error
Use the -vvv option to show the stack trace.
Use the --help option to see usage information.
make: *** [Makefile:132: reports/validate_profile_owl2dl_tmn.owl.txt] Error 1

Error seems to be coming from the following (see separated out section for example single operand in intersection):

<!-- http://purl.obolibrary.org/obo/OBI_0002530 -->

<owl:Class rdf:about="http://purl.obolibrary.org/obo/OBI_0002530">
    <owl:equivalentClass>
        <owl:Class>

#################################################
<owl:intersectionOf rdf:parseType="Collection">
owl:Class
#################################################

                    <owl:intersectionOf rdf:parseType="Collection">
                        <rdf:Description rdf:about="http://purl.obolibrary.org/obo/OBI_0100051"/>
                        <owl:Restriction>
                            <owl:onProperty rdf:resource="http://purl.obolibrary.org/obo/OBI_0000312"/>
                            <owl:someValuesFrom rdf:resource="http://purl.obolibrary.org/obo/OBI_0600005"/>
                        </owl:Restriction>
                        <owl:Restriction>
                            <owl:onProperty rdf:resource="http://purl.obolibrary.org/obo/RO_0001000"/>
                            <owl:someValuesFrom rdf:resource="http://purl.obolibrary.org/obo/UBERON_0001013"/>
                        </owl:Restriction>
                    </owl:intersectionOf>
                </owl:Class>

#################################################
</owl:intersectionOf>
</owl:Class>
#################################################

    </owl:equivalentClass>
    <rdfs:subClassOf rdf:resource="http://purl.obolibrary.org/obo/OBI_0001479"/>
    <obo:IAO_0000111>adipose tissue specimen</obo:IAO_0000111>
    <obo:IAO_0000114 rdf:resource="http://purl.obolibrary.org/obo/IAO_0000122"/>
    <obo:IAO_0000115>A specimen that is derived from adipose tissue.</obo:IAO_0000115>
    <obo:IAO_0000117>Chris Stoeckert</obo:IAO_0000117>
    <obo:IAO_0000119>Chris Stoeckert, NCI BBRB </obo:IAO_0000119>
    <rdfs:label>adipose tissue specimen</rdfs:label>
</owl:Class>

Related to BICCN/TMN#83

full report here OWL 2 DL Profile Report: Ontology and imports closure NOT in profile. The following violations are present: Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Use of undeclared annotation property: in annotation [Annotation( "This is an ontology that captures techniques and methods in neuroscience to support work at AIBS and BICCN. The techniques and methods ontology is designed to help scientists communicate about their experiments and results by defining a set of terms for techniques, methods, modalities, assays, devices, tools, and the like.") in null] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Use of undeclared annotation property: in annotation [Annotation( "Techniques and Methods for Neuroscience Ontology") in null] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Use of undeclared annotation property: in annotation [Annotation( ) in null] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) [EquivalentClasses( ObjectIntersectionOf(ObjectIntersectionOf( ObjectSomeValuesFrom( ) ObjectSomeValuesFrom( ))) ) in OntologyID(OntologyIRI() VersionIRI())] Not enough operands; at least two needed: ObjectIntersectionOf(ObjectIntersectionOf(
@jamesaoverton
Copy link
Contributor

Thanks @shawntanzk. We should have been checking this automatically, but we haven't been.

These axioms come from the biobank-specimens module, specifically the two logical columns in the biobank-specimens.tsv template:

  • C specimen and (is_specified_output_of some 'collecting specimen from organism') and ('derives from' some %)
  • C specimen and (is_specified_output_of some ('collecting specimen with swab' and has_specified_input some %))

The logic seems fine to me. I think that ROBOT template is to blame: when CLASS_TYPE is 'equivalent' but there is only one logical column, ROBOT should not be using an owl:intersectionOf. When I change the CLASS_TYPE column from 'equivalent' to 'subclass', these DL query violations disappear.

There are still some violations for undeclared AnnotationProperties.

Action Items:

  • add DL profile check to OBI Makefile
  • fix ROBOT bug
  • clean up the rest of the OBI DL violations

@beckyjackson
Copy link
Contributor

I was able to fix the ROBOT issue and regenerate the biobank template to pass the validation, but OBI as a whole still does not pass:

Use of reserved vocabulary for annotation property IRI: owl:minQualifiedCardinality [AnnotationAssertion(owl:minQualifiedCardinality _:genid2147504695 "2"^^xsd:nonNegativeInteger) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/obi/obi_merged.owl>) VersionIRI(<http://purl.obolibrary.org/obo/obi/2022-02-24/obi_merged.owl>))]

I looked into it, and found this weird axiom in obi.owl:

<!-- http://purl.obolibrary.org/obo/obi.owl -->

<owl:NamedIndividual rdf:about="http://purl.obolibrary.org/obo/obi.owl"/>
<rdf:Description>
    <obo:IAO_0000412 rdf:resource="http://purl.obolibrary.org/obo/uberon.owl"/>
</rdf:Description>
<rdf:Description>
    <owl:minQualifiedCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">2</owl:minQualifiedCardinality>
</rdf:Description>

This axiom is not in obi-edit.owl, but the edit file uses owl:minQualifiedCardinality on a UO term in a very strange way:

<!-- http://purl.obolibrary.org/obo/UO_0000284 -->

<owl:NamedIndividual rdf:about="http://purl.obolibrary.org/obo/UO_0000284"/>
 <rdf:Description>
    <owl:minQualifiedCardinality rdf:datatype="http://www.w3.org/2001/XMLSchema#nonNegativeInteger">2</owl:minQualifiedCardinality>
</rdf:Description>

This axiom disappears from OBI after the release process, probably because it's not correct... I don't know what was intended with this axiom (or how it was added), or if it was somehow added by mistake. If I remove that chunk of lines from obi-edit.owl, the validation passes.

@jamesaoverton
Copy link
Contributor

Ok, let's drop that weird owl:minQualifiedCardinality axiom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants