Hypergeometric test I have compared 1370 genes which are obtained from ChIP-sequencing analysis and 652 genes which are differentially regulated genes obtained by analyzing affymetrix 430.2.0 mouse array. When I intersect both these lists of genes, I get 37 genes in common.
I would like to calculate the significance of this overlap. I was thinking to use phyper in R, but this requires the total number of genes. I am confused about which number to give. Should I give the total number of probes from affymetrix ChIP, or should I give the whole mouse genome number from ChIP-sequencing data?
Can anybody suggest some ways to perform this significance test in R?
Thanks.
 A: You can't, at least not without more information. 
You're in a situation like this:
         B  notB   Total
A        x   z      Ta
notA     y   -       -

Total   Tb   -       -

You have the values x,Ta and Tb, and can work out y and z. To use a hypergeometric you'd need to know at least one of the values where there's a "-' in the table - information about the things that aren't in your samples from A or B - i.e. that are in some (possibly notional) collection of not-A & not-B that for you are unobserved.
Even if you can give bounds on one of those values, you might be able to get somewhere.
First, though, can you describe the circumstances in which the hypergeometric model makes sense for this? (e.g. in terms of drawing some number of balls at random from an urn containing balls of two colours)

The problem is you're* trying to measure dependence between A and B.
*(though so far only implicitly, so it would be good to be explicit in your question) 
Consider that fourth cell inside the table (the missing one):
        B  notB 
A      37  1333   1370
notA  615   w       -

      652   -       -

if w = 10, there's strong negative association between A and B
if w $\approx$ 22157, there's no association between A and B
if w = $10^{6}$, there's (weak, but highly significant) positive association between A and B
For w between something in the ballpark of 16,000 to 31,000 there's no clear indication of association. Much lower than 16,000 suggests negative association, much more than 30,000 suggests positive association (though it depends on where you want to set your significance levels).
With some idea of $w$ we can talk about the hypergeometric .... but I am still worried about whether - even given some number for $w$ - the hypergeometric model for the situation even applies.
