Run Gene Ontology Over-Representation Analysis on Multiple DEG Sets
run_go_ora.RdPerforms GO enrichment analysis for each cluster-specific DEG list using
clusterProfiler::enrichGO. Produces a QC summary table of tested
versus retained gene sets per cluster.
Usage
run_go_ora(
de_list,
org_db,
universe = universe,
keyType = "SYMBOL",
qvalueCutoff = 0.1,
ont = "bp",
outputDir = NULL,
outname = "GO_ORA_QC_summary.csv"
)Arguments
- de_list
A named list of data frames, each containing at least a column
genewith gene symbols. Typically the output ofrun_cluster_de.- org_db
An
OrgDbannotation object (e.g.,org.Mm.eg.db::org.Mm.eg.dbfor mouse,org.Hs.eg.db::org.Hs.eg.dbfor human).- universe
Character vector of background gene symbols representing all genes tested in the differential expression analysis. Defines the enrichment universe.
- keyType
Character string specifying the gene identifier type. Default
"SYMBOL".- qvalueCutoff
Numeric. q-value (BH-adjusted p-value) threshold for retaining enriched terms. Default
0.1.- ont
Character string specifying the GO sub-ontology to test:
"BP"(Biological Process),"MF"(Molecular Function),"CC"(Cellular Component), or"all". Default"bp".- outputDir
Character path to the directory where the QC summary CSV is written. Created if it does not exist.
- outname
Character filename for the QC summary CSV. Default
"GO_ORA_QC_summary.csv".
Value
A named list of enrichResult objects (one per cluster).
Elements are NULL for clusters with no DEGs. A QC summary CSV is
also written to <outputDir>/<outname>.
Details
For each cluster, the function:
Extracts unique gene symbols from the DE data frame.
Calls
clusterProfiler::enrichGOwithminGSSize = 5,maxGSSize = 300, BH adjustment, andreadable = TRUE.Annotates the result with the cluster name.
Prints a per-cluster summary of tested/retained gene sets.