Question: compare one group to mean of two others in DESeq2 with betaprior=FALSE
0
20 months ago by
Salt Lake City, Utah
Chris Stubben40 wrote:

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"

deseq2 • 417 views
modified 20 months ago by Michael Love25k • written 20 months ago by Chris Stubben40
Answer: compare one group to mean of two others in DESeq2 with betaprior=FALSE
1
20 months ago by
Michael Love25k
United States
Michael Love25k wrote:

You can get the same comparison with ~0 + trt.

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

 Error in designAndArgChecker(object, betaPrior) :
betaPrior=TRUE can only be used if the design has an intercept.
if specifying + 0 in the design formula, use betaPrior=FALSE

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"))