Search
Question: DESeq2 : how to make model contrast with multifactors : cond1(env1 versus env2) versus cond2(env1 versus env2) ?
0
gravatar for samuel.quentin
8 days ago by
samuel.quentin0 wrote:

Hi,

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

>resultsNames(dds)

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

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

>res

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,

Sam

 

ADD COMMENTlink modified 6 days ago by Michael Love15k • written 8 days ago by samuel.quentin0
0
gravatar for Michael Love
6 days ago by
Michael Love15k
United States
Michael Love15k wrote:

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

https://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#interactions

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)

 

ADD COMMENTlink written 6 days ago by Michael Love15k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 307 users visited in the last hour