bro_plot_heatmap: Plot pretty heatmaps from tidy data

Description Usage Arguments

Description

This function is a wrapper around pheatmap::pheatmap() that allows long tidy data as input.

Usage

1
2
3
4
5
6
7
8
bro_plot_heatmap(df, rows, columns, values, filename = NA,
  ann_row = NULL, ann_col = NULL, gaps_row = NULL, gaps_col = NULL,
  ann_colors = NA, breaks = NA, scale = "none", fontsize = 7,
  cellwidth = NA, cellheight = NA, color_scale_min = NA,
  color_scale_max = NA, color_scale_n = 100,
  color = colorRampPalette(rev(RColorBrewer::brewer.pal(n = 7, name =
  "RdYlBu")))(color_scale_n), return_data = FALSE,
  cluster_rows = FALSE, cluster_cols = FALSE, border_color = NA, ...)

Arguments

df

Input dataframe in long format.

rows

Column of the dataframe to use for heatmap rows.

columns

Column of the dataframe to use for heatmap columns.

values

Column of the dataframe containing the values to plot.

ann_row, ann_col

Column(s) of the dataframe to use for row and column annotation. Multiple columns can be provided as vector, e.g. c(column1, column2, column3).

gaps_row, gaps_col

Column of the dataframe to use for row and column gaps.

ann_colors

List of colors used to color code row and column annotations. See pheatmap::pheatmap() for details.

breaks

Sequence used for mapping values to colors. Is one element longer than color_scale_n. See pheatmap::pheatmap() for details.

scale

Character indicating if the values should be centered and scaled by "row", "column" or "none". Default is "row".

fontsize

Base fontsize for the plot.

cellwidth, cellheight

Cell width and hieght in points. If left NA, cells will scale to fill the available space.

color_scale_min, color_scale_max

Minimal and maximal value on color scale.

color_scale_n

Number of color on color scale.

color

Vector of colors used in heatmap.

return_data

If TRUE processed data is returned instead of plot.

...

Other parameters passed to pheatmap::pheatmap().


jbengler/bro documentation built on Dec. 8, 2019, 12:44 p.m.