Entering edit mode
Is it possible to compare one group with the mean of two others if betaPrior=FALSE? In previous versions of DESeq2, I could group C vs A+B using a list below, but I'm not sure how to work with the new resultsNames output like trt_B_vs_A.
dds <- makeExampleDESeqDataSet(n=1000, m=18) dds$trt <- factor(rep(c("A","B","C"),each=6)) design(dds) <- ~ trt dds <- DESeq(dds, betaPrior = TRUE) resultsNames(dds) [1] "Intercept" "trtA" "trtB" "trtC" res <- results(dds, contrast = list("trtC", c("trtA","trtB")), listValues=c(1, -1/2)) dds <- DESeq(dds) resultsNames(dds) [1] "Intercept" "trt_B_vs_A" "trt_C_vs_A"
Thanks, I remember reading that you should not use ~0 + trt, but that must be when betaPrior=TRUE
Yeah, DESeq2 will actually stop you from using ~0 + trt when betaPrior=TRUE
Is there any way to shrink fold changes if you use ~0 + trt? With betaPrior = FALSE, I get the same error at a later step running
lfcShrink(dds, contrast= c("trt", "C", "A"))
The easiest way to get this would be to use betaPrior=TRUE. This will always be supported. Or you can build the results table and then pass res to lfcShrink with type=“ashr”.