Question: How to calculate chromosomal enrichment of differentially expressed genes
gravatar for Sakti
6.0 years ago by
United States
Sakti440 wrote:

Dear all,

I have a list of differentially expressed genes between 2 experimental conditions. I observed that one of the chromosomes (3 in mouse) has a lot more genes coming up as differential expressed, and I want to know whether this number is statistically significant.

I was thinking about using a permutation test in R or perl to randomly select differentially expressed genes for the whole pool of genes in the genome, and then check how many of these are located in chromosome 3, and compare these values against my obtained experimental values.

However, I'm a little lost whether this is a valid approach to solve my question, and also I don't know how to whether there are already algorithms out there doing this exact same thing.


ADD COMMENTlink modified 2.6 years ago by Biostar ♦♦ 20 • written 6.0 years ago by Sakti440
gravatar for Devon Ryan
6.0 years ago by
Devon Ryan98k
Freiburg, Germany
Devon Ryan98k wrote:

While you certainly could use permutation to answer this, it would seem much simpler to just Fisher's exact test. The four number you'd need are (1) The number of differentially expressed genes on chromosome 3, (2) the number of non-DE genes on chromosome 3, (3) the number of DE genes not on chromosome 3, and (4) the number of non-DE genes not on chromosome 3. Then it's simply fisher.test() in R and you're done.

Edit: BTW, you can use a one-sided test.

ADD COMMENTlink modified 6.0 years ago • written 6.0 years ago by Devon Ryan98k

Thank you so much Devon for your reply. I think I need to re-take some stats courses it seems. Thanks!!

ADD REPLYlink written 6.0 years ago by Sakti440

So for those who want to do a similar thing, I ended up doing what Devon said in this piece of code:

mat = matrix(c(#DEchr3 #non-DEchr3,#DEgenesnotonchr3,#non-DEgenesnotonchr3),2,2)
fisher.test(mat, alternative = "greater")

I think it's "greater" in the alternative, as suggested by Devon, unless he corrects me about it.

ADD REPLYlink written 6.0 years ago by Sakti440

And not noticing this post I ended up wrapping this in a function to test over all chromosomes:


ADD REPLYlink written 5.8 years ago by A. Domingues2.4k

Wonderful post, very informative. Thanks for sharing the function with us!

ADD REPLYlink written 5.6 years ago by Sakti440
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1006 users visited in the last hour