The shared information content of two terms in an Ontology (information science) is a popular technique to measure their semantic similarity. DiShIn (Disjunctive Shared Information) is method to calculate that shared information content by complementing the value of most informative common ancestor (MICA) with their disjunctive ancestors by exploring the multiple inheritance of an ontology. DiShIn re-defines the shared information content between two concepts as the average of all their disjunctive ancestors, assuming that an ancestor is disjunctive if the difference between the number of distinct paths from the concepts to it is different from that of any other more informative ancestor. In other words, a disjunctive ancestor is the most informative ancestor representing a given set of parallel interpretations. DiShIn is an improvement of GraSM in terms of computational efficiency and in the management of parallel interpretations.
Contents
Example
For example, palladium, platinum, silver and gold are considered to be precious metals, and silver, gold and copper considered to be coinage metals. Thus, we have:
metal / precious coinage / | / / / | gold / palladium platinum silver copperWhen calculating the semantic similarity between platinum and gold, DiShIn starts by calculating the number of paths difference for all their common ancestors:
gold -> coinage -> metalgold -> precious -> metal platinum -> precious -> metalgold -> preciousplatinum -> preciousFor metal we have two paths from gold and one from platinum, so we have a path difference of one. For precious we have one path from each concept, so we have a path difference of zero.
Since their path difference is distinct, both common ancestors metal and precious are considered to be disjunctive common ancestors.
When calculating the semantic similarity between platinum and palladium, DiShIn starts by calculating the number of paths difference for all their common ancestors:
palladium -> precious -> metal platinum -> precious -> metalpalladium -> preciousplatinum -> preciousFor both metal and precious, we have only one path from each concept, so we have a path difference of zero for both common ancestors. Thus, only the common ancestor precious (the most informative) is considered to be a disjunctive common ancestor.
Given that node-based semantic similarity measures are proportional to the average of the information content of their common disjunctive ancestors: metal and precious in case of platinum and gold; and precious in case of platinum and palladium, means that for DiShIn palladium and platinum are more similar than platinum and gold.
When calculating the semantic similarity between silver and gold, DiShIn starts by calculating the number of paths difference for all their common ancestors:
gold -> coinage -> metalgold -> precious -> metal silver -> coinage -> metalsilver -> precious -> metalgold -> precioussilver -> preciousgold -> coinagesilver -> coinageAs in the case of platinum and palladium, here all common ancestors have a path difference of zero, since silver and gold share the same relationships and therefore have parallel interpretations. Thus, only the most informative common ancestor precious or coinage is considered to be a disjunctive common ancestor. This means that for DiShIn the similarity between silver and gold is greater or equal than the similarity between any other pair of the leaf concepts. Thus, DiShIn does not penalize parallel interpretations as GraSM did.
Implementation
After estimating the information content for each concept and the number of distinct paths from one concept to another, DiShIn can be implemented as a single SQL query described in the authors's publication in the Journal of Biomedical Semantics.
An SQL Implementation for the MySQL release of the Gene Ontology computes the semantic similarity of a pair of GO terms on-the-fly, i.e. not requiring any preliminary calculations.
It can be used in the GO database mirror at the EBI:
mysql -hmysql.ebi.ac.uk -ugo_select -pamigo -P4085 go_latest < DiShIn.sqlor by using a local installation from GO pre-built database dumps
The SQL script starts by the definition of the input GO terms to calculate shared information:
SET @t1Id = (SELECT id FROM term WHERE acc='GO:0060255'), @t2Id = (SELECT id FROM term WHERE acc='GO:0031326');or for example the terms used in "Disjunctive shared information between ontology concepts: application to Gene Ontology". Journal of Biomedical Semantics. 2: 5. doi:10.1186/2041-1480-2-5.
SET @t1Id = (SELECT id FROM term WHERE acc='GO:0008387'), @t2Id = (SELECT id FROM term WHERE acc='GO:0008396');or for example the terms used in "Measuring semantic similarity between Gene Ontology terms". Data. 61: 137–152. doi:10.1016/j.datak.2006.05.003.
SET @t1Id = (SELECT id FROM term WHERE acc='GO:0008387'), @t2Id = (SELECT id FROM term WHERE acc='GO:0008396');Calculation of the maximum frequency for a term, assuming the number of gene products as the maximum frequency possible
SET @maxFreq = (SELECT COUNT(*) FROM gene_product);Calculation of the information content of input term @t1Id
SET @t1IC = ( SELECT -LOG(COUNT(DISTINCT a.gene_product_id)/@maxFreq) as ic FROM graph_path gp INNER JOIN association an ON (gp.term2_id = a.term_id) WHERE gp.term1_id = @t1Id AND a.is_not = 0 AND gp.relationship_type_id IN (SELECT id FROM term WHERE name='part_of' OR name='is_a') );Calculation of the information content of input term @t12d
SET @t2IC = ( SELECT -LOG(COUNT(DISTINCT a.gene_product_id)/@maxFreq) as ic FROM graph_path gp INNER JOIN association an ON (gp.term2_id = a.term_id) WHERE gp.term1_id = @t1Id AND a.is_not = 0 AND gp.relationship_type_id IN (SELECT id FROM term WHERE name='part_of' OR name='is_a') );
Calculation of the disjunctive shared information (DiShIn) without requiring preliminary calculations. It assumes that the difference of the number of distinct paths can be estimated on-the-fly by the difference of the number of distinct nodes in the paths.
Information content normalization to a [0..1] interval
SET @maxIC = ( SELECT -LOG(1/@maxFreq) );SET @t1IC_norm = ( SELECT @t1IC/@maxIC );SET @t2IC_norm = ( SELECT @t2IC/@maxIC );SET @dishin_norm = ( SELECT @dishin/@maxIC );Calculation of the semantic similarity measures using DiShIn: