Skip to contents

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

Examples

tap.object <- newTapestriExperimentExample() # example TapestriExperiment object
#>  Moving gRNA probe  to `altExp` slot "grnaCounts".
#>  Moving barcode probe  to `altExp` slot "barcodeCounts".
#>  Moving chrY probe(s) probe_231, probe_232, probe_233, probe_234, probe_235, probe_236, probe_237, probe_238, probe_239, and probe_240 to `altExp` slot "chrYCounts".
assayHeatmap(tap.object,
  assay = "counts", split.row.by = "test.cluster",
  annotate.row.by = "test.cluster", split.col.by = "chr"
)