cluster_heatmaps: Plot heatmap with cluster results and dendrogram

View source: R/plot_heatmaps.R

cluster_heatmapsR Documentation

Plot heatmap with cluster results and dendrogram

Description

Plot heatmap with cluster results and dendrogram

Usage

cluster_heatmaps(
  scaled_selected_data,
  clusters,
  k,
  cluster_colors,
  scaled_unselected_data = NULL,
  annotation = NULL
)

Arguments

scaled_selected_data

scaled matrix or data frame with variables used for clustering

clusters

hierarchical cluster results produced by fastcluster::hclust()

k

targeted number of clusters

cluster_colors

list of cluster colors to match with boxplots

scaled_unselected_data

(optional) scaled matrix or data frame with variables not used for clustering

annotation

(optional) ComplexHeatmap::columnAnnotation object

Value

a ComplexHeatmap::Heatmap

Examples

dmat <- compute_dmat(iris, "euclidean", TRUE, c("Petal.Length", "Sepal.Length"))
clusters <- compute_clusters(dmat, "complete")
species_annotation <- create_annotations(iris, "Species")
cluster_heatmaps(scale(iris[c("Petal.Length", "Sepal.Length")]),
                 clusters,
                 3,
                 visxhclust::cluster_colors,
                 annotation = species_annotation)

visxhclust documentation built on March 31, 2023, 7:30 p.m.