-
Notifications
You must be signed in to change notification settings - Fork 1
Add ODK crash course #23
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
e4cb303
Create ontologies_notes.md
JakobBerg 8e89875
Add TOC for Ontologies section in index.md
JakobBerg c1daae7
Add note for public ontology entries
JakobBerg 94a08e5
add ontology editing tutorial
shawntanzk 4252850
minor changes
shawntanzk cca8760
Merge branch 'main' into ontology-addition
enryH ad407a3
Apply suggestion from @enryH
txellext a682445
Apply suggestion from @enryH
txellext 85abd01
Apply suggestion from @enryH
txellext ef0873b
Apply suggestion from @enryH
txellext 53601e1
Apply suggestion from @enryH
txellext 50dd1d6
Apply suggestion from @enryH
txellext c797ae6
Apply suggestion from @enryH
txellext bea7b37
Apply suggestion from @enryH
txellext 71e65b3
Apply suggestion from @enryH
txellext 9a3184a
Apply suggestion from @enryH
txellext 00bb906
Apply suggestion from @enryH
txellext b08b0d6
Apply suggestion from @enryH
txellext 596a103
Apply suggestion from @enryH
txellext 8b5a408
Apply suggestion from @enryH
txellext ae3c49f
Apply suggestion from @enryH
txellext 12a53fa
Apply suggestion from @enryH
txellext e31c9aa
Apply suggestion from @enryH
txellext 14d37ee
Apply suggestions from code review: set tutorial URLs and define IRI
enryH File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| <B> !!! WORK IN PROGRESS !!! </B> | ||
|
|
||
|
txellext marked this conversation as resolved.
Outdated
|
||
| # Ontology Development Kit (ODK) Crash Course | ||
|
|
||
| Aim: To kickstart your journey into using the ODK, providing the foundations on which further development can be done | ||
|
|
||
| Goals: | ||
| - You understand the what the ODK is and how to use it in ontology development | ||
| - You are able to handle basic editing of the PREFER ontology using the ODK | ||
| - You know how to find documentation and help if you need it in the future | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| 1. Download and install [GitHub Desktop](https://desktop.github.com/) if you are unfamiliar with git commands. | ||
| 1. Download and install [Protege](https://protege.stanford.edu/software.php#desktop-protege). See instructions on how to set up Protege [here](../howto/set-up-protege.md) | ||
|
enryH marked this conversation as resolved.
Outdated
|
||
| 1. Install [ELK reasoner in protege](../howto/installing-elk-in-protege.md) if your version does not already come with it | ||
|
enryH marked this conversation as resolved.
Outdated
|
||
| 1. [Setting up ODK](../howto/odk-setup.md) | ||
|
enryH marked this conversation as resolved.
Outdated
|
||
|
|
||
| ## Day 1 Agenda | ||
|
|
||
| ### OBO Community | ||
|
|
||
| - Documentation developed by the OBO community can be found in the [OBOOK](https://oboacademy.github.io/obook/) | ||
| - OBO community communicates through [slack](https://obo-communitygroup.slack.com/) (if you need an invite to join, please send an email to shawntanzk@outlook.com) | ||
|
|
||
| ### Introduction to Ontologies | ||
|
|
||
| 1. [Basic intro to ontologies](https://oboacademy.github.io/obook/explanation/intro-to-ontologies/) | ||
| 2. Modelling: [Logical Axioms](https://oboacademy.github.io/obook/explanation/logical-axiomatization/) & [Object Properties](https://oboacademy.github.io/obook/lesson/modelling-with-object-properties/) | ||
|
|
||
| Further reading for modelling: | ||
|
|
||
| 1. Understanding existential restrictions through [this explainer](https://oboacademy.github.io/obook/explanation/subClassOf-vs-equivalentTo/) and this explainer(https://oboacademy.github.io/obook/explanation/existential-restrictions/) | ||
| 2. if you want some really indepth modelling tutorial, see FHKB tutorial [here](https://oboacademy.github.io/obook/tutorial/fhkb/)) | ||
|
|
||
|
|
||
|
|
||
| ### Ontology Development Kit Basics | ||
|
|
||
| The Ontology Development Kit (ODK) provides a set of standardized, customizable and automatically executable workflows, and packages all required tooling in a single Docker image. | ||
|
|
||
| Key Features: | ||
|
|
||
| 1. Standardised layout for repos to minimise time finding files. | ||
| 2. Standardised workflows which allow users to work with other ontologies without relearning processes. | ||
| 3. Dynamic import to allow users to easily mantain terms imported from other ontologies. | ||
|
|
||
| #### Anatomy of an ODK ontology | ||
|
|
||
| All ODK repos have standard file layout. The key files you should know are | ||
|
|
||
| 1. src/ontology/ont.yaml - the config file which ODK reads to build your repo | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
| 2. src/ontology/ont-edit.owl - the file that you should edit on | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
| 3. src/ontology/ont.makefile - custom code that the repo uses that defers from vanilla ODK | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
| 4. src/ontology/imports/ont.txt - files to add ontology terms to be imported | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
| 5. src/ontology/profile.txt - configuration of QC reports/checks | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
|
|
||
| Other files will be covered as needed | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
|
|
||
| #### Creating your ODK ontology | ||
|
|
||
| Tutorial can be found [here](https://oboacademy.github.io/obook/tutorial/setting-up-project-odk/) - if you already have an ontology and want to migrate it, you can move the terms ot the edit file after initialising your ODK ontology. | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
|
|
||
| ### How to edit in protégé | ||
|
|
||
| 1. [Editing a term in protege](https://oboacademy.github.io/obook/howto/edit-in-protege/) - remember, let the reasoner do the work! | ||
| 2. [Creating a new term in protege](https://oboacademy.github.io/obook/howto/create-new-term/) | ||
| 3. [Obsoleting a term in protege](https://oboacademy.github.io/obook/howto/obsolete-term/) | ||
| 4. [Merging a term in protege](https://oboacademy.github.io/obook/howto/merge-terms/) | ||
|
|
||
| ## Day 2 Agenda | ||
|
|
||
| ### Managing Imports with ODK | ||
|
|
||
| A key function of the ODK is the handle dynamic imports. To avoid clashes in imports, I would reccomend using merged imports in the ODK. Here is an example of what you should add to your yaml config file: | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
|
|
||
| ```yaml | ||
| import_group: | ||
| use_base_merging: TRUE | ||
| products: | ||
| - id: ro | ||
| use_base: TRUE | ||
| ``` | ||
|
|
||
| The ODK mantains a set of ontology shorthands where you can just use the id and add use_base, and it will automatically work. However, in certain cases, you need to define where the mirror is from (where to download the ontology file), ask the ODK to make a base file where a base file is not available, and/or define what the base IRI are. An example would look like: | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
|
|
||
| ```yaml | ||
| - id: bao | ||
| mirror_from: http://www.bioassayontology.org/bao/bao_complete.owl | ||
| make_base: TRUE | ||
| base_irirs: | ||
| - http://www.bioassayontology.org/ | ||
| ``` | ||
| There are some ontologies (eg chebi and NCBITaxon) which are huge, please look at [this document](https://oboacademy.github.io/obook/howto/deal-with-large-ontologies/) for managing such ontologies. | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
|
|
||
| Once you have configured your imports and update your repo using `sh run.sh make update_repo`, you should see .txt files in your src/ontology/imports folder. To import terms to your ontology, add them into the .txt file, and run `sh run.sh make imports/merged_import.owl`. This will download the mirrors, extract out terms relavent to what you have added, and merge all subgraphs into merged_import.owl. | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
|
|
||
| From there you can use the imported terms in your edit file. | ||
|
|
||
| ### Hands on Tutorial | ||
|
|
||
| 1. Clone https://github.com/EBISPOT/ontology_editor_training/ | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
| 2. Given that 'Chardonnay wine' is a generic names for wines made from Chardonnay (varietal) grapes, add a term for Chardonnay (wine) with an appropriate logical definition. | ||
| - What does the reasoner classify as Chardonay? | ||
| 3.View the relationships (subClassOf axioms) of Chianti (wine). How might these frustrate attempts to classify wines using the pattern you just used to define Chardonay wine? | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
| 4. Add a term for [Rosé wine](https://en.wikipedia.org/wiki/Ros%C3%A9) or [orange wine](https://en.wikipedia.org/wiki/Orange_wine) and some terms for specific wines that will be auto-classified under it. | ||
| 5. Add an import for [the food ontology](https://github.com/FoodOntology/foodon) to the ODK repo, and import FOODON:00002364 and replace wine with the FOODON term for wine | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
|
|
||
| ### Release Management | ||
|
|
||
| The newer version of ODK utilises github releases rather that uploading everything directly to github. This change was made to deal with ever larger ontologies and the limitations of how much can be hosted on a github repo. | ||
|
txellext marked this conversation as resolved.
Outdated
|
||
|
|
||
| For release management workflow, please utilise [the workflow shown in CL documentation](https://github.com/obophenotype/cell-ontology/blob/master/docs/cl-release.md) and update it for your ontology. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.