This function is a wrapper around pheatmap::pheatmap()
that allows long tidy
data as input.
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, ... )
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. |
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 |
breaks | Sequence used for mapping values to colors. Is one element longer than |
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 |
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 |
... | Other parameters passed to |