Contrast treated samples against both scramble and untreated controls
1
0
Entering edit mode
@oliverziff-22402
Last seen 23 months ago
United Kingdom

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

design contrast DESeq2 • 1.2k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 16 hours ago
United States

You can do ~cellline + treatment. Now you in actuality have three groups of samples aside from the cell-line differences. When you want to compare KD vs the two controls, do you want to just average the difference between KD vs scramble and KD vs untreated? You can do that with a numeric contrast vector.

ADD COMMENT
0
Entering edit mode

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:

mod_mat <- model.matrix(design(dds), colData(dds))
Knockdown <- colMeans(mod_mat[dds$treatment == "Knockdown", ])
Control <- colMeans(mod_mat[dds$treatment %in% c("Scramble", "Untreated"),]) # vector of coefficients for the average of Scramble and Untreated
kd_vs_ctrl <- results(dds, contrast = Knockdown - Control)

Thanks so much!

ADD REPLY
1
Entering edit mode

Yes, for a typical model.matrix setup it should give c(0,-.5,1)

ADD REPLY

Login before adding your answer.

Traffic: 788 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6