File: test-Heatmap-cluster.R

package info (click to toggle)
r-bioc-complexheatmap 2.14.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,632 kB
  • sloc: makefile: 5
file content (26 lines) | stat: -rw-r--r-- 575 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
library(circlize)
library(ComplexHeatmap)
library(GetoptLong)

# ht_opt("verbose" = TRUE)
m = matrix(rnorm(50), nr = 10)

ht = Heatmap(m)
ht = make_row_cluster(ht)

ht = Heatmap(m, cluster_rows = FALSE)
ht = make_row_cluster(ht)

ht = Heatmap(m, row_km = 2)
ht = make_row_cluster(ht)

ht = Heatmap(m, row_split = sample(letters[1:2], 10, replace = TRUE))
ht = make_row_cluster(ht)

ht = Heatmap(m, cluster_rows = hclust(dist(m)))
ht = make_row_cluster(ht)

ht = Heatmap(m, cluster_rows = hclust(dist(m)), row_split = 2)
ht = make_row_cluster(ht)

# ht_opt("verbose" = FALSE)