I am trying to check to see if the ratios of Non_syn_snps to Total_SNps is significant or not for all 10 chromosomes in my SNP data set. Here is the dataframe for the same.
Ch Non_Syn Total_Snps ratios
1 A01 4658 23657 0.1968973
2 A02 3347 16685 0.2005993
3 A03 7292 36963 0.1972784
4 A04 2608 13161 0.1981612
5 A05 1883 10665 0.1765588
6 A06 4141 22033 0.1879454
When i tried to do fisher test on the fourth column
fisher.test(data_total[,4])
I am getting this error
"Error in fisher.test(test_fish[, 4]) : if 'x' is not a matrix, 'y' must be given"
I even tried to convert this to matrix and do the same thing but still i am getting the same error.
Can somebody tell me what i am doing wrong here? Also is it ok to just use the fourth column for fisher test for my purpose?
Thanks Upendra
You're not going to use the ratios for a Fisher's test, but rather the number of synonymous and non-synonymous SNPs. Also, you need something to compare the numbers to (i.e., you want to test whether your observations are significantly different from something else), which seems to be missing here.