Uses fisher.test to calculate the over-representation of a set of features on a functional category given an "universe" that is used as statistical background. Based on the Fisher's Exact Test over a contingency table.

fisherExactTest(features, funCat, universe)

Arguments

features

Input features.

funCat

All the features in the functional category.

universe

All the universe features.

Value

The over-representation significance as a P value.

Examples

g <- letters[1:5] f <- letters[2:6] f2 <- letters[c(1, 10:15)] u <- letters # this should give a low p value (high over-representation) fisherExactTest(g, f, u)
#> [1] 0.001611432
# this should give a high p value (low over-representation) fisherExactTest(g, f2, u)
#> [1] 0.8232289