I want to conduct a differential expression analysis with MAST between two groups. In the analysis, I want to correct for a continuous confounder in a manner similar to this article: https://science.sciencemag.org/content/sci/suppl/2019/05/15/364.6441.685.DC1/aav8130VelmeshevSM.pdf . They say that "To identify genes differentially expressed due to the disease effect, likelihood ratio test (LRT) was performed by comparing the model with and without the diagnosis factor". Analogously, I would constract the following two models:
Thus, comparing both models I could avoid finding genes that vary due to "bias_score", and only detect those that are important in cancer. Could I use a likelihood test for that? If so, how?
which provides p values and coefficient estimates. The is_richterTRUE comes from how is_richter was named in the model matrix after being expanded as a contrast. If unsure, you can see how these were named with colnames(coef(zlmsignal, 'D')), or the error message also provides details. See section 4 of the MAIT vignette for some more examples.
Then, I try both of your options, but I get the following errors:
lr_test <- lrTest(zlm_signal, zlm_background)
Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘lrTest’ for signature ‘"ZlmFit", "ZlmFit"’
and
lr_test_summary <- summary(zlm_signal, doLRT = "is_richter")
Combining coefficients and standard errors
Calculating log-fold changes
Calculating likelihood ratio tests
Error in generateHypothesis(hypothesis, colnames(object@coefD)) :
Term(s) 'is_richter ,' not found.
Terms available: (Intercept) , is_richterTRUE , cold_shock_score1 ,
In addition: Warning messages:
1: In melt(coefAndCI, as.is = TRUE) :
The melt generic in data.table has been passed a array and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(coefAndCI). In the next version, this warning will become an error.
2: In melt(lfc) :
The melt generic in data.table has been passed a list and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(lfc). In the next version, this warning will become an error.
Which is weird since is_richter is definetely in the object:
Thanks a lot for your help!
So, to be more specific, this is how I'm building the SCA object and creating the models:
Then, I try both of your options, but I get the following errors:
and
Which is weird since is_richter is definetely in the object:
Do you have an idea of what might be wrong?
Thanks a lot in advance
R
Oops, I made a typo in the syntax. Please see my updated answer above.