complex_vlnplot_single: Violin plot for a single gene across groups

View source: R/plot_violin.R

complex_vlnplot_singleR Documentation

Violin plot for a single gene across groups

Description

This function generates violin plot(s) to compare the expression of a single gene across different groups or cell types. It is designed for visualizing a complicated scenario: Gene expression on multiple cell types and multiple conditions.

Usage

complex_vlnplot_single(
  seu_obj,
  feature,
  celltypes = NULL,
  groups,
  add.dot = T,
  font.size = 14,
  pt.size = 0.1,
  splitby = NULL,
  alpha = 0.5,
  strip.color = NULL
)

Arguments

seu_obj

A complete Seurat object.

feature

Gene name. Only one gene is allowed.

celltypes

Cell types of interest. By default, all cell types are included.

groups

Groups selected for plotting. Support multiple groups.

add.dot

Whether or not to add points on the violins.

font.size

Font size for the labels.

pt.size

Point size for the data points on the violin.

splitby

Group to split the gene expression. Only works when length(groups)==1.

alpha

Point transparency. value from 0 to 1.

strip.color

Colors for the strip background.

Value

A ggplot object


HaojiaWu/plot1cell documentation built on Nov. 13, 2023, 9:20 a.m.