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?