assayHeatmap {karyotapR}R Documentation

Generate heatmap of assay data

Description

Creates a heatmap of data from the indicated TapestriObject assay slot using the ComplexHeatmap package. Heatmaps are generated as transposed (i.e. x-y flipped) representations of the assay matrix. Additional ComplexHeatmap::Heatmap() parameters can be passed in to overwrite defaults.

Usage

assayHeatmap(
  TapestriExperiment,
  alt.exp = NULL,
  assay = NULL,
  split.col.by = NULL,
  split.row.by = NULL,
  annotate.row.by = NULL,
  color.preset = NULL,
  color.custom = NULL,
  ...
)

Arguments

TapestriExperiment

TapestriExperiment object

alt.exp

Character, altExp slot to use. NULL (default) uses top-level/main experiment.

assay

Character, assay slot to use. NULL (default) uses first-indexed assay (usually "counts").

split.col.by

Character, rowData column to split columns by, i.e. "chr" or "arm". Default NULL.

split.row.by

Character, colData column to split rows by, i.e. "cluster". Default NULL.

annotate.row.by

Character, colData column to use for block annotation. Default NULL.

color.preset

Character, color preset to use for heatmap color, either "copy.number" or "copy.number.denoise" (see Details). Overrides color.custom. NULL (default) uses default ComplexHeatmap coloring.

color.custom

Color mapping function given by circlize::colorRamp2(). color.preset must be NULL.

...

Additional parameters to pass to ComplexHeatmap::Heatmap().

Value

A ComplexHeatmap object

Options for color.preset

"copy.number"

Blue-white-red gradient from 0-2-4. 4 to 8+ is red-black gradient.

circlize::colorRamp2(c(0,1,2,3,4,8),
c('#2c7bb6','#abd9e9','#ffffff','#fdae61','#d7191c', "black"))

"copy.number.denoise"

Similar to 'copy.number' present, but white range is from 1.5-2.5 to reduce the appearance of noise around diploid cells.

circlize::colorRamp2(c(0,1,1.5,2,2.5,3,4,8),
c('#2c7bb6','#abd9e9','#ffffff','#ffffff','#ffffff','#fdae61','#d7191c', "black"))

See Also

Heatmap

Examples

tap.object <- newTapestriExperimentExample() # example TapestriExperiment object
assayHeatmap(tap.object,
  assay = "counts", split.row.by = "test.cluster",
  annotate.row.by = "test.cluster", split.col.by = "chr"
)

[Package karyotapR version 1.0.1 Index]