Skip to content
Damion Dooley edited this page Jun 28, 2023 · 13 revisions

To edit FoodOn

The /src/ontology/foodon-edit.owl is the main OWL file to be edited using Protege or by hand. Files in /src/ontology/imports/ folder that can be edited by hand are the Ontofox specification files (ending in .txt) which prepare the import of terms from other OBOFoundry.org ontologies into the corresponding [ontology]_import.owl files.

To build (regenerate) the FoodOn release files

  1. Open a linux terminal and cd to the FoodOn github repo's /src/ontology/ folder
  2. type "make" to generate the /src/ontology/foodon.owl file. This also updates any /imports/ .owl files based on changes to their [ontology]_ontofox.txt specification files - according to a list given in the Makefile file.
  3. type "make prepare_release" to generate the root folder foodon.owl file and copy all the /src/imports/ .owl files to the main /imports/ folder.

The ELK reasoner is run as part of this, but to run that separately and take care of any equivalency duplications etc, run:

make reason

Encountering bad RDF datatype literal values

If when running make or when running "robot" directly you encounter obscure robot OWLAPI errors such as "java.lang.IllegalArgumentException: URI is not absolute", without enough indication about where this URI is located, then install Apache jena and use the "riot" command to validate an owl/xml version of foodon-edit.owl. (For Mac users, to install riot, use "> brew install jena"). In Protege, save a copy of foodon-edit.ofn (which is in rdf/xml syntax) or foodon-merged.ofn to an owl/xml syntax as foodon-validate.owl :

riot -v --validate foodon-validate.owl

If riot complains with an error: "JAXP00010001: The parser has encountered more than "64000" entity expansions in this document; this is the limit imposed by the JDK.", then adjust the "entityExpansionLimit" parameter, and rerun:

export JVM_ARGS="$JVM_ARGS -DentityExpansionLimit=250000"

or prepend the call

JVM_ARGS="$JVM_ARGS -DentityExpansionLimit=2500000" riot --set ttl:entityExpansionLimit=0 --validate ../../foodon.owl

After a successful make build, you can test that robot is able to read genepio correctly via:

robot convert -i foodon-merged.owl -o foodon.json

TO DO: Explain /src/ontology/imports/robot/ files and their parent.