DESeq2 - lfcShrink with list contrast on grouped variable
1
0
Entering edit mode
gcagle1 • 0
@gcagle1-18531
Last seen 5.3 years ago

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.

Thank you!!

deseq2 • 1.4k views
ADD COMMENT
1
Entering edit mode
@mikelove
Last seen 3 hours ago
United States

If the coefficients are difficult to interpret, you might be better off running ~group for the main effects and the interaction model to test the interaction term. There's nothing wrong with that.

lfcShrink doesn't have listValues, because users don't often want to average effects. But you could multiply what you have by 1/2 to get the shrunken average effect.

ADD COMMENT

Login before adding your answer.

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