DESeq2 : how to make model contrast with multifactors : cond1(env1 versus env2) versus cond2(env1 versus env2) ?
Entering edit mode
Last seen 3.7 years ago


I have the following matrix :

  Status Env
Sample1 del env1
Sample2 del env2
Sample3 del env1
Sample4 del env2
Sample5 wt env1
Sample6 wt env2
Sample7 wt env1
Sample8 wt env2


I need to compare : del(env1 versus env2) versus wt(env1 versus env2)

>design(dds) <- ~0+Status:Env


[1] "Envenv1.Statusdel" "Envenv2.Statusdel"  "Envenv1.Statuswt" "Envenv2.Statuswt"

>res <- results(dds,contrast=list(c("Envenv1.Statusdel","Envenv2.Statusdel"),c("Envenv1.Statuswt","Envenv2.Statuswt")))


log2 fold change (MLE): Envenv1.Statusdel+Envenv2.Statusdel vs Envenv1.Statuswt+Envenv2.Statuswt

Wald test p-value: Envenv1.Statusdel+Envenv2.Statusdel vs Envenv1.Statuswt+Envenv2.Statuswt

DataFrame with 21272 rows and 6 columns



Please, how to make contrast model to obtain this comparaison : del(env1 versus env2) versus wt(env1 versus env2) ?

Is it possible ?

Thanks for your help and advices,



deseq2 makecontrasts • 364 views
Entering edit mode
Last seen 4 days ago
United States

"I need to compare : del(env1 versus env2) versus wt(env1 versus env2)"

This can be accomplished with a single interaction term. See this section:

You actually want to add an interaction to the design, so skip the first few paragraphs suggesting to use ~ group.

You can use a design of ~Status + Env + Status:Env, and then either use a Wald test or LRT to test the interaction term. An LRT would look like:

dds <- DESeq(dds, test="LRT", reduced=~Status + Env)
res <- results(dds)



Login before adding your answer.

Traffic: 522 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6