Skip to contents

Draw a ComplexHeatmap object with optional sample and taxa annotations.

Usage

plot_heatmap_annotation(
  object,
  taxonomic_rank = c("Kingdom", "Phylum", "Class", "Order", "Family", "Genus", "Species"),
  top_n = 20,
  relative = TRUE,
  sample_annotation = NULL,
  taxa_annotation = NULL
)

Arguments

object

A microbiome_dataset object.

taxonomic_rank

Taxonomic rank used for aggregation.

top_n

Number of taxa displayed.

relative

Whether to use relative abundance.

sample_annotation

Optional sample metadata columns.

taxa_annotation

Optional taxa metadata columns.

Value

A ComplexHeatmap::Heatmap object.

Examples

data("global_patterns", package = "microbiomedataset")
plot_heatmap_annotation(
  global_patterns,
  taxonomic_rank = "Phylum",
  top_n = 8,
  sample_annotation = "SampleType"
)