Skip to contents

Visualize gene expression or cell metadata with violin plot

Usage

plotGeneViolin(object, gene, byDataset = TRUE, groupBy = NULL, ...)

plotTotalCountViolin(object, groupBy = "dataset", ...)

plotGeneDetectedViolin(object, groupBy = "dataset", ...)

Arguments

object

A liger object.

gene

Character gene names.

byDataset

Logical, whether the violin plot should be splitted by dataset. Default TRUE.

groupBy

Names of available categorical variable in cellMeta slot. Use FALSE for no grouping. Default NULL looks clustering result but will not group if no clustering found.

...

Additional arguments passed to plotCellViolin.

Value

ggplot if using a single gene and not splitting by dataset. Otherwise, list of ggplot.

Examples

plotGeneViolin(pbmcPlot, varFeatures(pbmcPlot)[1],
               groupBy = "leiden_cluster")
#> $ISG15.ctrl

#> 
#> $ISG15.stim

#> 
plotTotalCountViolin(pbmc)

plotGeneDetectedViolin(pbmc, dot = TRUE, box = TRUE, colorBy = "dataset")
#> Warning: Duplicated `override.aes` is ignored.