This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Fisher exact test in R package

Hi Everyone I have generated a database dealing with changes amino acids in diseases. This dataset is a table of 20x20 table cross comprising 20 columns and 20 rows. Each amino acid will mutate to the 20 different amino acids. Since we have 20 amino acids, these serial of mutation will generate 400 cells. I will call these cells, table (a). My task is to compare these 400 cells (table a) against another (table b) of 400 cells. After this comparison, I want again to compare the (table a) of 400 cells against another (table c) of 400 cells. My goal here is to run Fisher exact test in R-package. Can somebody help me with this

Thanks

Pernert

fisher-test

1 answer

Fisher exact test applies on a 2*2 contingency table. so you need two categorical variable.

Variable 1 : Table (e.g TableA vs TableB or TableA vs TableC) Variable 2: AA change (Yes or No)

So for every cell e.g V->K change, you can make below table format

          Yes    No 
TableA    20           30 
TableB     10           50

And use this for fischer exact test.

df <- matrix(c(20, 10, 30, 50), nrow = 2,  dimnames = list(c("TableA", "TableB"), c("Yes", "No")))

fisher.test(df)

I am not sure how you can calculate No. It can be either V->V i.e. no change or V->other than K

Log in to answer this question.