-
Notifications
You must be signed in to change notification settings - Fork 1
Working inside the odk container
A little guidance on how to quickly set up an OBO-compliant ontology development environment using the INCATools Ontology Development Kit.
Pull the odkfull instance from dockerhub. You only need to do this when you need a new dockerfile or you need updates.
docker pull obolibrary/odkfull
Run a bash terminal in the container interactively with enough memory to handle CHEBI and NCBITaxon.
docker run --cpus 4 --memory="6g" -it obolibrary/odkfull /bin/bash
You'll get a swapiness error, but the containerised bash should load
with a bash-#.#
prompt
Clone the ontology repo you want to work with and get into the src directory
git clone https://github.com/EnvironmentOntology/biorealm.git
cd biorealm/src/ontology/
MAKE SURE YOU'RE ON THE BRANCH YOU WANT TO BE ON You'll be on master by default.
If this is a freshly spun up container, you'll need to refresh your git user ID variables:
git config --global user.email "[YOUR EMAIL]"
git config --global user.name "[YOUR GITHUB USER NAME]"
Let's attempt a CHEBI min-graph import...
make imports/chebi_import.owl
``
Here's the abbreviated trace:
make imports/chebi_import.owl
wget --no-check-certificate http://purl.obolibrary.org/obo/chebi.owl -O
mirror/chebi-local.owl && touch mirror/chebi-local.owl
--2019-09-04 09:23:59-- http://purl.obolibrary.org/obo/chebi.owl
Resolving purl.obolibrary.org... 52.3.123.63
Connecting to purl.obolibrary.org|52.3.123.63|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: ftp://ftp.ebi.ac.uk/pub/databases/chebi/ontology/chebi.owl
[following]
--2019-09-04 09:23:59--
ftp://ftp.ebi.ac.uk/pub/databases/chebi/ontology/chebi.owl
=> 'mirror/chebi-local.owl'
Resolving ftp.ebi.ac.uk... 193.62.197.74
Connecting to ftp.ebi.ac.uk|193.62.197.74|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done. ==> PWD ... done.
==> TYPE I ... done. ==> CWD (1) /pub/databases/chebi/ontology ... done.
==> SIZE chebi.owl ... 497796725
==> PASV ... done. ==> RETR chebi.owl ... done.
Length: 497796725 (475M) (unauthoritative)
chebi.owl
100%[====================================================================================================================>]
474.74M 90.2MB/s in 5.5s
2019-09-04 09:24:05 (86.8 MB/s) - 'mirror/chebi-local.owl' saved [497796725]
owltools --no-debug mirror/chebi-local.owl --log-debug
--remove-annotation-assertions -l --remove-dangling-annotations
--make-subset-by-properties -f BFO:0000050 BFO:0000051 RO:0002202
immediate_transformation_of RO:0002176 IAO:0000136 -o mirror/chebi.owl
2019-09-04 09:24:56,750 INFO (CommandRunner:1219) Number of annotation
assertion axioms:1785995
2019-09-04 09:24:56,752 INFO (CommandRunner:1220) Axioms to preserve:151506
2019-09-04 09:24:56,807 INFO (CommandRunner:1222) Number of annotation
assertion axioms being removed:1634489
2019-09-04 09:24:56,808 INFO (CommandRunner:1231) Total number of
axioms being removed, including annotation properties:1634522
2019-09-04 09:25:00,567 INFO (Sim2CommandRunner:211) Removing 0 axioms
[...]
robot annotate --input modules/entity_quality_location.tmp.owl -O
http://purl.obolibrary.org/obo/envo/modules/entity_quality_location.owl
--output modules/entity_quality_location.owl && rm
modules/entity_quality_location.tmp.owl
owltools --catalog-xml catalog-v001.xml envo-edit.owl
--merge-imports-closure --export-table imports/seed.tsv.tmp && cut -f1
imports/seed.tsv.tmp | grep purl.obolib | sort -u > imports/seed.tsv
cut -f1 imports/chebi_terms.txt imports/seed.tsv | sort -u >
imports/chebi_combined_seed.tsv
robot extract -i mirror/chebi.owl -T imports/chebi_combined_seed.tsv -m
BOT -O http://purl.obolibrary.org/obo/envo/imports/chebi_import.owl -o
imports/chebi_import.owl.tmp.owl && mv imports/chebi_import.owl.tmp.owl
imports/chebi_import.owl
rm imports/chebi_combined_seed.tsv
Let's push the changes. You'll likely need to declare the git user variables the first time you run the container (or if it updates)
bash-4.4# git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: imports/chebi_import.owl
Untracked files:
(use "git add <file>..." to include in what will be committed)
dosdp-tools.log
imports/seed.tsv
no changes added to commit (use "git add" and/or "git commit -a")
bash-4.4# git add -u
bash-4.4# git commit -m 'updated CHEBI import'
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'root@7e6002aeea91.(none)')
bash-4.4# git config --global user.email "[YOUR EMAIL]"
bash-4.4# git config --global user.name "[YOUR GITHUB USERNAME]"
bash-4.4# git commit -m 'updated CHEBI import'
[master a637c36] updated CHEBI import
1 file changed, 11 insertions(+), 2 deletions(-)
bash-4.4# git push
Enumerating objects: 11, done.
Counting objects: 100% (11/11), done.
Delta compression using up to 40 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 599 bytes | 599.00 KiB/s, done.
Total 6 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
To https://github.com/EnvironmentOntology/envo.git
6c707c3..a637c36 master -> master