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

ro_import does not include domain/range constraints #1182

Closed
cmungall opened this issue Jun 16, 2021 · 11 comments · Fixed by #1215
Closed

ro_import does not include domain/range constraints #1182

cmungall opened this issue Jun 16, 2021 · 11 comments · Fixed by #1215
Assignees

Comments

@cmungall
Copy link
Member

This allows issues like #1181

Because the import can be problematic (modularity issues, RO needs various classes across OBO for D/Rs), I suggest a step in make test which does a merge of ro full and envo and runs hermit, longer term we can work on base files etc

@wdduncan
Copy link
Member

When domain/range constraints are added, freezing fog is found to be unsatisfiable.
To reproduce the unsatisfiable class run the robot command:

robot merge \
	-I http://purl.obolibrary.org/obo/envo.owl \
	-I http://purl.obolibrary.org/obo/ro.owl reason \
	--output test.owl

The produces output:

2021-08-24 20:10:35,424 ERROR org.obolibrary.robot.IOHelper - Input ontology contains 1 triple(s) that could not be parsed:
 - <https://www.wikidata.org/wiki/Q2306597> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147499456.

2021-08-24 20:10:38,774 ERROR org.obolibrary.robot.ReasonerHelper - There are 1 unsatisfiable classes in the ontology.
2021-08-24 20:10:38,774 ERROR org.obolibrary.robot.ReasonerHelper -     unsatisfiable: http://purl.obolibrary.org/obo/ENVO_03000137

The class http://purl.obolibrary.org/obo/ENVO_03000137 is freezing frog (see incoherency referenced in #1181 )

@cmungall I could not determine the source of the error:

2021-08-24 20:10:35,424 ERROR org.obolibrary.robot.IOHelper - Input ontology contains 1 triple(s) that could not be parsed:
 - <https://www.wikidata.org/wiki/Q2306597> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> _:genid2147499456.

cc @kaiiam @pbuttigieg @turbomam

@wdduncan
Copy link
Member

Adding domain/range constraints also results in violating the DL profile.

This robot command:

robot merge \
        -I http://purl.obolibrary.org/obo/envo.owl \
        -I http://purl.obolibrary.org/obo/ro.owl \
        validate-profile --profile DL \
        | grep non-simple

Produces output:

Use of non-simple property in a restriction: ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01001097>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_01001778> ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01001097>)) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]
Use of non-simple property in a restriction: ObjectMinCardinality(1 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01000760>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_01000902> ObjectMinCardinality(1 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01000760>)) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]
Use of non-simple property in a restriction: ObjectMaxCardinality(1 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01001097>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_01001779> ObjectMaxCardinality(1 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01001097>)) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]
Use of non-simple property in a restriction: ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/BFO_0000040>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_01001842> ObjectIntersectionOf(ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/RO_0000086> <http://purl.obolibrary.org/obo/PATO_0001023>) ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/BFO_0000040>))) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]
Use of non-simple property in a restriction: ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01001097>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_01001096> ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01001097>)) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]
Use of non-simple property in a restriction: ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01000799>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_01001066> ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01000799>)) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]
Use of non-simple property in a restriction: ObjectMaxCardinality(1 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01000760>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_01000900> ObjectMaxCardinality(1 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01000760>)) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]
Use of non-simple property in a restriction: ObjectMinCardinality(1 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01000760>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_01000898> ObjectMinCardinality(1 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01000760>)) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]
Use of non-simple property in a restriction: ObjectMinCardinality(1 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01000739>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_01001174> ObjectMinCardinality(1 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01000739>)) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]
Use of non-simple property in a restriction: ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/BFO_0000067> <http://purl.obolibrary.org/obo/ENVO_02500000>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_01001353> ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/BFO_0000067> <http://purl.obolibrary.org/obo/ENVO_02500000>)) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]
Use of non-simple property in a restriction: ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01000760>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_01000899> ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01000760>)) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]
Use of non-simple property in a restriction: ObjectMaxCardinality(1 <http://purl.obolibrary.org/obo/RO_0002608> <http://purl.obolibrary.org/obo/ENVO_01000799>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_01001228> ObjectIntersectionOf(ObjectSomeValuesFrom(<http://purl.obolibrary.org/obo/BFO_0000067> <http://purl.obolibrary.org/obo/ENVO_01001130>) ObjectMaxCardinality(1 <http://purl.obolibrary.org/obo/RO_0002608> <http://purl.obolibrary.org/obo/ENVO_01000799>))) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]
Use of non-simple property in a restriction: ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01001097>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_01001095> ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01001097>)) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]
Use of non-simple property in a restriction: ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01001097>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_01001094> ObjectMinCardinality(2 <http://purl.obolibrary.org/obo/RO_0000057> <http://purl.obolibrary.org/obo/ENVO_01001097>)) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]
Use of non-simple property in a restriction: ObjectMinCardinality(1 <http://purl.obolibrary.org/obo/RO_0001015> <http://purl.obolibrary.org/obo/ENVO_00000073>) [SubClassOf(<http://purl.obolibrary.org/obo/ENVO_00000062> ObjectMinCardinality(1 <http://purl.obolibrary.org/obo/RO_0001015> <http://purl.obolibrary.org/obo/ENVO_00000073>)) in OntologyID(OntologyIRI(<http://purl.obolibrary.org/obo/envo.owl>) VersionIRI(<http://purl.obolibrary.org/obo/envo/releases/2021-05-14/envo.owl>))]

@cmungall
Copy link
Member Author

Thanks @wdduncan, great detective work!

So I think the unparseable triple warning is distinct from everything else here. I would make a separate ticket for this. You can find some more context on this here: obi-ontology/obi#1289

When domain/range constraints are added, freezing fog is found to be unsatisfiable.

Great, this is exactly what we want. We want to be able to detect all incoherencies in the ontology, and fix them as soon as possible, otherwise they leak upstream and cause all kinds of issues.

We need to first fix the incoherencies in ENVO. These are. like compilation errors in programs, we just shouldn't be releasing the ontology with these in.

Let's fix this:

#1181

Immediately after we put the stricter check into the pipeline so this doesn't happen again

Adding domain/range constraints also results in violating the DL profile.

Good catch. So what I notice about this list is that it is all RO. Yet RO does not itself have this profile violation. This means there is something in envo.owl that is interacting and causing this. I imagine it is one of two things:

  1. A stale ro_import.owl
  2. Axiom injection. An OBO-wide problem though here it is likely unintentional

@kaiiam
Copy link
Contributor

kaiiam commented Aug 25, 2021

@wdduncan and @cmungall you guys rock thanks for finding this! I'm in support of your plan to fix this.

@wdduncan
Copy link
Member

RO has the simple properties:

  • has primary input or output
    def: p 'has primary input of output' c iff either (a) p 'has primary input' c or (b) p 'has primary output' c.
  • has primary input
    def: p has primary input c if (a) p has input c and (b) the goal of process is to modify, consume, or transform c.

The definition for has primary input is quite broad. Are we happy with using this property for things like earthquakes?

@cmungall
Copy link
Member Author

cmungall commented Aug 27, 2021 via email

@dr-shorthair
Copy link

dr-shorthair commented Aug 27, 2021

Earthquake is a tricky one.

From an engineering viewpoint, an earthquake is ground movement (vibration) at a location, as a result of various source phenomena at a distance. The characteristic properties are time, amplitude, acceleration etc at the observing location.

From the viewpoint of most geologists and geophysicists, the earthquake is the source phenomenon. Usually underground fault-slippage or fracturing, but maybe cavity collapse, an underground explosion, etc. The characteristic properties are location, timing, focal-mechanism, moment, etc of the natural or artificial phenomenon at the source.

These phenomena are causally related, but different, though often given the same name.

@kaiiam
Copy link
Contributor

kaiiam commented Aug 27, 2021

Thanks @dr-shorthair. Yes we should make a separate ticket for earthquakes.

I guess the question now (as @wdduncan put it in #1072) is do we use some simple object properties to replace OPs has participant in axioms like has participant min 2 techtonic plate? Or do we keep those OPs and remove the qualified cardinality restrictions (e.g. min 2) from the axiom and maybe shove it into an AP on the axiom or similar?

@cmungall
Copy link
Member Author

@kaiiam - great idea to put the cardinality as an axiom annotations on a plain existential axiom using the existing object property. Would that be acceptable to you @pbuttigieg?

@wdduncan
Copy link
Member

@cmungall are you referring to annotation approach I proposed here?

We would need to create a annotation (e.g., 'cardinality' or 'qualified cardinality constraint') to capture this information. Do you prefer that instead of creating a fake object property?

@kaiiam
Copy link
Contributor

kaiiam commented Sep 2, 2021

@wdduncan I was trying to recap what you had suggested there so we can make a decision on it. @cmungall @pbuttigieg thoughts or preferences?

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.

4 participants