% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/03_pathways.R
\name{build_gsea_pathways}
\alias{build_gsea_pathways}
\title{Build GSEA Pathway Database with Interactive Selection}
\usage{
build_gsea_pathways(species = "HS", auto_select = NULL)
}
\arguments{
\item{species}{Character string specifying the species. Options:
\itemize{
  \item "HS": Homo sapiens (human, default)
  \item "MM": Mus musculus (mouse)
}}

\item{auto_select}{Optional parameter for automated selection. Can be:
\itemize{
  \item NULL: Launch interactive menu (default)
  \item "ALL": Load entire MSigDB database for the specified species
  \item Character vector: Collection names (e.g., c("H", "C5:GO:BP") for human)
}}
}
\value{
A list object containing:
  \itemize{
    \item TERM2GENE: Data frame mapping pathway IDs to gene symbols
    \item meta_dict: Metadata dictionary with descriptions, URLs, and collection info
    \item SuperTag: Intelligent batch identifier for the selected collections
    \item collections_used: Data frame of selected collection metadata
    \item species: Species identifier ("HS" or "MM")
  }
}
\description{
Provides an interactive or automated gene set selection interface
  based on msigdbr, generating standardized pathway objects with intelligent
  semantic tagging. Supports both human (Homo sapiens) and mouse (Mus musculus)
  species.
}
\examples{
\donttest{
# Automated selection by collection name -- safe for non-interactive use
pathways <- build_gsea_pathways(species = "HS",
                                auto_select = c("H", "C5:GO:BP"))

# MM uses M-prefixed collection codes (MH, M5:GO:BP, ...)
pathways_mm <- build_gsea_pathways(species = "MM",
                                   auto_select = c("MH", "M5:GO:BP"))
}

\dontrun{
# Interactive menu -- only runs when user is at a terminal
if (interactive()) {
  pathways <- build_gsea_pathways(species = "HS")
}

# Load ALL collections -- downloads the entire MSigDB (slow, needs network)
pathways <- build_gsea_pathways(species = "HS", auto_select = "ALL")
}
}
