visGroup: visGroup

View source: R/VisCms.R

visGroupR Documentation

visGroup

Description

Plot group label in a reduced dimensional plot.

Usage

visGroup(sce, group, dim_red = "TSNE")

Arguments

sce

A SingleCellExperiment object.

group

Character. Name of group/batch variable. Needs to be one of names(colData(sce)).

dim_red

Character. Name of embeddings to use as subspace for plotting. Default is "TSNE".

Details

Plots a reduced dimension plot colored by group parameter. The dimesion reduction embedding can be specified, but only tsne embeddings will automatically be computed by runTSNE. Embeddings from data integration methods (e.g. mnn.correct) can be used as long as they are specified in reducedDimNames(sce).

Value

a ggplot object.

See Also

visOverview, visMetric

Other visualize functions: visCluster()

Examples

library(SingleCellExperiment)
sim_list <- readRDS(system.file("extdata/sim50.rds", package = "CellMixS"))
sce <- sim_list[[1]][, c(1:50, 300:350)]

visGroup(sce, "batch")



almutlue/CellMixS documentation built on March 14, 2023, 8:23 a.m.