Generate a heatmap from a defined assay.

makeAbundanceHeatmap(
  sce,
  assayToPlot,
  doCenter,
  settings = "report",
  clusterRows = TRUE,
  ...
)

Arguments

sce

A SummarizedExperiment object (or a derivative).

assayToPlot

Character scalar giving the name of the assay in sce to plot.

doCenter

Logical scalar, whether to center the abundance values by row before creating the heatmap.

settings

Character scalar or NULL. Setting this to either "report" or "export" creates heatmaps with specific settings used in einprot reports and when exporting the heatmap to a pdf. Setting it to NULL allows any argument to be passed to ComplexHeatmap::Heatmap via the ... argument.

clusterRows

Logical scalar. For settings="report" or "export", indicates whether rows should be clustered or not. Typically set to FALSE for large experiments where clustering rows would be prohibitive.

...

If settings is NULL, additional arguments passed to ComplexHeatmap::Heatmap.

Value

A ComplexHeatmap object.

Details

The predefined settings correspond to the following extra arguments to Heatmap:

report:

show_row_names = FALSE

export:

show_row_names = TRUE, show_row_dend = FALSE, cluster_columns = TRUE, column_split = sce$group, add annotation for the fraction of NAs (imputed values) per feature.

Author

Charlotte Soneson

Examples

sce <- readRDS(system.file("extdata", "mq_example", "1356_sce.rds",
                           package = "einprot"))
hm <- makeAbundanceHeatmap(sce, assayToPlot = "log2_LFQ.intensity",
                           doCenter = TRUE, settings = "report")
#> 'magick' package is suggested to install to give better rasterization.
#> 
#> Set `ht_opt$message = FALSE` to turn off this message.
ComplexHeatmap::draw(hm)

hm <- makeAbundanceHeatmap(sce, assayToPlot = "log2_LFQ.intensity",
                           doCenter = TRUE, settings = "export")
#> 'magick' package is suggested to install to give better rasterization.
#> 
#> Set `ht_opt$message = FALSE` to turn off this message.
ComplexHeatmap::draw(hm)