File tree Expand file tree Collapse file tree 3 files changed +22
-11
lines changed
Expand file tree Collapse file tree 3 files changed +22
-11
lines changed Original file line number Diff line number Diff line change 1+ Version: 1.0
2+
3+ RestoreWorkspace: Default
4+ SaveWorkspace: Default
5+ AlwaysSaveHistory: Default
6+
7+ EnableCodeIndexing: Yes
8+ UseSpacesForTab: Yes
9+ NumSpacesForTab: 3
10+ Encoding: UTF-8
11+
12+ RnwWeave: Sweave
13+ LaTeX: pdfLaTeX
14+
15+ BuildType: Package
16+ PackageUseDevtools: Yes
17+ PackageInstallArgs: --no-multiarch --with-keep.source
Original file line number Diff line number Diff line change @@ -22,3 +22,4 @@ Description: Complex heatmaps are efficient to visualize associations
2222biocViews: Software, Visualization, Sequencing
2323URL: https://github.com/jokergoo/ComplexHeatmap, https://jokergoo.github.io/ComplexHeatmap-reference/book/
2424License: MIT + file LICENSE
25+ RoxygenNote: 7.2.3
Original file line number Diff line number Diff line change @@ -214,19 +214,12 @@ get_dist = function(matrix, method) {
214214 # }
215215 } else if (method %in% c(" pearson" , " spearman" , " kendall" )) {
216216 if (any(is.na(matrix ))) {
217- dst = get_dist(matrix , function (x , y ) {
218- l = is.na(x ) | is.na(y )
219- x = x [! l ]
220- y = y [! l ]
221- 1 - cor(x , y , method = method )
222- })
223217 warning_wrap(" NA exists in the matrix, calculating distance by removing NA values." )
224- } else {
225- dst = switch (method ,
226- pearson = as.dist(1 - cor(t(matrix ), method = " pearson" )),
227- spearman = as.dist(1 - cor(t(matrix ), method = " spearman" )),
228- kendall = as.dist(1 - cor(t(matrix ), method = " kendall" )))
229218 }
219+ dst = (1 - cor(t(matrix ),
220+ method = method ,
221+ use = " pairwise.complete.obs" ))/ 2
222+ dst = as.dist(dst )
230223 } else {
231224 stop_wrap(qq(" method @{method} not supported" ))
232225 }
You can’t perform that action at this time.
0 commit comments