vln: Generate violin plots of gene expression in each cluster

Description Usage Arguments Value Author(s) Examples

View source: R/feature_plots.R

Description

Similar to Seurat::VlnPlot() except it prints genes that are not found in the data, but continues plotting without error, and has a (default) option to group plots by cluster instead of gene.

Usage

1
2
vln(seurat, genes, facet_by = "cluster", point_size = 0.1,
  adjust = 1)

Arguments

seurat

Seurat object

genes

Genes to plot violins for

facet_by

String, one of "gene" or "cluster". Default: "cluster", genes will be on the x axis, and there will be one plot per cluster. If "gene", clusters will be on the x axis, and there will be one plot per gene (akin to Seurat::VlnPlot)

point_size

Numeric value for point size, use -1 to hide points. Default: 0.1.

adjust

Bandwidth for density estimation, passed to geom_violin. See ggplot2 documentation for more info. Default: 1. NOTE/TODO: If vln() with facet = gene looks different from Seurat::VlnPlot, this is probably the culprit.

Value

A ggplot2 object

Author(s)

Selin Jessa

Examples

1
2
3
vln(pbmc, c("IL32", "MS4A1"))
vln(pbmc, c("IL32", "MS4A1"), facet_by = "gene")
vln(pbmc, c("IL32", "MS4A1"), point_size = -1, facet_by = "gene")

fungenomics/cytobox documentation built on Feb. 13, 2020, 10:51 a.m.