Skip to content
Damion Dooley edited this page Dec 6, 2018 · 8 revisions

This Wiki has largely been superseded by the new https://foodon.org website which now contains most of the content that was here. What remains is information relevant to building the FoodOn owl files.

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. Note that the uberon_ontofox.txt, ncbitaxon_ontofox.txt, and chebi_ontofox.txt specification files are actually generated from templates in the /src/ontology/imports/langual/ folder, so update those templates if you want additions to uberon, ncbitaxon and chebi to survive another future import of LanguaL updated terms.

To regenerate the 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.

To update LanguaL (once a year, say)

The following mechanism was created to enable FoodOn to import LanguaL updates on an annual basis. To do the LanguaL2014.XML file import:

  1. open a linux terminal and cd to /src/ontology/imports/langual/ folder
  2. issue a "python langual.py" command. This compares the XML file's contents to the database.json import control data structure, adds new content and state information to the json database, and then writes the OWL file as well as an OntoFox compatible /src/ontology/imports/ncbitaxon_ontofox.txt , uberon_ontofox.txt, chebi_ontofox.txt files. The database.json file holds a representation of the LanguaL XML file contents, along with value overrides. It is created with some input from lookup.txt, which maps certain LanguaL entries over to their equivalents in other OBOFoundry ontologies; these overrides are then added to the template .txt files to create the /imports/ folder OntoFox files. The "make" command consults OntoFox to convert those files into .owl import files.
  3. change directory to the "/src/ontology/" folder, and run "make". That will fetch the ontofox updates if need be, producing new XYZ_import.owl files.

langual.py may need a few python modules loaded up. It can take a number of minutes to generate if database.json is already established; it will take much longer to run if database.json has been deleted since it fetches NCBITaxon related information using the EOL.org API (in batches).

Deprecated terms and SIREN terms

The inital LanguaL import has many deprecated terms mainly because we chose to phase out LanguaL's facet H "[ingredient] added" items. These were never in circulation in previous FoodOn versions, but a regeneration of the langual.xml file puts them in the langual_import.owl file. The objective is to drop them from there, but ensure two things:

  1. before dropping the terms via Protege while working on foodin-edit.owl, make sure the SIREN food product slim (subset_siren_import.owl) import is not loaded in the direct imports list, or deleting deprecated terms will also damage the SIREN items at moment. Soon SIREN will have these items phased out.
  2. only delete deprecated terms which do not exist in the live FoodOn (previous) version deprecated term list. The deleted terms will mirror the ones detailed in the langual_deprecated_import.owl file, a file that only exists to make it easier to work on the SIREN database (this way we can see clearly what terms are deprecated in SIREN, and work on replacing them).
Clone this wiki locally
You can’t perform that action at this time.