How to perform Fisher's exact test between two gene lists for a particular gene in R?
1
0
Entering edit mode
5.6 years ago
Vasu ▴ 710

Hello Everyone,

I have two gene lists with sample, gene, chromosome, mutation_type, start, end, codon columns. Want to perform Fishers test between two gene lists for a particular gene eg: MAP3K1. Can anyone tell me how can I perform this in R?

Thank you

R fishers test significance statistics • 5.7k views
0
Entering edit mode

Are you talking about the FET implemented in the fisher.text() function? Can you please post an example so we can understand what kind of data you want to analyze?

0
Entering edit mode

For eg: I want see for MAP3K1. Could you please tell how to see it is wildtype or mutant? And then after that I want to perform fisher.test function.

             MAP3K1
wt  mutant
Genelist1    x    x
Genelist2    x    x

2
Entering edit mode

If you can summarize your dataframes into two columns "MAP3K1" (containing values "wt" and "mutant") and "LIST" ("list1" and "list2") then you could use table() to automatically generate contingency matrices. I don't know how easy this will be since I don't know the architectures of your dataframes. I guess an apply() function could help you to get the information you need.

1
Entering edit mode
5.6 years ago
sysbiocoder ▴ 180

You can use Gene Overlap package in R

https://bioconductor.org/packages/release/bioc/html/GeneOverlap.html