% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/batch_wilcoxon.R
\name{batch_wilcoxon}
\alias{batch_wilcoxon}
\title{Batch Wilcoxon Rank-Sum Test Between Two Groups}
\usage{
batch_wilcoxon(
  data,
  target = "group",
  feature = NULL,
  feature_manipulation = FALSE
)
}
\arguments{
\item{data}{Data frame containing the dataset for analysis.}

\item{target}{Character string specifying the column name of the grouping
variable. Default is `"group"`.}

\item{feature}{Character vector specifying feature names to analyze. If
`NULL`, prompts for selection (interactive mode only). Default is `NULL`.}

\item{feature_manipulation}{Logical indicating whether to apply feature
manipulation filtering. Default is `FALSE`.}
}
\value{
Tibble with columns:
\describe{
  \item{sig_names}{Feature name}
  \item{p.value}{Raw p-value}
  \item{statistic}{Difference in means between groups}
  \item{p.adj}{Adjusted p-value (Benjamini-Hochberg)}
  \item{log10pvalue}{Negative log10-transformed p-value}
  \item{stars}{Significance stars: **** p<0.0001, *** p<0.001,
    ** p<0.01, * p<0.05, + p<0.5}
  \item{group1, group2}{Mean values for each group}
}
}
\description{
Performs Wilcoxon rank-sum tests (Mann-Whitney U tests) to compare the
distribution of specified features between two groups. Computes p-values,
adjusts for multiple testing, and ranks features by significance.
}
\examples{
# Create small example data
set.seed(123)
test_data <- data.frame(
  Gender = rep(c("Male", "Female"), each = 50),
  Signature1 = rnorm(100),
  Signature2 = rnorm(100)
)
# Compare features by gender
res <- batch_wilcoxon(
  data = test_data,
  target = "Gender",
  feature = c("Signature1", "Signature2")
)
head(res)
}
\author{
Dongqiang Zeng
}
