Question: Combining control samples from 2 separate studies. Model matrix for batch effect?
gravatar for tolgaturant
2.6 years ago by
tolgaturant20 wrote:

For a gene expression project using limma, I have 2 studies with control samples processed the same way but at different times. However, the treatment samples are coming from only one study. I did not want just pool the controls, instead wanted to add the controls with a batch variable. Is below model.matrix suitable for this purpose? I know that if treatments were available for both studies, it would be a standard model with a batch variable but I am confused for this case.

treat  study
1  control_4hr study2
2  control_4hr study2
3  control_4hr study2
4 treatment1_4hr study2
5 treatment1_4hr study2
6 treatment1_4hr study2
7  control_4hr study1
8  control_4hr study1
9  control_4hr study1


    (Intercept) comparison1$treattreatment1 comparison1$studystudy2
1           1                             0                      1
2           1                             0                      1
3           1                             0                      1
4           1                             1                      1
5           1                             1                      1
6           1                             1                      1
7           1                             0                      0
8           1                             0                      0
9           1                             0                      0

Any insight would be appreciated.

ADD COMMENTlink modified 2.6 years ago by Devon Ryan91k • written 2.6 years ago by tolgaturant20
gravatar for Devon Ryan
2.6 years ago by
Devon Ryan91k
Freiburg, Germany
Devon Ryan91k wrote:

Your proposed model matrix is correct. You might want to get in the habit of putting batch variable first in your models, since often plotting functions will use the last term in your model for coloring/plotting.

ADD COMMENTlink written 2.6 years ago by Devon Ryan91k

Thank you for confirming. Could you suggest a reading that explains what the additional variables in the design are doing and when the model is not full-rank?

ADD REPLYlink modified 2.6 years ago • written 2.6 years ago by tolgaturant20
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1146 users visited in the last hour