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

[Experimental] Replace OWLTools with ODK ROBOT plugin #3476

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

gouttegd
Copy link
Collaborator

@gouttegd gouttegd commented Feb 7, 2025

⚠️ Experimental, never merge ⚠️

This PR attempts to remove most of the remaining uses of OWLTools throughout the custom Makefile, using a proposed ODK ROBOT plugin where necessary.

One of the most important uses of OWLTools currently is for the production of ontology subsets, which is done using a variety of OWLTools commands:

1. --extract-ontology-subset

Used to extract a subset defined by a oboInOwl:inSubset annotation within the ontology. What we can use to replace this command with ROBOT depends on whether the --fill-gaps option is used:

1.1. without --fill-gaps (e.g. for the “combo” subset)

We can replace by the standard ROBOT command robot extract --method subset (after manually extracting the list of classes annotated as belonging to the desired subset). One difference is that the ROBOT command does not include relationships by default, we must explicitly specify the relationships we want to see in the subset.

1.2. with --fill-gaps

Cannot be reproduced by any standard ROBOT command, but can be replaced by the odk:subset command of the proposed ROBOT ODK plugin.

2. --reasoner-query [...] --make-ontology-from-results

Used to extract a subset defined by a DL query (e.g. 'part of' some 'renal system' for the renal-minimal subset). Cannot be reproduced by any standard ROBOT command, but can be replaced by the odk:subset command (with the --query option) of the proposed ROBOT ODK plugin.

3. --mingraph --make-subset-by-properties

Used to create the -basic versions of the composite ontologies (e.g. composite-metazoan-basic.owl. Cannot be exactly reproduced by any standard ROBOT command, but can be reasonably approximated by a combination of several filter/remove operations (this is roughly similar to the standard ODK rule to create the ODK-defined -basic release artefacts).

That file was supposedly used by "several of the subset" rules, but
actually is not used anywhere.
Most subsets in Uberon are currently created by various OWLTools
commands. Whenever possible, we replace them by corresponding ROBOT
commands.

* Subsets created by `--reasoner-query --make-ontology-from-results`:
  Replaced by `odk:subset --query`, using the ODK ROBOT plugin.

* Subsets created by `--extract-ontology-subset --fill-gaps`:
  Replaced by `odk:subset --fill-gaps true`, using the ODK ROBOT plugin.

* Subsets created by `--extract-ontology-subset` (without the
  `--fill-gaps` option, meaning that gaps should be spanned instead):
  Replaced by `extract --method subset`.
The -basic versions of the composite ontologies are currently produced
mostly with OWLTools.

Here we attempt to replace OWLTools by a ROBOT pipeline that does
approximately the same tasks as the original OWLTools commands.
@gouttegd gouttegd added the tech label Feb 7, 2025
@gouttegd gouttegd self-assigned this Feb 7, 2025
The list of prerequisites for the cumbo subset was bogus, with a missing
space between prerequisites...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant