# Check if a set of genes fall more on a specific cluster than other clusters

I have a network which I clustered into 11 smaller clusters. I have a set of genes and I would like to check if statistically significant number of these genes fall on any specific cluster. One method which I thought of was to find which percentage of a total cluster were made up of my genes of interest. For example, say 60% of the genes in a cluster were the genes in my list. However, I was hoping that there was a better way to do this. This study on honey bees has done something of the kind.

I would appreciate if there was a way to do something similar. I do not know how to replicate what they have done in the study. Any help is appreciated.

• Do you have problem with the hypergeometric test or with the later methods they do? – llrs Sep 27 '18 at 7:48
• @Llopis I have never done hypergenometric tests before and I am not sure how to do it. – The Last Word Sep 27 '18 at 17:17

data <- matrix(c(0, 1, 2, 5), ncol = 2, nro = 2)

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