This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to calculate chromosomal enrichment of differentially expressed genes

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.

Thanks!!

rna-seq differential expression permutation

1 answer

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.

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

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.

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

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

Log in to answer this question.