Index > Ontology development setup Edit on GitHub

Ontology development setup

Ontology development setup

Intro

This file documents the steps needed to create a working development environment for NIFSTD.

NIFSTD development uses this repo, git (GitHub), pyontutils (Python3.6), Protege, ELK, FACT++, and InterLex.

NIFSTD development also uses SciGraph (Java8), and OWLAPI (see pyontutils for more information).

If you need more details than provided by this document, setup.org provides an exhaustive guide to setting up all NIF related tools.

git

Set up git. This guide can be helpful..

We only accept pull requests with commits that have an email address.

Please be sure to set your commit email.
NOTE: If you are new to open source development I recommend creating a new email specifically for all development related activities.

If you have never used git before check out the git bootcamp guides and if you have never used GitHub before check out the GitHub guides.

repo

If you do not have push rights to SciCrunch/NIF-Ontology, please fork the repo so that you can push commits to a remote that can submit pull requests.

cd ~/git/
git clone https://github.com/${github_username}/NIF-Ontology.git
# OR if you have push rights to the SciCrunch org repo
git clone https://github.com/SciCrunch/NIF-Ontology.git

My default development setup assumes that all git repos live in ~/git/, so if your setup is different you should adjust accordingly. Note that many of the scripts in pyontutils avoid this issue by using /tmp/ as the default location for local git repos and the --git-local option can be used to adjust accordingly. However, not all scripts have been updated with these assumptions, so if you encounter a FileNotFoundError that is likely the cause.

ttlfmt

If you are working in Protege then you will need the ttlfmt tool to format the files you change to match the conventions used in the ontology. You will need >=python-3.5 installed on your system. In a terminal run pip3 install ttlser[ttlfmt]. This will install the ttlfmt command and you can format files from the ontology by running ttlfmt my-ontology-file.ttl. Adjust the pip install command to match your system as needs be.

nifstd-tools and friends

If you need the python codebase that supports the ontology please follow the instructions Install nifstd-tools by following the installation instructions here.

Protege

Download and install the latest version of Protege here. You need >=protege-5.5.0 because all pevious versions have a nasty bug that mangles the iris in nifstd ttl files when you try to save your changes.

NIFSTD is a very large ontology which requires more memory than the Protege defaults.

The Protoge instructions for setting the memory size (heap size) for different platforms are here. For command line execution, modify run.sh (or equivalent) so that it launches java with jre/bin/java -Xmx8G -Xms500M \ (or similar). If you do not you will see the following line in the protege logs:
An error occurred whilst loading the ontology at Java heap space. Cause: {}.

Make sure that Expand trees by default is disabled in menu File -> Preferences -> General otherwise load times can stretch on for many minutes.

Catalog

There is an example ontology catalog catalog-v001.xml.example that should be installed by running cp catalog-v001.xml.example catalog-v001.xml. The file itself is not tracked to prevent conflicts when switching branches.

Reasoners

You can obtain copies of ELK and FACT++ by launching protege and going to menu bar File -> Check for plugins and selecting ELK and FACT++. NOTE: sometimes the plugin repos don't load, if that happens try again. Otherwise you can download the reasoner plugins and put them in Protege-*/plugins/. If you are on OSX the folder is /Applications/Protégé.app/Contents/Java/plugins.

InterLex

InterLex provides all new identifiers for NIFSTD. You will need a SciCrunch account in order to access the InterLex web api and to use InterLex to create new terms. NOTE: At the moment only curators can add terms so let us know if you need access.

Date: 2020-08-16T13:59:56-04:00

Author: Steve Van Hooser, Tom Gillespie

Created: 2022-12-22 Thu 01:37

Validate