6.5 Part 3 — Comparing ORA and GSEA

ORA and GSEA are complementary — they answer different questions and will not always agree.

ora_hits  <- bind_rows(ora_up_clean, ora_down_clean) %>% pull(ontology_name)
gsea_hits <- gsea_sig$pathway

both      <- intersect(ora_hits, gsea_hits)
ora_only  <- setdiff(ora_hits, gsea_hits)
gsea_only <- setdiff(gsea_hits, ora_hits)

cat("Pathways significant in BOTH :", length(both), "\n")
## Pathways significant in BOTH : 2
cat("Pathways in ORA only         :", length(ora_only), "\n")
## Pathways in ORA only         : 17
cat("Pathways in GSEA only        :", length(gsea_only), "\n")
## Pathways in GSEA only        : 0
if (length(both) > 0) {
  cat("\nPathways found by both methods:\n")
  cat(paste(" -", both), sep = "\n")
}
## 
## Pathways found by both methods:
##  - Phenylalanine metabolism
##  - ABC transporters
Interpretation guide:
  • Both significant — high confidence; strong pathway-level change driven by many DE genes
  • ORA only — genes crossing the significance threshold cluster in this pathway, but the overall coordinated shift may be modest
  • GSEA only — coordinated but subtle change below the LFC/padj threshold; genes shift together without individual genes being significant