I am trying to analyse some single cell RNA seq data with MAST, currently I'm using an edgeR pipeline and I cannot work out how to properly test a contrast in MAST.
The experimental setup is a 3x2 with 3 strains and 2 conditions, I'd like to test differential expression between the conditions within each strain. I have set up a "strain-condition" style factor for my samples and I'm using a `~0 + group` design. My understanding was that I could use
zlm_output <- zlm(~0 + group, x)
summary_contr <- summary(zlm_output, doLRT = c(1, -1, 0, 0, 0, 0))
To test my contrast of interest. However this gives me the following error
Error in logFC(zlmfit, contrast0, contrast1) :
Assuming comparision to intercept, but I can't figure out what coefficient that corresponds to. Provide `contrast0`.
Could someone guide me in the correct usage of this package for testing contrasts?
Thanks, I guess having an intercept model is fine. Is this interface for contrasts documented anywhere? I couldn't quite work it out from the vignette and help pages.
Can you be more specific when you say "interface for contrasts" The
contrasts(colData(x)$strain) = "contr.sum"
business is base R and determines the coding for your factors, hence interpretation of your coefficients. Venables & Ripley is the canonical reference for that.Specifying linear combinations of coefficients to test is documented in ?"ZlmFit-class".