Skip to content

Add classes from external ontologies

Nico Matentzoglu edited this page Feb 10, 2020 · 8 revisions

There is a new workflow to add classes from external ontologies (i.e., GO or CHEBI) that is much more streamlined as compared to MIREOTing.

  1. Select 'owl:Thing'
  2. Add a new class
  3. paste the full iri in the 'Name:' field, for example, http://purl.obolibrary.org/obo/CHEBI_50906.
  4. hit 'OK'

Now you can use this term for example to construct EQ definitions. The next time the imports are refreshed (which happens, the latest, when @drseb prepares a new release each month, but usually more frequently, and on request to the HPO mailing list), the metadata (labels, definitions, etc) for this term is imported from the respective external source ontology and becomes visible in hp-edit and hp-full.

If you want to refresh the import yourself (this may be necessary to pass the travis tests), and you have the ODK installed, you can do the following (using go as an example):

First, you navigate in your terminal to the ontology directory (underneath src in your hpo root directory).

cd src/ontology

Then, you regenerate the import that will now include any new terms you have added.

sh run.sh make PAT=false imports/go_import.owl -B

The last command is a (safe) hack that will remove declarations from hp-edit that do not belong there.

sh run.sh make remove_foreign_declarations -B

The last step is necessary because of the following:

Classes that are declared in hp-edit.owl, but do not belong there, confuse the automated QC. The above workflow involves the creation of a new class with Protege, which inadvertently creates a new Declaration axiom. sh run.sh make remove_foreign_declarations -B handles this problem by running a set of three sed commands which simply delete foreign class declarations from the hp-edit file, which is a completely safe operation (declarations are redundant if the term is used somewhere else in the ontology).