% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/15_code_generator.R
\name{generate_de_volcano_code}
\alias{generate_de_volcano_code}
\title{Generate Publication DE Volcano Code}
\usage{
generate_de_volcano_code(
  gsea_res_var = "gsea_res",
  contrast_id,
  user_genes = character(0),
  pathway_genes = character(0),
  logfc_thresh = 1,
  pval_thresh = 0.05,
  left_group = "Left",
  right_group = "Right",
  show_annotations = FALSE,
  base_size = 12,
  margin_top = 15,
  margin_bottom = 15,
  margin_left = 18,
  margin_right = 18,
  fig_width = 8,
  fig_height = 6,
  fig_dpi = 300
)
}
\arguments{
\item{gsea_res_var}{Character. Name of the GseaRes variable.}

\item{contrast_id}{Character. Contrast ID for DE table extraction.}

\item{user_genes}{Character vector of user-selected genes (upper-cased).}

\item{pathway_genes}{Character vector of pathway genes (upper-cased).}

\item{logfc_thresh}{Numeric. Default 1.}

\item{pval_thresh}{Numeric. Default 0.05.}

\item{left_group}{Character.}

\item{right_group}{Character.}

\item{show_annotations}{Logical. Add ggrepel labels.}

\item{base_size}{Numeric.}

\item{margin_top}{Numeric. Top plot margin (mm).}

\item{margin_bottom}{Numeric. Bottom plot margin (mm).}

\item{margin_left}{Numeric. Left plot margin (mm).}

\item{margin_right}{Numeric. Right plot margin (mm).}

\item{fig_width}{Numeric. Figure width in inches for ggsave.}

\item{fig_height}{Numeric. Figure height in inches for ggsave.}

\item{fig_dpi}{Numeric. DPI for PNG raster output (default 300).}
}
\value{
Character scalar of executable R code.
}
\description{
Return an executable ggplot2 script reproducing the Quadrant
  module's gene-level Differential Expression Volcano as a static figure.
  Assumes a \code{GseaRes} object is already loaded. Six-color classification
  (both / user / pathway / up / down / ns) mirrors the interactive view.
}
\examples{
code <- generate_de_volcano_code(
  gsea_res_var = "gsea_res", contrast_id = "untrt_vs_trt",
  left_group = "Ctrl", right_group = "Trt")
cat(code)
}
