Learn R Programming

cellGeometry (version 0.5.7)

signature_heatmap: Gene signature heatmap

Description

Produces a heatmap of genes signatures for each cell subclass using ComplexHeatmap.

Usage

signature_heatmap(
  x,
  type = c("subclass", "group", "groupsplit"),
  top = Inf,
  use_filter = NULL,
  arith_mean = FALSE,
  rank = c("max", "angle"),
  scale = c("none", "max", "sphere"),
  col = rev(hcl.colors(10, "Greens3")),
  text = TRUE,
  fontsize = 6.5,
  outlines = FALSE,
  outline_col = "black",
  subset = NULL,
  add_genes = NULL,
  ...
)

Value

A 'Heatmap' class object.

Arguments

x

Either a gene signature matrix with genes in rows and cell subclasses in columns, an object of S3 class 'cellMarkers' generated by cellMarkers(), or an object of class 'deconv' generated by deconvolute().

type

Either "subclass" or "group" specifying whether to show the cell subclass or cell group signature from a 'cellMarkers' or 'deconv' object. "groupsplit" shows the distribution of mean gene expression for the group signature across subclasses.

top

Specifies the number of genes per subclass/group to be displayed.

use_filter

Logical whether to show denoised gene signature.

arith_mean

Logical whether to show log2(arithmetic mean), if calculated, instead of usual mean(log2(counts +1)).

rank

Either "max" or "angle" controlling whether genes (rows) are ordered in the heatmap by max expression (the default) or lowest angle (a measure of specificity of the gene as a cell marker).

scale

Character value controlling scaling of genes: "none" for no scaling, "max" to equalise the maximum mean expression between genes, "sphere" to scale genes to the unit hypersphere where cell subclasses or groups are dimensions.

col

Vector of colours passed to ComplexHeatmap::Heatmap().

text

Logical whether to show values of the maximum cell in each row.

fontsize

Numeric value for font size for cell values when text = TRUE.

outlines

Logical whether to outline boxes with maximum values in each row. This supercedes text.

outline_col

Colour for the outline boxes when outlines = TRUE.

subset

Character vector of groups to be subsetted.

add_genes

Character vector of gene names to be added to the heatmap.

...

Optional arguments passed to ComplexHeatmap::Heatmap().