Jump to content

File:Dendro colorbars.png: Revision history

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

1 December 2025

  • curprev 10:4810:48, 1 December 2025 Brb talk contribs 1,945 bytes +1,945 <syntaxhighlight lang='r'> library(ComplexHeatmap) library(circlize) library(RColorBrewer) set.seed(123) # --- Example data (10 samples) --- mat <- matrix(rnorm(30), nrow = 10) rownames(mat) <- paste0("Sample", 1:10) mat[1:5, ] <- mat[1:5, ] mat[6:10, ] <- mat[6:10, ] + 2 # Cluster on samples (rows) hc <- hclust(dist(mat)) # Annotations in ORIGINAL sample order groups <- rep(c("A", "B"), each = 5) score <- seq(0, 1, length = 10) cl2 <- cutree(hc, 2) cl3 <- cutree(hc, 3) cl4 <- cutree(hc,...