Description Usage Arguments Examples
Extract the clusters from a ComplexHeatmap
1 | heatmap_extract_cluster(heatmap_obj, matrix_obj, which = "column")
|
heatmap_obj |
a Heatmap object |
matrix_obj |
the matrix that was used to create the heatmap, needs col and or row names |
which |
row or column cluster |
1 2 3 4 5 6 7 8 9 | mat = matrix(rnorm(80, 2), 8, 10)
mat = rbind(mat, matrix(rnorm(40, -2), 4, 10))
mat = matrix(rnorm(80, 2), 8, 10)
mat = rbind(mat, matrix(rnorm(40, -2), 4, 10))
rownames(mat) = letters[1:12]
colnames(mat) = letters[1:10]
HM <- ComplexHeatmap::Heatmap(mat, km=3) #Make a heatmap, and have 3 clusters
HM <- ComplexHeatmap::draw(HM) #Show the heatmap
heatmap_extract_cluster(HM, mat, which = "row")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.