Skip to contents

Plot copy number heatmap

Usage

cnaHeatmap(
  sce,
  assay_name = "state",
  clone_name = NULL,
  cluster_cells = FALSE,
  log2 = FALSE,
  center = FALSE,
  scale = c("none", "cells", "bins", "both"),
  label_genes = NULL,
  col_fun = NULL,
  col_clones = NULL,
  cluster_clones = FALSE,
  legend_name = assay_name,
  clust_annot = TRUE,
  verbose = TRUE,
  top_annotation = NULL,
  bulk_cn_col = NULL,
  raster_quality = 10,
  row_split = NULL,
  ...
)

cloneCnaHeatmap(
  sce,
  assay_name = "counts",
  clone_name = NULL,
  scale = c("none", "cells", "bins", "both"),
  log2 = FALSE,
  center = FALSE,
  clust_lab = TRUE,
  aggr_fun = mean,
  round = FALSE,
  ...
)

Arguments

sce

A SingleCellExperiment object

assay_name

Name of the assay to plot

clone_name

Name of clone_id column in sce object

cluster_cells

If the value is a logical, it controls whether to make cluster on rows. The value can also be a stats::hclust or a stats::dendrogram which already contains clustering. Note this will override ordering of specified clones. Check https://jokergoo.github.io/ComplexHeatmap-reference/book/a-single-heatmap.html#clustering.

log2

Logical: Log2 transform the matrix prior to plotting

center

logical: center the matrix prior to plotting

scale

One of 'cells', 'bins', 'both' or 'none'. Determines what kind of scaling is done.

label_genes

Optional: Vector of gene names to label in the heatmap. Note: overlap_genes must be run prior to labelling genes.

col_fun

Color mapping function from circlize::colorRamp2()

col_clones

Optional: A named vector (or unnamed) of clone colors.

cluster_clones

Logical: Whether or not to order the clones by clustering

legend_name

Name of the legend

clust_annot

Annotate cluster and sample labels

verbose

Logical: Message verbosity

top_annotation

Top annotation as per ComplexHeatmap::columnAnnotation()

bulk_cn_col

Name of column in rowRanges(sce) that contains bulk copy number data to plot on top of heatmap

raster_quality

Quality of raster (default: 10)

row_split

Row split for ComplexHeatmap::Heatmap()

...

Additional parameters that can be passed to ComplexHeatmap::Heatmap()

clust_lab

Cluster labels

aggr_fun

Aggregation function

round

Round pseudobulked values to integers

Value

A heatmap