Gene Set Enrichment by Fisher's Exact Test

Dave Airey
Nov 2015

Background

Gene set enrichment by Fisher's Exact Test evaluates if the proportion of interesting genes in a pathway (or gene set) is enriched relative to the proportion of interesting genes not in a pathway.

  • It uses a 'competitive null hypothesis' rather than 'self-contained'.
  • It can lose control over alpha when genes are not independent.
  • It can also have a bias based on pathway size.
  • It remains the most commonly used gene set enrichment test.

Fisher's Exact Test Code

Based on a 2x2 table of genes counts split by whether the genes are of interest or not, and whether the genes are in a pathway or not, a p-value from Fisher's exact test can be calculated:

a <- 17; b <- 181; c <- 449; d <- 19551 
fisher.test(matrix(c(a,b,c,d),2,2,byrow=TRUE), 
            alternative='greater')$p.value
[1] 3.693347e-06

The Shiny app implements this code in an easy to use interface.

Further development

Improvements to consider:

  • User should be able to paste lists of genes
  • User should be provide measures of effect size (e.g., odds ratio)
  • User should be offered tests which allow gene dependence