Skip to content

Ontology Design

Warning

These materials are under construction and incomplete.

Prerequisites

Participants will need to have access to the following resources and tools prior to the training: - GitHub account - register for a free GitHub account here - Protege - Install Protege 5.5, download it here - Install ELK 0.5 - Install GitHub Desktop Please make sure you have some kind of git client installed on your machine. If you are new to Git, please install GitHub Desktop

Preparation

What is delivered as part of this course

Description: This course will cover reasoning with OWL.

Learning objectives

At the end of this lesson, you should know how to do:

  1. Add existential restrictions
  2. Add defined classes
  3. Add disjoint axioms
  4. Debug unsatisfiable classes

Tutorials

OpenHPI Course Content 1. Ontologies and Logic Videos 3.0-3.10 | Duration: ~3.5 hrs
1. OWL, Rules, and Reasoning Videos 4.0-4.8 | Duration: ~2.7 hrs

Additional Materials and Resources

Semantic Engineer Toolbox

Contributors

Acknowledgement

OWL class restrictions

In OWL, we use object properties to describe binary relationships between two individuals (or instances). We can also use the properties to describe new classes (or sets of individuals) using restrictions. A restriction describes a class of individuals based on the relationships that members of the class participate in. In other words, a restriction is a kind of class, in the same way that a named class is a kind of class.

For example, we can use a named class to capture all the individuals that are idiopathic diseases. But we could also describe the class of idiopathic disease as all the instances that are 'has modifier' idiopathic disease.

In OWL, there are three main types of restrictions that can be placed on classes. These are quantifier restriction, cardinality restrictions, and hasValue restriction. In this tutorial will initially focus on quantifier restrictions.

Quantifier restrictions are further categorized into two types, the existential and the universal restriction.

  • Existential restrictions describe classes of individuals that participate in at least one relationship along a specified property to individuals that are members of a specified class. For example, the class of individuals that have at least one ( some ) 'has modifier' relationship to members of the idiopathic disease class. In Protege, the keyword 'some' is used to denote existential restrictions.
  • Universal restrictions describe classes of individuals that for a given property only have relationships along this property to individuals that are members of a specified class. For example, we can say a cellular component is capable of many functions using the existential quantifier, however, OWL semantics assume that there could be more. We can use the universal quantifier to add closure to the existential. That is, we can assert that a cellular component is capable of these functions, and is only capable of those functions and no other. Another example is that the process of hair growth is found only in instances of the class Mammalia. In Protege the keyword 'only' is used.

In this tutorial, we will deal exclusively with the existential (some) quantifier.

Superclass restrictions

Strictly speaking in OWL, you don't make relationships between classes, however, using OWL restrictions we essentially achieve the same thing.

We wanted to capture the knowledge that the named class 'idiopathic achalasia' is an idiopathic disease. In OWL speak, we want to say that every instance of an ' idiopathic achalasia' is also an instance of the class of things that have at least one 'has modifier' relationship to an idiopathic disease. In OWL, we do this by creating an existential restriction on the idiopathic achalasia class.

  1. In the Entities tab, select 'idiopathic achalasia' in the class hierarchy and look at its current class description in the bottom right box.
  2. Note that there are two superclasses (as denoted by the SubClass Of list). ''gastroesophageal disease'' and 'has modifier' some idiopathic.
  3. Run the reasoner.
  4. You should see that this class is now inferred to be an idiopathic disease because of this SubClassOf (superclass) restriction.

Equivalence Axioms and Automatic classification

This example introduces equivalence axioms or defined classes (also called logical definitions) and automatic classification.

The example involves classification of Mendelian diseases that have a monogenic (single gene) varation. These equivalence axioms are based off the Mondo Deisgn Pattern disease_series_by_gene.

Constructs:
- and (intersection)
- equivalence (logical definitions)
- existential restrictions (e.g. 'disease has basis in dysfunction of')

Add an equivalence axiom to an existing Mondo term

  1. Create a new branch and open (or re-open) mondo-edit.obo
  2. Navigate to the class 'cardioacrofacial dysplasia 1'
  3. According to OMIM, this disease is caused by a variation in the gene PRKACA.
  4. We want to add an equivalence axiom that says every instance of this class is a type of 'cardioacrofacial dysplasia' that has dysfunction in the PRKACA gene.
  5. To do this, click the + next to Equivalent To in the lower right Description box.
  6. Add the following equivalence axiom: 'cardioacrofacial dysplasia' and ('disease has basis in dysfunction of' some PRKACA)
  7. Run the reasoner.
  8. You shouldn't see any change, but try deleting the superclass assertion to 'cardioacrofacial dysplasia' and re-running the reasoner.
  9. You should see that 'cardioacrofacial dysplasia' is an inferred superclass.
  10. Undo the last change and save your work and commmit and create a pull request.

Adding classes and automatically classifying them

For teaching purposes, let's say we need a new class that is 'fungal allergy'.

  1. Create a branch and re-open mondo-edit.obo
  2. Add a new term under owl:Thing named 'fungal allergy'.
  3. Following the design pattern allergy.yaml, add the text definition, synonym and equivalentTo axiom, using the substance ECTO_0000524 'exposure to mycotoxin'.
  4. Run the reasoner and note where the class is automatically classified.
  5. Create a pull request and note in the PR what the parent class is.

Debugging automatic classifications

  1. On the same branch, add a new term under owl:Thing named 'oral cavity neoplasm'.
  2. Following the design pattern neoplasm_by_origin, add the term label and the equivalence axiom.
  3. Run the reasoner and note where the term in automatically classified. You should see it is under owl:Nothing.
  4. Click the ? next to owl:Nothing in the Description box to see the explanation.
  5. Can you determine why this is an unsatisfiable class?
  6. Create a pull request and add a comment explaining why this is unsatisfiable.

Disjointness

By default, OWL assumes that these classes can overlap, i.e. there are individuals who can be instances of more than one of these classes. We want to create a restriction on our ontology that states these classes are different and that no individual can be a member of more than one of these classes. We can say this in OWL by creating a disjoint classes axiom.

  1. Create a branch in the Mondo repo (name it: disjoint-[your initials]. For example: disjoint-nv)
  2. Open the mondo-edit.obo file
  3. Per this ticket, we want to assert that infectious disease and 'syndromic disease' are disjoint.
  4. To do this first search for and select the infectious disease class.
  5. In the class 'Description' view, scroll down and select the (+) button next to Disjoint With. You are presented with the now familiar window allowing you to select, or type, to choose a class. In the Expression editor, add 'syndromic disease' as disjoint with 'infectious disease'.
  6. Run the ELK reasoner.
  7. Scroll to the top of your hierarchy and note that owl:Nothing has turned red. This is because there are unsatisfiable classes.

Review and fix one unsatisfiable class

Below we'll review an example of one class and how to fix it. Next you should review and fix another one on your own and create a pull request for Nicole or Nico to review. Note, fixing these may require a bit of review and subjective decision making and the fix described below may not necessarily apply to each case.

  1. Review Bickerstaff brainstem encephalitis: To understand why this class appeared under owl:Nothing, first click the ? next to owl:Nothing in the Description box. (Note, this can take a few minutes).

image

  1. The explanation is displayed above - it is because this class is a descedent of Guillain-Barre syndrome, which is a child of syndromic disease.
  2. Next, we have to ask if Bickerstaff brainstem encephalitis is an appropriate child of regional variant of Guillain-Barre syndrome. Note, Mondo integrates several disease terminologies and ontologies, and brought in all the subclass hierarchies from these source ontologies. To see the source of this superclass assertion, click the @ next to the assertion.
  3. This source came from Orphanet, see below.

image

  1. Based on the text definition, there does not seem to be any suggestion that this disease is a type of Guillain-Barre syndrome.
  2. Assuming that this disease is not a type of Guillain-Barre syndrome, we should exclude the superclass regional variant of Guillain-Barre syndrome (see this paper and this paper. It seems a bit unclear what the relationship of BBE is to Guillain-Barre syndrome. This also brings into the question if a disease can be syndromic and an infectious disease - maybe this disjoint axiom is wrong, but let's not worry about this for the teaching purposes.)
  3. To exclude a superclass, follow the instructions here.