Bioinformatics, step by step · Workshop
Module 7 · Functional analysis
Video: T9 From gene lists to pathways. Script: scripts/07_functional_analysis.R (run module 5 first)
Goal. Turn thousands of DE genes into a handful of pathways, with three methods. Then question the results.
A. Over-representation by hand
For one pathway, count the genes in the 2 × 2 table (in the pathway or not, significant or not). Then ask how
surprising the overlap is: phyper(k − 1, K, N − K, n, lower.tail = FALSE), which is the same as a one-sided
Fisher's exact test.
Q7.1 For Oxidative phosphorylation, what are N, n, K and k? How many significant genes would you expect by chance? What is the p-value?
Q7.2 Do the same for HIF-1 signaling pathway. The paper is about HIF-1. Is the pathway over-represented at day 1? What would you write in a report?
Q7.3 Run ORA for all 303 KEGG pathways, adjust with BH, and list the top 10. Then repeat with only the up genes, and with only the down genes. Which pathways go up, and which go down?
Q7.4 (theory) Why should the universe be the tested genes, not all 21,814 genes in the table?
B. piano (from the original workshop)
runGSA(..., geneSetStat = "reporter", signifMethod = "nullDist", nPerm = 1000)
Q7.5 How many KEGG pathways are distinctly up, and how many distinctly down, at padj < 0.05 for day 1? Repeat for day 3, and for GO biological processes (
data/GOBP.gmt). Is it getting worse or better with time?Q7.6 A p adj of exactly 0 is reported for several pathways. What does that really mean with 1,000 permutations?
C. fgsea
Q7.7 Which pathways have the most negative NES? Do they agree with piano's "distinctly down"? Look at
plotEnrichment()for oxidative phosphorylation.
D. Sanity check
Q7.8 piano reports Olfactory transduction as distinctly up in the heart. Look at the
baseMeanof its genes, and at how many were filtered out. Do you believe the result? Does fgsea agree?Q7.9 In three sentences, summarise the biology of day 1 and day 3 after MI from your results.