Dear DESeq2 support:
I wish to use lfcShrink after doing a contrast with a 2X2 factor experiment. I grouped the variables based on the suggestion in ?results because I am interested in specific interactions as well as main effects. I could not find how to proceed with
lfcShrink for results object generated with
results(contrast=list() which I used to test the main effects.
Here is an example where I would like to know the effect of "fertilizer":
dds <- makeExampleDESeqDataSet() dds$fertilizer <- factor(rep(c("fertilized", "unfertilized"),each=1)) colData(dds)$group <- factor(paste0(colData(dds)$condition, "_", colData(dds)$fertilizer)) design(dds) <- ~ group dds <- DESeq(dds) resultsNames(dds) # test fertilizer effect res_fertilizer <- results(dds, contrast=list(c("group_B_fertilized_vs_A_fertilized","Intercept"), c("group_A_unfertilized_vs_A_fertilized","group_B_unfertilized_vs_A_fertilized")), listValues=c(1/2, -1/2)) # shrink res_shrink <- lfcShrink(dds, res = res_fertilizer, contrast = list(c("groupA_fertilized","groupB_fertilized"), c("groupA_unfertilized","groupB_unfertilized")), type = "normal")
1) Does this give me the shrunk lfc between fertilized and unfertilized averaged over condition? 2) Would it be better to scrap this and use two designs: one "full" design for main effects, and one "grouped" for interactions? I started using this "group" method based on the ?results help and other message board questions but I couldn't get a sense of if it could/should be used for main effects as well as the interactions.