% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/15_code_generator.R
\name{generate_volcano_code}
\alias{generate_volcano_code}
\title{Generate Publication Volcano Code}
\usage{
generate_volcano_code(
  gsea_res_var = "gsea_res",
  contrast_id,
  left_group = "Left",
  right_group = "Right",
  n_selected = 0L,
  selected_ids = character(0),
  show_annotations = FALSE,
  target_collection = "ALL",
  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 to extract.}

\item{left_group}{Character.}

\item{right_group}{Character.}

\item{n_selected}{Integer. Number of selected pathways (subtitle).}

\item{selected_ids}{Character vector. Pathway IDs for ggrepel annotation.}

\item{show_annotations}{Logical. Add ggrepel labels for selected pathways.}

\item{target_collection}{Character. Gene set collection(s) to extract.
Default \code{"ALL"}.}

\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 pathway volcano plot as a static, publication-ready figure.
  Assumes a \code{GseaRes} object is already loaded in the R environment.
}
\examples{
code <- generate_volcano_code(
  gsea_res_var = "gsea_res", contrast_id = "untrt_vs_trt",
  left_group = "Ctrl", right_group = "Trt")
cat(code)
}
