% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pathway_enrichment.R
\name{categorized_enrich}
\alias{categorized_enrich}
\title{Perform Pathway Enrichment Analysis for Pre-Categorized DEGs}
\usage{
categorized_enrich(
  DEGs_category,
  enrichment_db = "KEGG",
  organism = "hsa",
  gene_type = "SYMBOL",
  org_db = NULL,
  custom_db = NULL,
  pvalueCutoff = 0.05,
  qvalueCutoff = 0.2,
  return_df = FALSE
)
}
\arguments{
\item{DEGs_category}{Data frame with columns 'DEG_Type' and 'Gene_Symbols'.}

\item{enrichment_db}{"KEGG", "GO", "REACTOME", or "CUSTOM" (default: "KEGG").}

\item{organism}{Organism code for KEGG (default: "hsa").}

\item{gene_type}{Gene identifier type supported by OrgDb
(e.g., "SYMBOL", "ENTREZID", "ENSEMBL", "UNIPROT").}

\item{org_db}{OrgDb object for gene annotation (default: org.Hs.eg.db).}

\item{custom_db}{TERM2GENE data frame, required if enrichment_db = "CUSTOM".}

\item{pvalueCutoff}{Numeric p-value cutoff (default: 0.05).}

\item{qvalueCutoff}{Numeric q-value cutoff (default: 0.2).}

\item{return_df}{Logical, if TRUE returns data.frames, else enrichResult objects (default: FALSE).}
}
\value{
Named list of enrichment results per DEG_Type.
}
\description{
Performs pathway enrichment analysis for categorized DEGs using GO, KEGG, Reactome, or a custom TERM2GENE database.
}
\details{
Gene IDs converted only when needed; KEGG/Reactome require ENTREZID; GO/CUSTOM use provided gene_type.
}
