plot_violin_wFeatFilter: Plot Violin Plots of Gene Expression by Group

View source: R/Seurat_based.R

plot_violin_wFeatFilterR Documentation

Plot Violin Plots of Gene Expression by Group

Description

Plot Violin Plots of Gene Expression by Group

Usage

plot_violin_wFeatFilter(
  SerObj,
  Feature,
  group.by,
  NumFeatName = NULL,
  cutGT = T,
  ThrCut = 0,
  GrpFacLevels = NULL,
  compariSerObjns = NULL,
  xlab = "",
  ylab = "",
  palette = col_vector,
  addJitter = F
)

Arguments

SerObj

A Seurat object containing the data to plot.

Feature

The name of the feature to plot.

group.by

The name of the metadata field to group cells by.

NumFeatName

The name of the variable containing the number of features for each cell. If provided, cells with a number of features greater than the median will be excluded from the plot.

cutGT

If TRUE (default), cells with a number of features greater than the median will be excluded from the plot. If FALSE, cells with a number of features less than or equal to the median will be excluded from the plot.

ThrCut

The threshold for feature filtering. Cells with a value in the sdaCompName column greater than this threshold will be excluded from the plot. Default is 0, which will skip this step.

GrpFacLevels

The levels of the factor variable to use for grouping. If NULL (default), all levels will be included.

compariSerObjns

A list of compariSerObjns to perform using stat_compare_means. Each compariSerObjn should be a vector of two group names.

xlab

(Optional) The x-axis label.

ylab

(Optional) The y-axis label.

palette

The color palette to use for the plot.

addJitter

If TRUE, jitter points will be added to the plot. Default is FALSE.

Value

A ggplot object.


eisascience/scCustFx documentation built on June 2, 2025, 3:59 a.m.