% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-core-genes.R
\name{get_core_genes_for_pathway}
\alias{get_core_genes_for_pathway}
\title{Extract Pathway Core Genes (Leading Edge)}
\usage{
get_core_genes_for_pathway(gsea_res_obj, pathway_id)
}
\arguments{
\item{gsea_res_obj}{GseaRes object or single GSEA result (list(status=, data=, ...))}

\item{pathway_id}{Character, pathway ID}
}
\value{
Character vector, core genes (uppercase normalized)
}
\description{
Parse the core_enrichment field from GSEA results to extract the gene list.
  This is the fundamental data interface for all visualization modules in 03/04.
}
\examples{
# Load a pre-computed GseaRes and extract a 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)
pw_id <- res_df$ID[1]
core_genes <- get_core_genes_for_pathway(task, pw_id)
head(core_genes)
}
