sig_box_batch: Title sig_box_batch

View source: R/sig_box_batch.R

sig_box_batchR Documentation

Title sig_box_batch

Description

The sig_box_batch function is used to generate multiple signature box plots for analyzing the relationship between variables and groups in a given input data. It takes the input data, a vector of features or variables to analyze, and a vector of groups or categories to group the analysis by. The function allows customization of various parameters such as the path to save the figures, the appearance of the plots, and the statistical details to include. The generated figures are saved in the specified path or a default folder.

Usage

sig_box_batch(
  input,
  vars,
  groups,
  pattern_vars = FALSE,
  path = NULL,
  index = 0,
  angle_x_text = 0,
  hjust = 0.5,
  palette = "jama",
  cols = NULL,
  jitter = FALSE,
  point_size = 5,
  size_of_font = 8,
  size_of_pvalue = 4.5,
  show_pvalue = TRUE,
  return_stat_res = FALSE,
  assay = NULL,
  slot = "scale.data",
  scale = FALSE,
  height = 5,
  width = 3.5,
  fig_type = "pdf",
  max_count_feas = 30
)

Arguments

input

The input data for analysis.

vars

A vector of features or variables to analyze.

groups

A vector of groups or categories to group the analysis by.

pattern_vars

A logical value indicating whether the feature names specified in 'vars' should be treated as patterns to match. If set to TRUE, the function will search for matching column names in the input data and use them for analysis.

path

The path to save the generated figures. If not specified, a default folder named "1-sig-box-batch" will be created.

index

The index number to start naming the generated figures.

angle_x_text

The angle of the x-axis labels in the figures.

hjust

The horizontal alignment of the x-axis labels in the figures.

palette

The color palette to use for the figures.

cols

A vector of colors to use for the elements in the figures.

jitter

A logical value indicating whether to add jitter to the points in the figures.

point_size

The size of the points in the figures.

size_of_font

The size of the font in the figures.

size_of_pvalue

The size of the p-value text in the figures.

show_pvalue

A logical value indicating whether to show the p-value in the figures.

return_stat_res

A logical value indicating whether to return the statistical results.

assay

The assay or data type to use for analysis (for Seurat object)

slot

The slot in the data to use for analysis. (for Seurat object)

scale

A logical value indicating whether to scale the data before analysis.

height

The height of the generated figures.

width

The width of the generated figures.

fig_type

The file format to save the generated figures (e.g., "pdf").

Author(s)

Dongqiang Zeng

Examples


data("tcga_stad_pdata", package = "IOBR")
sig_box_batch(data = tcga_stad_pdata, vars = c("TMEscore_plus", "GZMB"), groups = "subtype", jitter = T, palette = "jco")


IOBR/IOBR documentation built on May 5, 2024, 2:34 p.m.