Plot distribution of group across clusters
plotCellsInClusters.Rd
Takes a single cell object, a grouping variable, a factor within the group to test, and an ident class (i.e. clusters). Plots percentage or raw number of cells within factor present per level of ident (i.e. per cluster)
Usage
plotCellsInClusters(
sc.obj,
group = "barcode",
factor = NULL,
clusters = "seurat_clusters",
plot.pct = T,
plot = T
)
Arguments
- sc.obj
Single cell Seurat or SingleCellExperiment object containing clusters and group metadata.
- group
a column of metadata (string). Default = `barcode`.
- factor
a level of group to test for enrichment per cluster, e.g. a specific barcode (string).
- clusters
a column of metadata defining the cluster identities of each cell (string). Default = `seurat_clusters`
- plot.pct
Plot percentages (`TRUE`) or raw numbers (`FALSE`) (boolean). Default = `TRUE`
- plot
Create plot (`TRUE`) or return data (`FALSE`) (boolean). Default = `TRUE`.