Exploring ontology visualization techniques for biological data

What’s the most useful way to visualize an ontology? SciBite CTO gives his views on answering this commonly asked question regarding ontology visualization techniques.

Ontology data visualisation

What’s the most useful way to visualize an ontology? It’s a question I’ve returned to many times over the last decade of building tools that employ ontologies in some way. And when a friend recently asked me about useful mechanisms for visualizing ontologies, I thought it was about time I wrote up some thoughts.

Let’s start at the beginning: Components of an ontology

Before considering the various visualizations, it’s worth thinking about the components that constitute an ontology to offer some insight into what we’re playing with. An ontology is a graph – a directed graph – which means it has nodes (blobs) and edges (lines), with the edge having a directionality to tell you which way the relationship applies. The most basic of these is the subclass of relationship which tells you that one node is a subtype of another, such as ‘mouse is a subclass of mammal’ (i.e., all mice are also mammals).

There are other common types of relationships used in bio-ontologies that we might wish to see. Most commonly, partonomy indicates that a node is part of another node, for instance, that a mouse tail is part of a mouse.

Example of components that constitute an ontology

There are others, such as develops from which is commonly used to represent developmental biology. Has role is also used to show the different uses of a particular node, in a given context, such as the role of a virus as a vector in an experiment.

This network of nodes and edges is the most natural form to think of an ontology and is frequently available in ontology editors or browsers, though one I consider to be only rarely useful. It’s easy to see why when considering the examples below.

Systematic integration of biomedical knowledge prioritizes drugs for repurposing

From: Himmelstein, D.S (2017) Systematic integration of biomedical knowledge prioritizes drugs for repurposing. eLife, 2017, 6, 1–35

EBI’s OLS graph view

From: EBI’s OLS graph view

Graph views for more complex ontology visualization

As a faithful visual representation, this view reveals the ontology for what it is; complex. The high cognitive load placed on the viewer produces an information overload and makes consuming anything beyond a few nodes and edges difficult. Graph views should really be left to experts who require a really specific view of an ontology and, as such, are rarely used in applications to show data. Although this view of nodes and edges is overkill for most users, they remain the building blocks upon which most other visualizations build, the most common of which is that of the tree.

Familiarity lowers barriers

Every ontology browser and editor has some version of a hierarchical tree for displaying nodes and edges in which going up the tree (confusingly, the language used means traveling up the tree takes you towards the ‘root’ nodes) conveys something of broadness, and going down towards the ‘leaf’ nodes conveys something of narrowness. The default tree view typically shows the subclass/superclass type relationships as branch-to-leaf relationships. This also adds the possibility of showing additional hierarchical-like relationships, such as part of, in a similar manner, such as the examples shown below from the EBI’s OLS.

EBI’s OLS tree view

From: EBI’s OLS tree view

Trees are common because they’re intuitive and familiar and used almost universally used in websites to convey information where navigation by ‘topics’ is useful. Consider the image below taken from the popular online grocery store Ocado. It’s pretty clear a ‘Cake’ is not a subclass of Bakery, but rather something that is ‘found in’ a bakery, and yet we can read that pretty easily and understand the grouping. A ‘muffin’ is a subclass of ‘small cakes’ though, and we can also understand that pretty easily. The familiarity trees offer helps to lower the barriers to understanding what can be a complex picture. They don’t display everything, but what they do display is easy to understand and easy to navigate around; by simply clicking on a node, we jump to that node in a ‘follow your nose’ type manner – the essence of the web.

From: Ocado website

From: Ocado website

Satellite views in ontology visualization

Tree browsers allow a focus to be placed on a part of the ontology – a sub-branch – and can show some of the detail of the nodes in that particular branch. There are also techniques I broadly consider to be summarisation focused. Here, the aim is to show a broader picture – a taking-a-step-back type view – by showing less detail or rather by aggregating the detail. I often call these satellite views.

One such visualization uses treemaps in which the hierarchy is nested into rectangles, and the area is used to describe a particular property of the tree. In the case of SATORI (shown below), the visualization neatly describes two properties. Firstly, the size of the rectangle illustrates the number of subclasses for a particular ontology node. For instance, a stem cell has quite a lot of subclasses compared to a neural cell, which has far fewer. Secondly, the color shading of the rectangle indicates the maximum depth of the subclass hierarchy from that node, darker indicating a larger depth.

The advantage of this treemap summary is in condensing a lot of information into one and making it comparable at a broader, more global level, in this case, the number of subclasses. This would not be straightforward to do in a basic tree view (e.g., showing all of the subclass trees down to leaf nodes, showing a count of leaf nodes, etc.). The disadvantage is that it collapses a lot of detail down; each aggregate represents a tree with its own hierarchy. There is, of course, always a trade-off when summarizing complex data, as we have learned with the graph view.

SATORI TreeMap view

From: SATORI TreeMap view

Different views of the same data

Another summarisation approach is to exploit the set-like nature of ontologies. A common method I’ve used in teaching about ontology relationships is to use a Venn diagram such as the one shown below. This can very effectively illustrate subclass relationships, for example, that all mice are types of mammals, as are humans, and that humans and mice do not intersect (yet).

Venn diagram showing ontology relationships

The same method can be applied to summarising ontologies using bubble diagrams. The example below is from the Open Targets project, illustrating evidence of links to certain diseases for a given target. In this visualization, hierarchies are shown as Venn diagrams, for instance, Crohn’s disease is a subclass of digestive system disease. There is some commonality in what is being shown here with the TreeMap approach; color shading and size are both indicating ‘score’ of the evidence link, though the key difference is size does not indicate anything about the ontology structure, only about the target data it is describing.

Open Targets Bubble Chart View

From: Open Targets Bubble Chart View

Interestingly, the same view in the Open Targets Platform is available in a dendrogram tree (below). Each node is equally sized, so the ‘bigger means more’ part of the Venn diagram is lost, though the coloring aspect remains. However, the nodes are easier to read as the text isn’t chopped due to node boundaries as they are in the Venn.

Open Targets tree view

From: Open Targets tree view

The emphasis on the Open Targets example is on the data that has been annotated with an ontology, rather than the ontology itself. Here, the ontology visuals become a navigational aid intended to convey information about this data, rather than just a mechanism of exploring the ontology. This is similar in method to the faceted search aid – much like the online shopping example previously. Here, the ontology is overlaid to show where an ontology, or parts of an ontology, appear in the data.

A unique but familiar way to visualise search results using ontologies

The example below shows another visual taking a similar method in SciBite’s DOCstore. Here, color cues are being used to indicate where highlighted words correspond to hits within a given ontology, for instance, the search term term ‘prostate cancer’ is highlighted in green in the text. Other hits which are not part of the original search are shown in light orange highlights, with a vertical color bar offering a cue as to which ontology a hit belongs to shown in the key on the left-hand side of the page (e.g., blue for genes/proteins, such as the CNNM1 hit).

SciBite’s DOCstore semantic search platform

From: SciBite’s DOCstore semantic search platform

Much like tree visualizations, these approaches work well because they’re intuitive and familiar. Anyone who has ever performed a crtl+f on a web page or Word document will be accustomed to the ability to highlight search hits.

The biology modeled within an ontology can also be exploited in a more literal manner. The Expression Atlas at EBI uses an anatomical figure which has been annotated with parts of the ontology to visually highlight where data is found. The example below highlights which parts of the anatomy are being studied within a given experiment (in this case, the 19 NIH Epigenomics Roadmap has been selected) and are shown in red on the anatomical figure. The heatmap to the right renders the ontology in a more conventional style, while color is used to illustrate the expression level (darker is higher).

EBI’s Expression Atlas

From: EBI’s Expression Atlas

So, what is the most useful way to visualize an ontology?

As with most visualization techniques, there is no single ‘best’ way that fits all users and all applications. An understanding of the user community and how they intend to consume the data is critical, as is frequently reviewing their ability to continue to use the visualizations that have been developed as data and ontologies evolve. Often a mix of user types requires a mixture of visualizations (for instance, Open Targets has at least three to describe the same data in different ways).

Trees are intuitive and familiar, maps and set diagrams can summarise well, and more creative visualisations (such as human forms) can also exploit the contents of the ontology more literally. On the more niche side, graph views are very rich but very complex and should be reserved for only the most ardent ontology user. The one thing I can be sure of is that word clouds is almost never used because it’s 2019…

Find out more about SciBite’s ontology management platform CENtree.

Find out more about how SciBite’s semantic technology can assist with ontology management.

Related articles

  1. Are ontologies relevant in a machine learning-centric world?

    SciBite CSO and Founder Lee Harland shares his views on why ontologies are relevant in a machine learning-centric world and are essential to help "clean up" scientific data in the Life Sciences industry.

  2. SciBite launches CENtree, ontology management for life sciences

    Cambridge, UK - SciBite, the award-winning semantic technology company, today announced the launch of CENtree, an innovative, collaborative platform which revolutionizes the way life sciences organizations manage and release ontologies.


How could the SciBite semantic platform help you?

Get in touch with us to find out how we can transform your data

Contact us