DESeq2 comparisons with multiple experimental variables?
2
0
Entering edit mode
Roland • 0
@7662917f
Last seen 21 months ago
United States

Summary: I'm trying to get a series of pairwise comparisons of specific experimental variables while holding the other variables constant, and can't figure out how to do it in DESeq2

I am running an circadian experiment with multiple disease states and experimental interventions, let's say

condition: high fat (HFC), normal chow (NC), low fat (LFC)
disease_state: healthy (H), and type-2 diabetic (D) 

and tested across a day:

zt_time: 1,13

I'd like to have log-fold change tables of each comparison, e.g.

tables of (HFC vs NC), (HFC vs LFC), (NC vs LFC) for each of H and D at each timepoint, as well as across all timepoints
tables of (H vs D) for each of HFC, NC, and LFC at each timepoint

I tried using a cross-product formula and lfcshrink

condition <- ~ condition*disease_state*zt_time
dds <- DESeqDataSetFromTximport(txi=im, colData=md, design=condition)

dds <- DESeq(dds)

coefs <- resultsNames(dds)
for (cof in 2:length(coefs)) {
  out_lf_change <- sprintf(out_lf_change_tmpl, coefs[cof])
  res <- lfcShrink(dds, coef=cof, type='apeglm', parallel=TRUE)
}

But the coefficients at the end don't make sense to me, since they look like

> resultsNames(dds)
 [1] "Intercept"                                  
 [2] "condition_LFC_vs_HFC"                         
 [3] "condition_NC_vs_HFC"                         
 [4] "disease_state_H_vs_D"                  
 [5] "timepoint_13_vs_1"                      
 [6] "conditionLFC.disease_stateH"              
 [7] "conditionNC.disease_stateH"              
 [8] "conditionLFCtimepoint13"                  
 [9] "conditionNC.timepoint13"                  
[10] "disease_stateH.timepoint13"            
[11] "conditionLFC.disease_stateH.timepoint13"
[12] "conditionNC.disease_stateH.timepoint13"

Which I just don't understand (e.g. at coef=11, what is the comparison?).

How can I build what I want?

DESeq2 • 1.4k views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 1 hour ago
United States

For interpretation of coefficient in the linear model, I’d recommend consulting with a local statistician. I have to restrict my time on the support site to software related questions.

ADD COMMENT
0
Entering edit mode
swbarnes2 ★ 1.3k
@swbarnes2-14086
Last seen 15 hours ago
San Diego

It is not clear to me that your design with the asterisks is a "cross-product" of anything. But that method is almost certainly not what you want.

If you want to just compare one subset of samples to another, make another column of ColData (or in your cases, you probably want a few columns) with different combinations of elements grouped together, then make the appropriate group your design.

For your "Across all time points", you probably want to do something like design - ~ condition_disease + time, where time is being treated as something akin to batch; a source of variability that should be modeled.

ADD COMMENT

Login before adding your answer.

Traffic: 699 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