This is a question which came up recently regarding the RNA-Seq in limma/voom, and limma/voom using the variancePartition function dream().
When following the workflow outlined in this document (dream: Differential expression testing with linear mixed models for repeated measures) we can see at the beginning a limma/voom analysis resulting in an object called vobj. This object was created by passing the DGEList object twice through the voom function, once before and once after the execution of duplicateCorrelation. The blocking factor is not provided within the design formula in both cases.
This is different to the later described dream workflow. Here, blocking (duplicateCorrelation) is performed as it is in the limma workflow (blocking variable not part of design formula), but when the dream function is executed, the blocking variable is part of the design formula. Can someone briefly explain why?
A factor defining individual patient/subject effects, which are "blocked" first, seem to be provided again as random effects in the dream function...
Hi Ben,
Thanks for your comment. Both limma and dream analysis include two steps: 1) estimate weights, 2) fit regression model using these weights. The limma/voom workflow uses voom() and then lmFit(). The dream package focuses on replacing lmFit() with dream() in order to model random effects, also knowing as blocking. So the current version of the package leaves the first step exactly as it is for the limma/voom workflow. I have found this to be a good enough approximation.
But I agree it is not ideal, and can be a little confusing.
I am currently developing a new first step function: voomWithDreamWeights() that I think will behave liked you expected here. I will get back to you in about a week about testing this new function out.
Thanks for the clarification! That's very helpful. So I will continue using the workflow as described in the vignette by using voom > duplicateCorreltion > voom > dream, and providing the blocking factor as a random effect within dream.
Hi Ben,
I wanted to get back to you about your earlier questions. The new version 1.14.1 implements voomWithDreamWeights() so you can specify random effects in the calculation of the precision weights
Thanks for the clarification! That's very helpful. So I will continue using the workflow as described in the vignette by using
voom
>duplicateCorreltion
>voom
>dream
, and providing the blocking factor as a random effect withindream
.Thanks much!