FeatThrTab_boxplot: Generate a boxplot with jittered points for the percentage of...

View source: R/Visualizations_Seurat_based.R

FeatThrTab_boxplotR Documentation

Generate a boxplot with jittered points for the percentage of values exceeding a threshold.

Description

Generate a boxplot with jittered points for the percentage of values exceeding a threshold.

Usage

FeatThrTab_boxplot(
  SerObj,
  FeatName = NULL,
  CutThresh = NULL,
  MetaDataName = "Population",
  TitleExtra = "",
  col = "#A6CEE3",
  MetaDataName2 = "SubjectId",
  ylab_text = "",
  xlab_text = "",
  base_size = 16,
  my_comparisons = NULL,
  limits = c(0, 110),
  GT = T,
  StatMethod = "wilcox.test",
  StatLab = "p.signif"
)

Arguments

SerObj

The input data or object.

FeatName

The name of the feature variable.

CutThresh

The threshold value for categorizing values.

MetaDataName

The name of the metadata variable for grouping (default: "Population").

TitleExtra

Additional title text for the plot.

col

The color for the boxplot and jittered points (default: "#A6CEE3").

MetaDataName2

The name of the second metadata variable (default: "SubjectId").

ylab_text

The label for the y-axis.

xlab_text

The label for the x-axis.

base_size

The base font size for the plot (default: 16).

my_comparisons

A vector specifying pairwise comparisons for statistical testing (default: NULL).

limits

A vector to define the limits of the percent axis (default: c(0, 110)).

GT

T/F to select greater than and equal to threshold if T else less than (default: T).

StatMethod

passed to stat_compare_means only in t.test and in wilcox.test (default: wilcox.test).

StatLab

passed to stat_compare_means p.signif" (shows the significance levels), "p.format" (shows the formatted p value), (default: p.signif).

Value

A ggplot object representing the boxplot with jittered points.

Examples

# Example usage:
FeatThrTab_boxplot(SerObj, FeatName = "Feature1", CutThresh = 0.5)



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