% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/06_visualization.R
\name{plot_directional_gsea}
\alias{plot_directional_gsea}
\title{Plot Directional GSEA}
\usage{
plot_directional_gsea(
  directional_gsea_obj,
  target_pathways,
  main_title = NULL,
  subPlot = 3,
  curveCol = NULL,
  add_pval = FALSE,
  show_contrast_in_axis = FALSE,
  ...
)
}
\arguments{
\item{directional_gsea_obj}{A wrapped GseaTask object (returned by extract_gsea_task)}

\item{target_pathways}{Vector of pathway IDs to plot (supports single or multiple)}

\item{main_title}{Main title name}

\item{subPlot}{Controls the number of subplots generated (1: enrichment plot only; 2: enrichment + heatmap track; 3: full rank track)}

\item{curveCol}{Custom curve color vector}

\item{add_pval}{Whether to add statistical annotations on the plot. Default FALSE.}

\item{show_contrast_in_axis}{Logical. Whether to display contrast group information on the x-axis of the Rank plot.
Default FALSE; recommended to set TRUE only in combined canvas mode.}

\item{...}{Additional parameters passed to internal engine}
}
\value{
ggplot2 composite object
}
\description{
Professional-grade GSEA plotting engine with seamless support for single or multiple pathway visualization.
  Automatically generates elegant legends and native red-blue gene distribution track.
}
\examples{
# Load pre-computed GseaRes and pick a task + an enriched pathway ID
data(precomputed_gseares, package = "GSEAlens")

gsea_res <- precomputed_gseares
task <- extract_gsea_task(gsea_res, contrast_id = "untrt_vs_trt")
res_df <- as.data.frame(task$gsea_res)
top_pathway <- res_df$ID[1]

# Render the directional GSEA plot (enrichment + rank + heatmap tracks)
p <- plot_directional_gsea(task, target_pathways = top_pathway)
class(p)
}
