Check if a set of genes fall more on a specific cluster than other clusters
A hypergeometric test is related to the fisher test, in a table with one  dimension being some factors and the other one some other factors it is tested if they are independent. In R you con do this:

data &lt;- matrix(c(0, 1, 2, 5), ncol = 2, nro = 2)
fisher.test(data)


Or you can use the specific function phyper, to see the relation between them you can read this question and answer