Answers.Body: <p>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:</p>
  
  <pre><code>data &lt;- matrix(c(0, 1, 2, 5), ncol = 2, nro = 2)
  fisher.test(data)
  </code></pre>
  
  <p>Or you can use the specific function <a href="https://stackoverflow.com/q/8382806/2886003"><code>phyper</code></a>, to see the relation between them you can read this <a href="https://stats.stackexchange.com/q/82688/105234">question and answer</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-09-27T18:14:34.117Z
Answers.LastActivityDate: 2018-09-27T18:14:34.117Z
Answers.UserDisplayName: llrs
Body: <p>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. <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4755009/" rel="nofollow noreferrer">This study on honey bees</a> has done something of the kind.</p>
  <p>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.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-09-27T07:48:53.150Z
Comments.Text: Do you have problem with the hypergeometric test or with the later methods they do?
Comments.UserDisplayName: llrs
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-09-27T17:17:58.280Z
Comments.Text: @Llopis I have never done hypergenometric tests before and I am not sure how to do it.
Comments.UserDisplayName: The Last Word
Tags: <networks><clustering>
Title: Check if a set of genes fall more on a specific cluster than other clusters
ThreadText: # Check if a set of genes fall more on a specific cluster than other clusters
  
  (Asked by: username_0 on 2018-09-26)
  
  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](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4755009/) 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.
  
  **Tags:** networks, clustering
  
  > **Comments:**
  > **username_1**: Do you have problem with the hypergeometric test or with the later methods they do?  
  > **username_0**: @Llopis I have never done hypergenometric tests before and I am not sure how to do it.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-09-27. Score: 1
  
  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 <- matrix(c(0, 1, 2, 5), ncol = 2, nro = 2)
  fisher.test(data)
  
  ```
  
  Or you can use the specific function [`phyper`](https://stackoverflow.com/q/8382806/2886003), to see the relation between them you can read this [question and answer](https://stats.stackexchange.com/q/82688/105234)
  
  
  ---
  
  