11: Functional Enrichment & Pathway Mining
Chapter 11: Functional Enrichment Analysis & Pathway Mining (clusterProfiler)
Translating lists of hundreds of differentially expressed genes into biological insight requires functional enrichment testing against Gene Ontology (GO) and KEGG databases using clusterProfiler.
1. Over-Representation Analysis (ORA)
Testing for statistical over-representation of Gene Ontology Biological Process (BP) terms:
library(clusterProfiler)
library(org.Hs.eg.db)
ego <- enrichGO(
gene = sig_entrez_ids,
universe = universe_entrez_ids,
OrgDb = org.Hs.eg.db,
ont = "BP",
pAdjustMethod = "BH",
pvalueCutoff = 0.01,
qvalueCutoff = 0.05,
readable = TRUE
)
head(ego)2. Visualizing Enriched Biological Pathways
# Dotplot of top 10 enriched pathways
dotplot(ego, showCategory = 10, title = "Enriched Gene Ontology Terms")
# Gene-concept network plot (cnetplot)
cnetplot(ego, categorySize = "pvalue", foldChange = gene_log2fc)