Learn R Programming

tidyHeatmap (version 1.0.1)

heatmap: Creates a `ComplexHeatmap` plot from `tbl_df`

Description

heatmap() takes a tbl object and easily produces a ComplexHeatmap plot, with integration with tibble and dplyr frameworks.

Usage

heatmap(
  .data,
  .row,
  .column,
  .value,
  annotation = NULL,
  type = rep("tile", length(quo_names(annotation))),
  transform = NULL,
  .scale = "row",
  palette_value = c("#440154FF", "#21908CFF", "#fefada"),
  palette_discrete = list(),
  palette_continuous = list(),
  .abundance = NULL,
  .horizontal = NULL,
  .vertical = NULL,
  log_transform = NULL,
  palette_abundance = NULL,
  ...
)

Arguments

.data

A `tbl_df` formatted as | <ELEMENT> | <FEATURE> | <VALUE> | <...> |

.row

The name of the column vertically presented in the heatmap

.column

The name of the column horizontally presented in the heatmap

.value

The name of the transcript/gene abundance column

annotation

Vector of quotes

type

A character vector of the set c(\"tile\", \"point\", \"bar\", \"line\")

transform

A function, used to tranform .value row-wise (e.g., transform = log1p)

.scale

A character string. Possible values are c(\"none\", \"row\", \"column\", \"both\")

palette_value

A character vector This is the palette that will be used as gradient for .value

palette_discrete

A list of character vectors. This is the list of palettes that will be used for horizontal and vertical discrete annotations. The discrete classification of annotations depends on the column type of your input tibble (e.g., character and factor).

palette_continuous

A list of character vectors. This is the list of palettes that will be used for horizontal and vertical continuous annotations. The continuous classification of annotations depends on the column type of your input tibble (e.g., integer, numerical, double).

.abundance

DEPRECATED. Please use .value instead

.horizontal

DEPRECATED. Please use .column instead

.vertical

DEPRECATED. Please use .row instead

log_transform

DEPRECATED. Please use transform instead

palette_abundance

DEPRECATED. Please use palette_value instead

...

Further arguments to be passed to ComplexHeatmap::Heatmap

Value

A `ComplexHeatmap` object

Details

maturing

To be added.

Examples

Run this code
# NOT RUN {
library(dplyr)
tidyHeatmap::N52 %>%
group_by( `Cell type`) %>%
tidyHeatmap::heatmap(
 .row = symbol_ct,
 .column = UBR,
 .value = `read count normalised log`,
 annotation = CAPRA_TOTAL
)


# }

Run the code above in your browser using DataLab