Skip to contents

Draws a dendrogram of a hierarchical clustering applied to the samples of an experiment.

Usage

plot_dendrogram(
  object,
  all_features = FALSE,
  color,
  dist_method = "euclidean",
  clust_method = "ward.D2",
  center = TRUE,
  scale = "uv",
  title = "Dendrogram of hierarchical clustering",
  subtitle = NULL,
  color_scale = getOption("notame.color_scale_dis"),
  assay.type = NULL
)

Arguments

object

a SummarizedExperiment or MetaboSet object

all_features

logical, should all features be used? If FALSE (the default), flagged features are removed before visualization.

color

character, name of the column used for coloring the sample labels

dist_method

distance method used in clustering as in dist

clust_method

method used in clustering as in hclust

center

logical, should the data be centered?

scale

scaling used, as in prep. Default is "uv" for unit variance

title

The plot title

subtitle

The plot subtitle

color_scale

the color scale as returned by a ggplot function.

assay.type

character, assay to be used in case of multiple assays

Value

A ggplot object.

See also

Examples

data(example_set)
plot_dendrogram(example_set, color = "Group")