Pre-process OBOs to avoid axiom conflicts
Would like to retain hierarchies within OBOs when present (i.e., going beyond base versions, or using "maximal" versions when available) but want to avoid axiom conflicts.
Describe the desired behavior
Final TSV node and edge lists should contain reasoned relationships inherited from imported OBOs but should avoid reliance upon axioms likely to conflict upon graph assembly.
ROBOT can do this when used as a pre-processing step: See https://github.com/INCATools/ubergraph/blob/0bcc3864d5bb90b02029ef59147351e190188d11/Makefile#L19-L25
But this may not handle everything?
Additional context
Phenotype ontologies (e.g., upheno, hpo) may require specific concerns re: reasoning.
See also https://github.com/INCATools/ontology-development-kit/issues/454
So if the base-plus exists, use that. If not, use whatever the "maximal" version is, which might just matter for GO. If that's not true, use the release version - and that or the previous will require preprocessing with ROBOT as above to handle reasoning (which will require a custom OWL), and then a ROBOT remove operation.
The phenotype ontologies are listed here: https://github.com/obophenotype/upheno#contributing-ontologies
For ROBOT merge, command may resemble this:
robot merge -i hp.owl -i pheno-supplement materialize —property UPHENO:something -o hp-plus.owl
Also consider Py4j to run ROBOT.
Uberon has cross-refs to species-specific ontology entries and we'd like to capture those somewhere as well - this may be its own issue.
GO may need special treatment to ensure we download the version as described above - see http://www.obofoundry.org/ontology/go.html
Thanks Harry for the ticket. Here's the pseudo-code I wrote during the meeting, if this helps:
For each ontology:
if base plus owl exists, use that
elif this is GO, use maximal version (go/extensions/go-plus.owl)
elif release owl exists use that and prune:
run robot remove as here: https://github.com/INCATools/ubergraph/blob/0bcc3864d5bb90b02029ef59147351e190188d11/Makefile#L19-L25
if this is a phenotype ontology (https://github.com/obophenotype/upheno#contributing-ontologies):
fix subq pattern:
robot merge -i hp.owl -i pheno-supplement materialize —property UPHENO:something -o hp-plus.owl`
convert to KGX TSV, etc
Consider robot merge piped to robot convert
(this doesn't need to be piped with a | - robot will parse both keywords in a single command).
Merge will follow imports, imports-of-imports, etc.
One concern - this could make for a very large output in some cases!