plotMarkerHeatmap: Generate heatmap for a marker decision tree

Description Usage Arguments Value Examples

View source: R/findMarkersTree.R

Description

Creates heatmap for a specified branch point in a marker tree.

Usage

1
2
3
4
5
6
7
8
plotMarkerHeatmap(
  tree,
  counts,
  branchPoint,
  featureLabels,
  topFeatures = 10,
  silent = FALSE
)

Arguments

tree

A decision tree returned from findMarkersTree function.

counts

Numeric matrix. Gene-by-cell counts matrix.

branchPoint

Character. Name of branch point to plot heatmap for. Name should match those in tree$branchPoints.

featureLabels

List of feature cluster assignments. Length should be equal to number of rows in counts matrix, and formatting should match that used in findMarkersTree(). Required when using clusters of features and not previously provided to findMarkersTree()

topFeatures

Integer. Number of genes to plot per marker module. Genes are sorted based on their AUC for their respective cluster. Default is 10.

silent

Logical. Whether to avoid plotting heatmap to screen. Default is FALSE.

Value

A heatmap visualizing the counts matrix for the cells and genes at the specified branch point.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
## Not run: 
# Generate simulated single-cell dataset using celda
sim_counts <- simulateCells("celda_CG", K = 4, L = 10, G = 100)

# Celda clustering into 5 clusters & 10 modules
cm <- celda_CG(sim_counts, K = 5, L = 10, verbose = FALSE)

# Get features matrix and cluster assignments
factorized <- factorizeMatrix(cm)
features <- factorized$proportions$cell
class <- celdaClusters(cm)

# Generate Decision Tree
DecTree <- findMarkersTree(features, class, threshold = 1)

# Plot example heatmap
plotMarkerHeatmap(DecTree, assay(sim_counts),
  branchPoint = "top_level",
  featureLabels = paste0("L", celdaModules(cm)))

## End(Not run)

celda documentation built on Nov. 8, 2020, 8:24 p.m.