Dear colleagues,
I would like to perform mutual exclusivity test on some expression data. My data are presented in form of contingency table, where columns are patients, rows are genes and "0"/"1" states if the expression of particular gene was favorable on disease recurrence in particular patient. Mutual exclusivity I mean any test that allow to check if genes and their expression rather act in concert or are mutually exclusive (if the effect of those genes is cumulative or not). I saw a lot of algorithms that are probable to perform such analyses, however they are all based on mutational data, not expression like mine (I mean algorithms like MEMo, RME, Dendrix and CoMEt). cBioPortal also performs it, however the analysis is restricted to data stored in cBioPortal and expression is normalized with z-score that doesn't in my field of interest.
I would appreciate any feedback, I don't mind using R/Python etc.
Thanks in advance!
Best regards
Thanks for answer. I'll read the content. Regarding the Fisher exact test I was thinking about it, however dependently on case I have ~20 genes and ~200-500 samples. I am not sure whether it is not too much for this test and secondly how to correct it for multi-testing.
So let's take an example with 20 genes and 200 samples. In R (sorry the code is not optimal at all..):
Here's the results
Hopes it will help
Thank your for this helpful code. I appreciate it :)
I've tried to do it on my data, as your code is actually what I was looking for, however I experienced some issue I cannot skip anyhow.
I tried to insert my own matrix instead of yours generated with code:
and after I run
colnames
androw.names
I got some errors like: Error:length of dimnames [2] not equal to array extentNot sure how to fix this issue, as many suggestions from other forums didn't work it out. I would appreciate your further help.
could you print g and s value ?
Sure.
My data for this analysis: https://drive.google.com/open?id=0B0bjUaxpKQldZlIzeGlpM0lVUGc
Probably I make some mistake trying to insert those data as matrix. You used
runif
to generate some test data.Thanks in advance!
how do you open your data in R. Could you post a subset of your data.
I read the data into matrix as follows:
I presented only partial data, as I cannot upload the whole subset here. It should be
nrow = 12
andncol = 300
with "0" and "1" distributed in particular way.Ok. You told me that genes are in columns and sample in rows. So you should inverse nrow=300 and ncol=12. Also the for factor renaming you should do :
I am sorry for the misunderstanding. I did not precisely describe my data. Thank you for your help as the code is working now. I really appreciate it.