Imports¶
Updating imoprts is needed whenever logical axioms that reference external ontologies are added but the classes being referenced have no labels or other logical definitions. Updating an import for those classes will bring in the labels, annotations, and logical axioms into the import file, and therefore into the Mondo ontology.
Regenerate import file¶
See the imports/ folder.
See Design Pattern section for more details on patterns that reference external ontologies and how these are used.
Instructions¶
If you need to remake the import "foo" (replace "foo" with the name of your file, for example ncbitaxon_import):
If you have Docker installed (note - you may need to increase your memory in Docker to 24GB):
- Navigate to your local ontology directory, for example:
cd src/ontology
- Work on a branch.
- If the mirror directory exists, make sure it's empty or just delete it with
rm -rf mirror
and recreate it withmkdir mirror
. If the mirror directory exists and it contains the ontology being reimported the generated import will be made from an outdated mirroring of the source ontology and will not contain the latest content from the source ontology. If the mirror directory does not exist, make a mirror directory withmkdir mirror
- Run command:
./run.sh make imports/foo_import.obo
- For example:
./run.sh make imports/ncbitaxon_import.obo
- Note - if you don't have Docker installed but have Robot installed, run this command:
make imports/foo_import.obo
- For example:
make imports/ncbitaxon_import.obo
- Note - this can take a while to run.
- Note - if it failed with a message saying the source ontology is not available, try again later.
- For example:
- Do the diff on ncbitaxon_import. We expect new classes and some subClassOf changes. A new foo_import.obo file will be created in the imports folder (for example: ncbitaxon_import.obo). Run command:
git diff
- If you are expecting new classes to be added, check to see if those were added. For example: check the coronovirus shows up in the new import
grep 2697049 imports/ncbitaxon_import.obo
- 2697049 = ID for class I am trying to import.
- Commit the foo_import.* file (for example:
ncbitaxon_import.obo
andncbitaxon_import.owl
) (if you see changes on any other files, discard the changes on the other files):
git add imports/foo_import.obo
git add imports/foo_import.owl
git status
- only those two files should be added and ready to be committed. There will be some untracked files as well, which should not be added or committed.
git commit
git push
- Once you regenerated the new import, it could contain newly deprecatecd classes from the source ontology and this could affect the Mondo ontology by creating danglers/obsolete references. To fix this, follow the instructions in Repair axioms pointing to deprecated classes.
Increase memory in Docker (Mac specific instructions)¶
- Open Docker preferences
- Click Resources
- Increase memory to 24 GB