% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/15_code_generator.R
\name{generate_boxplot_data_code}
\alias{generate_boxplot_data_code}
\title{Generate Boxplot Expression-Data Extraction Code}
\usage{
generate_boxplot_data_code(
  GSEAlens_res,
  contrast_id,
  gene_symbol,
  expr_type = "logcpm",
  custom_order = NULL
)
}
\arguments{
\item{GSEAlens_res}{A \code{GseaRes} object.}

\item{contrast_id}{Character. Contrast ID (e.g. "Treat_vs_Control").}

\item{gene_symbol}{Character. Gene symbol as shown in the boxplot title.}

\item{expr_type}{Character. Expression matrix type passed to
\code{get_expr_matrix()} (e.g. "logcpm", "vst", "count"). Default "logcpm".}

\item{custom_order}{Character or NULL. Custom group ordering string
(e.g. "GroupA -> GroupB") or "default" / NULL to use natural order.
When non-default, the generated code will re-order the \code{Group}
factor accordingly.}
}
\value{
A character string of executable R code.
}
\description{
Produce a self-contained, reproducible R script that extracts
  the per-sample expression values (Sample / Group / Expression) of a
  single gene from a \code{GseaRes} object. The returned data frame
  matches exactly what is shown in the Quadrant module's expression
  boxplot (panel 4), so the user can paste it into other software
  (e.g. GraphPad Prism, Excel, R) for downstream plotting.
}
\examples{
\donttest{
data(precomputed_gseares, package = "GSEAlens")
code <- generate_boxplot_data_code(
  GSEAlens_res = precomputed_gseares,
  contrast_id  = "untrt_vs_trt",
  gene_symbol  = "GAPDH",
  expr_type    = "logcpm"
)
cat(code)
}
}
