Hello all,
I have a quick question regarding the makeContrasts function of the limma package, for which I couldn't find a clear answer online. I am running a differential expression pipeline and I want to explore the effect of 3 mutations, lets call them: mutA, mutB, mutC. I built a design matrix by putting the mutations in a factor variable along with the control. Now the variable has 4 levels (mutA, mutB, mutC, control) and I have set the "control" level as the first level.
How do I make a contrast that detects DE elements that are found in all mutated samples when compared to the control?
Basically I want to make a contrast like this: "(mutA + mutB + mutC)/3 - control"
but "control" doesn't appear as a coefficient in the design matrix since it is the reference level.
Is this:
design <- model.matrix( ~ factor with mutations as levels + some confounders)
con <- makeContrasts("(mutA + mutB + mutC)/3", levels=design)
the correct way to make the contrast I am looking for? Or is this doing something else?
Thanks in advance!
Stefan
Thank you for the quick response!