Description Usage Arguments Value Examples
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.
1 2 | plot_groups(group_vector, dim_reduction, colors = NULL, alpha = 1,
cell_size = 0.1, title = NULL)
|
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 |
A ggplot2 object
1 | plot_groups(group_vector=kmeans_clusters_res, dim_reduction=tsne_proj[,c("TSNE.1", "TSNE.2")])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.