plot_groups: Plot cell groups

Description Usage Arguments Value Examples

Description

plot_groups() colors cells differently according to a grouping variable (e.g. cell clusters) on a two-dimensional plot. A two-dimensional dimensionality reduction object with coordinates for each cell (e.g. by t-SNE or UMAP dimensionality reduction) is required.

Usage

1
2
plot_groups(group_vector, dim_reduction, colors = NULL, alpha = 1,
  cell_size = 0.1, title = NULL)

Arguments

group_vector

a vector assigning each cell to a group

dim_reduction

a dataframe specifying the coordinates of a dimensionality reduction output (e.g. t-SNE, UMAP etc.). Each column should specify one dimension.

colors

a vector of colors to use for coloring cells. Number of colors must equal to the number of clusters specified in cluster_vector

cell_size,

the size of the point representing each cell

rescale

logical; whether to rescale color scale as a continuous gradient from the minimum to the maximum value of expression for specified gene; defaults to FALSE

Value

A ggplot2 object

Examples

1
plot_groups(group_vector=kmeans_clusters_res, dim_reduction=tsne_proj[,c("TSNE.1", "TSNE.2")])

jacobheng/cellwrangler documentation built on Aug. 12, 2019, 6:49 a.m.