I would like to do rna seq data for several genes, tested in control and treatment.
To do fisher.test I need a contingency table for each gene, is there a way to do this in R instead of computing a contingency table for each gene?
I am new to this so any advice can be helpful.
Hello, it's not clear from your question what it is you are testing with your fisher.test. Are you trying to test enrichment of the transcript in one condition versus another? If so it might be better to use a dedicated package for rna seq such as DESeq2 rather than fisher.test.
I have used fisher.test to test enrichment of candidate gene sets compared to the reference for things such as GO terms or similar classification terms. If you want some advice on setting that up let me know.
does all the Fisher tests. However, as Steve and Anna have commented, we strongly advise against this because it ignores biological variation and will drastically over-estimate the significance of any differences found.
It would seem from a casual look at the data you give that you actually have paired data whereby each treated sample is paired with a control sample. You should use limma, edgeR or DESeq2 to undertake a paired analysis with proper estimation of replicate to replicate variability.
Hello, it's not clear from your question what it is you are testing with your fisher.test. Are you trying to test enrichment of the transcript in one condition versus another? If so it might be better to use a dedicated package for rna seq such as DESeq2 rather than fisher.test.
I have used fisher.test to test enrichment of candidate gene sets compared to the reference for things such as GO terms or similar classification terms. If you want some advice on setting that up let me know.
I'll echo what Anna said, but with more conviction: you absolutely should not use a fisher.test for this. Use edgeR, limma/voom, or DESeq2.