This article talked about various deseq2 designs etc. One of the designs I would like to use is explained as this:

Control versus treatment average


I'm not sure how to incorporate this in deseq2 run which step?

Is it after running this

dds <- DESeq(dds)

Can I call the makeContrasts function?


1 Answer 1


The makeContrasts function is from edgeR so it does not help here. If you want to compare one group vs the average of several others here is a suggestion of how this could be done. It uses a design without intercept so all groups are easily accessable as coefficients in resultsNames(dds):


#/ Example with four groups
dds <- makeExampleDESeqDataSet(m=12)
dds$condition <- factor(as.character(rep(LETTERS[1:4], each=3)))

#/ Use a design without intercept so all four groups are accessable as coefficients
design(dds) <- ~0+condition
dds <- DESeq(dds)
#> estimating size factors
#> estimating dispersions
#> gene-wise dispersion estimates
#> mean-dispersion relationship
#> final dispersion estimates
#> fitting model and testing

#/ results using listValues to get A vs the average ov B,C,D
res <- results(dds, contrast=list(c("conditionA"), c("conditionB", "conditionC", "conditionD")), listValues=c(1, -1/4))

Created on 2022-06-21 by the reprex package (v2.0.1)

Determining whether or not it is appropriate to do this in a particular situation is up to you. You have to know what question you want to answer for your work. I cannot help with that.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.