omics.co.in logo omics.co.in

11: Functional Enrichment & Pathway Mining

๐Ÿ“Š Downloadable Lesson R Script 4.3 KB

r11_pathway_enrichment_clusterprofiler.R

Over-Representation Analysis (ORA) via hypergeometric distribution, curated oncogenic pathway databases, fold enrichment metrics, and Benjamini-Hochberg FDR ranking.

$ Rscript r11_pathway_enrichment_clusterprofiler.R

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)
← Return to Home Hub Scroll to Top ↑