ssayols / rrvgo

Reduce + Visualize Gene Ontology
GNU General Public License v3.0
21 stars 3 forks source link

reduceSimMatrix #20

Closed Tima-Ze closed 1 year ago

Tima-Ze commented 1 year ago

dendogram_dissimilarity matrix Hi Sergi, Regarding reduceSimMatrix() function

function (simMatrix, scores = c("uniqueness", "size"), threshold = 0.7, 
          orgdb, keytype = "ENTREZID") 

According to the manual document the threshold actually determines/represents the similarity. However, it seems the opposite to be the case. In the source code : cluster <- cutree(hclust(as.dist(1 - simMatrix), method), h = threshold), where the threshold is based on dissimilarity matrix, so lower thresholds indicate a greater similarity between clusters. Am I right, or did I just get misunderstood? Best, Tima

ssayols commented 1 year ago

Hi Tima, right, thank you for noticing this. We changed the algorithm sometime ago and didn't reflect the changes in the vignette. I fixed it in a75afc9c6a79a07abb7dbfb2623230acd019588b and 35e2117429beb83af522ad50ca796a3bd463521e, hopefully it is clear now.

The right meaning of the threshold parameter should be "reduceSimMatrix groups terms which are at least within a similarity below threshold".

You can fetch the changes from github (devtools::install_github("ssayols/rrvgo")) or from the Bioconductor devel branch which I guess will be available in a couple of days.