% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/15_code_generator.R
\name{generate_pathway_plot_code}
\alias{generate_pathway_plot_code}
\title{Generate Pathway Plotting Code}
\usage{
generate_pathway_plot_code(
  GSEAlens_res,
  contrast_id,
  target_pathways,
  user_genes = character(0),
  pathway_genes = character(0),
  expr_type = "logcpm"
)
}
\arguments{
\item{GSEAlens_res}{GseaRes object}

\item{contrast_id}{Character. Contrast ID}

\item{target_pathways}{Character vector. Pathway IDs}

\item{user_genes}{Character vector. Genes of interest}

\item{pathway_genes}{Character vector. Pathway genes (for coloring)}

\item{expr_type}{Character. Expression type}
}
\value{
A character string containing executable R code
}
\description{
Generate Pathway Plotting Code
}
\examples{
# Generate plotting code for the top enriched pathway in a pre-computed task
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]

code <- generate_pathway_plot_code(
  GSEAlens_res   = gsea_res,
  contrast_id    = "untrt_vs_trt",
  target_pathways = top_pathway
)
cat(code)
}
