Ontology for Biomedical Investigations
The Ontology for Biomedical Investigations (OBI) helps you communicate clearly about scientific investigations by defining more than 2500 terms for assays, devices, objectives, and more.
Our ontology terms come in three groups. Depending on what type of term you want to edit or add, you have to go through different routes:
- external terms (from other ontologies): We use OntoFox for imports. Edit the corresponding
- template terms: We use ROBOT templates to convert spreadsheets to OWL. Edit the relevant
- other terms: Edit
See below for a full list of files, build instructions, and instructions on using Git and GitHub for OBI.
README.mdthis overview document
obi.owlthe latest release of OBI
Makefilescripts for building OBI
views/various specialized views of OBI
ontology/source files for OBI
obi-edit.owlthe main OBI OWL file
core.txtthe list of OBI Core terms
external-byhand.owlsome custom imports from other ontologies
catalog-v001.xmlan artisinal list of OWL import overrides
templates/ROBOT template files for various branches of OBI
modules/the results of the ROBOT templates
OntoFox_inputs/OntoFox configuration files for importing from other ontologies
OntoFox_outputs/OntoFox result files
sparql/SPARQL queries for building and validating OBI
views/configuration for views
Makefile contains scripts for building OBI. On macOS or Linux, you should just be able to run
make or one of the specific tasks below. On Windows consider using some sort of Linux virtual machine such as Docker or Vagrant. Most results will be in the
build/ directory. If you have trouble, contact James.
make testmerge and run SPARQL tests (this is run on every push to GitHub)
make sortsort templates, and fix quoting and line endings
make importsupdate OntoFox imports
make modulesupdate ROBOT templates
make obi.owlbuild the release file; reasoning can take about 10 minutes
make viewsupdate ROBOT templates
make allprepare for a release, runs
obi-edit.owlinto a single file, don't reason
make cleanremove temporary files
We use git and GitHub to develop OBI. There's a lot of good documentation on both:
Initial Set Up
Before you can start developing with OBI, you will need to do some initial setup:
sign up for a GitHub account
if you're using macOS and Excel, set up a pre-commit hook (see below for details):
ln -s ../../src/scripts/check-line-endings.sh .git/hooks/pre-commit
Changes should be made in manageable pieces, e.g. add one term or edit a few related terms. Most changes should correspond to a single issue on the tracker.
Start from a local copy of the
master branch of the OBI repository. Make sure your local copy is up-to-date. Make your changes on a new branch. Please use the OBI Term ID Reservations sheet to manage new IDs.
When you're ready, push your branch to the OBI repository and make a Pull Request (PR) on the GitHub website. Your PR is a request to merge your branch back into
master. Your PR will be tested, discussed, adjusted if necessary, then merged. Then the cycle can repeat for the next change that you or another developer will make.
These are the steps with their CLI commands. When using a GUI application the steps will be the same.
git fetchmake sure your local copy is up-to-date
git checkout masterstart on the
git checkout -b your-branch-namecreate a new branch named for the change you're making
- make your changes
git diffinspect your changes
git add --update src/add all updated files in the
src/directory to staging
git commit --message "Description, issue #123"commit staged changes with a message; it's good to include an issue number
git push --set-upstream origin your-branch-namepush your commit to GitHub
- open https://github.com/obi-ontology/obi in your browser and click the "Make Pull Request" button
Your Pull Request will be automatically tested. If there are problems, we will update your branch. When all tests have passed, your PR can be merged into
master. Rinse and repeat!
Keeping Things Tidy
The easiest way to edit our
src/ontology/template/ files is with Excel. Unfortunately Excel on macOS uses old line endings, and this messes up our diffs.
For clean diffs, we also like to keep out templates sorted by ID.
make sort command will fix line endings and sorting by running all the templates through a Python script.