ontology-access-kit icon indicating copy to clipboard operation
ontology-access-kit copied to clipboard

Decide on default colors for each ontology in OAK configuration

Open cmungall opened this issue 2 years ago • 4 comments

We have some default colors for some ontologies in our kgviz stylesheet:

https://github.com/INCATools/ontology-access-kit/blob/e2c76d68a7e72ad847fb3ca7045b23050c4c11a3/src/oaklib/conf/obograph-style.json#L84-L130

Anyone can provide their own stylesheet, but it's useful to have a default base that serves a broad range of scenarios

I am not sure if there is any good criteria for deciding. A general principle is that frequently "adjacent" ontologies (whether by is-a, e.g. upper ontologies to subsumed ontologies) should be in easily distinguishable colors, as should "analogous" ontologies (e.g a common use case is looking at MP and HP side by side).

If there is no appetite for this then we can close this issue and just let the default stylesheet evolve naturally

See also:

  • https://github.com/oborel/obo-relations/issues/613

cmungall avatar Jul 08 '22 01:07 cmungall

There are two different aims at work that require different coloration strategies, different views. One view shows how ontologies are interwoven, which for example the OntoTrek visualization of AGRO shows well: https://genepio.org/ontotrek - where 20+ ontologies each need their own color (in fact OntoTrek assigns a consistent color to most OBO Foundry ontologies).
image

But the other aim/view - how to learn semantics of constructing knowledge graph "sentences" or patterns from ontologies, really begs a coloration by upper level term category first and foremost. This is akin to tagging terms by their gramatical role - verb, noun, adjective, ... .

Personally I've chosen to prioritize cognitive role of a term as its primary box coloration, with colored ontology name, and term id as secondary, optional information, to satisfy both aims. This way color enhances reading the semantics of a graph: image

ddooley avatar Mar 13 '23 20:03 ddooley

ontotrek is great! Is there any plans to add part-of? It doesn't make sense to view an anatomy ontology or go without this.

Personally I've chosen to prioritize cognitive role of a term

Do you have a way of doing this automatically or is this just based on what you want to show in any given diagram?

I can imagine doing this by BFO category (although I often find this personally uninformative, as this doesn't divide the world in ways that are intuitive to most users) - is this what you have in mind (this is consistent with your figure if we inject the owl:time vocabulary into occurrent)

(your diagrams are beautiful btw, are they all hand crafted?)

But the other aim/view - how to learn semantics of constructing knowledge graph "sentences" or patterns from ontologies

I think this is a really important use case. Unfortunately there is insufficient information in the ontology to do this. The best case scenarios is that this will be encoded using a DP template (but often it's more implicit)

cmungall avatar Mar 13 '23 22:03 cmungall

OntoTrek is being developed further this spring by a team of students led by Michelle Kuttel and Maria Keet of University of Cape Town. I'll ask them to add part-of (or some user supplied list of relations) as an option for the hierarchy backbone.

I think a basic set of colours makes sense for the top level COB entities (with some variant hues if one wants to add a tier say under any top-level term). image

So far all diagrams are manually constructed with drawio - an automated algorithm would take alot of work to have visual elegance smarts for displaying more than a handful of terms. I saw James Overton is toying with an automated graph component renderer in https://qqv.ontodev.com/primer.html which seems promising for the "handful" at least.

But these diagrams are all manual:

image

ddooley avatar Mar 14 '23 00:03 ddooley

About “Do you have a way of doing this automatically or is this just based on what you want to show in any given diagram?” Automatically (in OntoTrek with Settings "Color edges by" (o) "ULO branch") insofar as each term is colored by its entity type (=more cognitive) rather than the ontology curation team managing it (onto prefix).

ddooley avatar Apr 06 '23 15:04 ddooley