Heatmap of mean marker intensity per phenotype. Analogous to Seurat's
DoHeatmap.
Arguments
- object
An
SpatialCellDataobject with aphenotypecolumn.- markers
Character vector or
NULL. Markers to include. IfNULL, all markers are shown.- slot
Character. Data slot to use:
"data"(default) or"counts".- palette
Character or character vector. Default
NULL(global palette).- title
Character or
NULL.
Examples
counts <- matrix(c(rnorm(30, 1), rnorm(30, 0), rnorm(30, 0),
rnorm(30, 1)), ncol = 2,
dimnames = list(NULL, c("CD3", "CD8")))
coords <- data.frame(x = runif(60), y = runif(60))
meta <- data.frame(cell_id = 1:60, sample_id = "s1",
phenotype = rep(c("A", "B"), each = 30))
obj <- CreateSpatialObject(counts, coords, meta)
MarkerHeatmap(obj)