This package implements different ontological similarity metrics for the Cognitive Atlas to assess similarity of two contrast labels based on associated concepts.
This package is UNDER DEVELOPMENT, and likely to be ported into Python.
Outside of R
git clone https://github.com/CognitiveAtlas/cogat-similaR
R
Inside of R
library(devtools)
install("cogat-similaR")
###Wang This method aggregates the semantic contributions of ancestor terms (including this specific term).
- We start with concepts associated with the contrast
- We walk up the tree and append associated "is_a" and "part_of" concepts
- The weight for each concept is determined by multiplying the last (child node) weight by: 0.8 for "is_a" relationships 0.6 for "part_of" relationships This means that weights decrease as we move up the tree toward the root
- We stop at the root node
- We take the weights at the intersection of each list from above
- The similarity score is sum(intersected weights) / sum(all weights)
This code base was adopted from the "GOSemSim" package, authored by Guangchuang Yu
Yu et al. (2010) [GOSemSim: an R package for measuring semantic similarity among GO terms and gene products],(http://bioinformatics.oxfordjournals.org/cgi/content/abstract/26/7/976) Bioinformatics (Oxford, England), 26:7 976--978, April 2010. ISSN 1367-4803 PMID: 20179076