Hi there, I am using DESeq2 to analyse RNAseq from siRNA treated samples and 2 controls (Scramble and Untreated). Each treatment has 4 cell lines:
treatment cellline group
<fct> <fct> <fct>
1 Untreated 1 Control
2 Scramble 1 Control
3 Knockdown 1 Knockdown
4 Untreated 2 Control
5 Scramble 2 Control
6 Knockdown 2 Knockdown
7 Untreated 3 Control
8 Scramble 3 Control
9 Knockdown 3 Knockdown
10 Untreated 4 Control
11 Scramble 4 Control
12 Knockdown 4 Knockdown
I would like to contrast Knockdown versus all Control samples but remove effects due to (i) cell line and (ii) scramble. I would like to use the most optimal design and contrast to achieve this.
The straight forward options are to either lump together Untreated and Scramble into a single Control group:
design = ~ cellline + group
results(dds, contrast=c("group", "Knockdown", "Control"))
or ignore Untreated samples all together:
design = ~ cellline + treatment
results(dds, contrast=c("group", "Knockdown", "Scramble"))
Neither are optimal and I wondered whether there is a better option that incorporates Scramble treatment into the design but avoid the error: model matrix is not full rank, so the model cannot be fit as specified.
For example, could i specify a likelihood ratio rest with the full model = ~ cellline + treatment + group
and reduced = ~ cellline + treatment
?
Many thanks! Oliver
Thank you Michael Love !
Yes, averaging the difference between Knockdown vs scramble and Knockdown vs untreated is a much better solution. So using
design = ~ cellline + treatment
and then:Thanks so much!
Yes, for a typical
model.matrix
setup it should givec(0,-.5,1)