plotDimReduceCluster: Plotting the cell labels on a dimensionality reduction plot

Description Usage Arguments Value Examples

View source: R/plot_dr.R

Description

Create a scatterplot for each row of a normalized gene expression matrix where x and y axis are from a data dimensionality reduction tool. The cells are colored by its given 'cluster' label.

Usage

1
2
plotDimReduceCluster(dim1, dim2, cluster, size = 1, xlab = "Dimension_1",
  ylab = "Dimension_2", specific_clusters = NULL)

Arguments

dim1

Numeric vector. First dimension from data dimensionality reduction output.

dim2

Numeric vector. Second dimension from data dimensionality reduction output.

cluster

Integer vector. Contains cluster labels for each cell.

size

Numeric. Sets size of point on plot. Default 1.

xlab

Character vector. Label for the x-axis. Default "Dimension_1".

ylab

Character vector. Label for the y-axis. Default "Dimension_2".

specific_clusters

Numeric vector. Only color cells in the specified clusters. All other cells will be grey. If NULL, all clusters will be colored. Default NULL.

Value

The plot as a ggplot object

Examples

1
2
3
4
celda.tsne <- celdaTsne(counts = celda.CG.sim$counts, celda.mod = celda.CG.mod)
plotDimReduceCluster(dim1 = celda.tsne[,1], dim2 = celda.tsne[,2],
                     cluster = as.factor(celda.CG.mod$z),
                     specific_clusters = c(1,2,3))

compbiomed/celda documentation built on May 25, 2019, 3:58 a.m.