Thursday, 8 August 2013

fisher exact test for testing ratios of two columns

fisher exact test for testing ratios of two columns

I am trying to see if the ratios of Non_syn_snps to Total_SNps is
significant or not for all 10 chromosomes. Here is the dataframe
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?
Thanks Upendra

No comments:

Post a Comment