annotatedHeatmap: Make a heatmap with annotations by experimental variable

View source: R/heatmap.R

annotatedHeatmapR Documentation

Make a heatmap with annotations by experimental variable

Description

This is a generic function which may be useful outside of this package. It produces a heatmap based on an expression matrix and accompanying experiment data in the form of a frame, using pheatmap() or d3heatmap().

Usage

annotatedHeatmap(
  plotmatrix,
  displaymatrix,
  sample_annotation,
  cluster_cols,
  cluster_rows,
  scale,
  row_labels,
  row_height = 12,
  colors = colorRampPalette(rev(RColorBrewer::brewer.pal(n = 7, name = "RdYlBu")))(100),
  display_numbers = FALSE
)

Arguments

plotmatrix

Expression/ other data matrix

displaymatrix

A matrix of values that might be displayed in cells

sample_annotation

A data frame with sample metadata

cluster_cols

Cluster columns?

cluster_rows

Cluster rows?

scale

'row', 'column' or none

row_labels

Vector labels to use for rows

row_height

The height to use for each row

colors

A vector of colors for the heatmap

display_numbers

Boolean, should values be displayed in the heatmap?

Details

The clustering parameters for pheatmap() and d3heatmap() are set to be consistent with one another.

Value

output A plot as produced by pheatmap()


pinin4fjords/shinyngs documentation built on Jan. 18, 2025, 7:09 p.m.