This short guideline aims to
- Explain the difference between a domain ontology versus an application ontology;
- Provide some guidelines for choosing a single ontology or a small set of ontologies;
- Explain when to consider creating a new domain ontology; and
- Give guidance as to when to create an application ontology.
An upfront disclaimer: I am working at EBI and hence those are the tools I am most familiar with. I have tried where possible to include tools from the biological/biomedical community outside EBI. But I might have missed some. Moreover, this post is not about punting any tools. Rather, it is to describe a general guideline wrt choosing ontologies.
Domain ontologies versus application ontologies
A domain ontology has terms that only concern a single well defined domain and aims to address the general requirements of the community of that domain. It is my understanding that domain ontologies adhere to Principle 5 of the OBO principles. The Data Use Ontology (DUO) is an example of a domain ontology.
An application ontology tends to serve the specific needs for a specific application and often spans different domains, though it may deal with a single domain. The Experimental Factor Ontology (EFO) is an example of an application ontology.
Guidelines for choosing an ontology or ontologies
Here some basic guidelines are given for choosing an ontology.
- Evaluate potential target ontologies using the guidelines of Ten Simple Rules for Selecting a Bio-ontology and Which biomedical ontologies should we use? Potential target ontologies can be found using tools like the Ontology Lookup Service (OLS), Ontobee and Bioportal. The Open Biological and Biomedical Ontology (OBO) Foundry is a community driven effort to create interoperable biological ontologies. It is therefore a good starting point for identifying viable ontologies that are used and supported by an active community.
- Try to identify 1 ontology or as few as possible target ontologies that may address your application needs. This can be done using a tool like Zooma to map strings of text to terms in ontologies based on manual curated data or some machine learning algorithm. Based on these terms a single ontology or multiple target ontologies can be identified.
- Try to map terms from less preferred ontologies to terms in preferred target ontologies using a tool like OxO. If such mappings cannot be found, but to the best of your knowledge term A in ontology A should map to term B in ontology B, consider opening tickets against both ontology A and ontology B to have the respective mappings added. It is only by the community actively contributing to these ontologies that the full FAIR value proposition of ontologies are realised.
- As far as possible try to use or contribute to existing ontologies rather than introduce your own ontology. This means when an ontology fits your needs reasonably well, but it is missing some terms required by your use case, it is best to collaborate with the relevant ontology designers to try and add the missing terms. For this purpose most of the ontologies in the biological and biomedical community make use of GitHub Issue trackers where you can open new issues, give your input to existing issues and get latest release information. Remember, the main value proposition of ontologies wrt FAIR principles is realised exactly when an ontology is used, reused and extended as part of a community that has some shared objectives.
- Try to keep the number of ontologies you want to use as small as is sensible (that is the smallest set of ontologies that are well aligned with the needs of your use case). The reason for this is that you will want to engage with the designers of the ontologies you use to extend and amend these ontologies for your use case. The more ontologies you use, the chances are that you will need to communicate with a larger community to affect change for your use case. This may increase development times. However, using an ontology that is not well aligned with your use case will also increase communication and timelines. Thus, the reason for keeping the number of ontologies as small as is sensible.
When to create a domain ontology
If after a review of the existing ontologies you find that your domain is not covered by any of the existing ontologies, you have a strong case for creating your own ontology. At this point you can decide to create the ontology yourself from scratch. When you are just starting down the path of creating your own ontology, it may seem quicker and easier than to have external collaborators involved. However, if you can create your ontology in collaboration with ontology designers that have a deep understanding of the creation and long term maintenance of biological ontologies, it will help you to avoid various pitfalls in ontology creation. Such collaborations can seem long-winded, but will save a lot of time and effort in the long run. A key point to keep in mind when designing an ontology is not only to be concerned with the initial creation of the ontology, but also with its long term maintainability.
When to create an application ontology
Only consider introducing your own application ontology in the following cases:
- Your use case spans a number of domains that are served by subsets of terms coming from a number of ontologies. In this case the application typically uses much smaller subsets of terms from the original ontologies. For this scenario an application ontology can be introduced that imports the relevant terms from existing ontologies. An example of this is EFO that is used by a number of teams in EBI. Again, as far as possible terms should be used from existing ontologies rather than introducing terms in your own ontology (see 4 above). Note that when a use case spans a number of domains served by a number of ontologies and the number of terms used from the ontologies are very close to all terms in the ontologies, it is best to use the ontologies directly rather than to introduce your own application ontology.
- When you have application specific needs that cannot be addressed by any existing domain or application ontology, then only it may make sense to create your own application ontology.
- As far as possible give preference to re-using ontologies rather than introducing you own.
- When you want to embark on creating either a domain or application ontology, I really strongly recommend reaching out the OBO Foundry. They have been developing biological and biomedical ontologies for years now, which means they have learned a lot of lessons over the years. By speaking to them it can help you avoid the typical problems people tend to run into when trying to create their first ontology.
In creating their first OWL ontology, there are at least two aspects of
SubClassOf that perplex users. The first is when to use
EquivalentTo and when to use
SubClassOf. The second problem is best illustrated by the following example:
ObjectProperty: a_to_b Class: A1 EquivalentTo: (a_to_b some B) Class: A2 SubClassOf: (a_to_b some B) Class: B Individual: b1 Types: B Individual: x Facts: a_to_b b1
When running a reasoner on this example, the individual
x is inferred to be of type
A1. What perplex users sometimes is that
x is not inferred to be of type
A2 as well. This is shown in the next figure.
The difference between
The first thing to be aware of wrt
equivalentTo is that
Class: C EquivalentTo: D
is an abbreviation for
Class: C SubClassOf: D Class: D SubClassOf: C
The semantics of
SubClassOf is subset. Thus, the above states that the set
C is a subset of the set
D and the set
D is a subset of the set
C. Which means that the sets
D are exactly the same set. We say they are equivalent.
Note that if I know that the classes
C2 are both subclasses of class
C, there is nothing more I can say about how class
C1 relates to class
C2. This is a bit like knowing that bicycles and trucks are both vehicles – I can say nothing more about how bicycles relate to trucks beyond knowing that they are both vehicles.
Back to our initial example
Understanding the semantics of
EquivalentTo we can see that indeed the individual
x is an instance of
A1. Understanding the semantics of
SubClassOf helps us to understand why
x is not inferred to be of type
A2. We know that
A2 is a subclass of
a_to_b some B and that
x is an instance of
a_to_b some B, but there is nothing that can force the reasoner to infer that
x is necessarily an instance of the class
A2. This is illustrated in the next figure.
When to use
EquivalentTo is used for definitions. That is when you want to state the necessary and sufficient conditions for a concept.
SubClassOf is used when you want to define a hierarchy from the most general to the most specific. I.e., it is typically what you see in taxonomies or in object oriented programming languages where one can define class hierarchies. In fact there is a strong relation between OWL 2 ontologies and object orientation which I explore here in more detail.
In this post I explained the difference between
SubClassOf and how they are used, as well as some inferences thatmay be confusing to new users. You can find the example ontology on GitHub.