Question: Usage of interactions for multi-factor analysis
gravatar for lihongfei93
6 weeks ago by
lihongfei930 wrote:

Hello, I am working on RNASEQ data with 4 treatments(Control, ABA, salt,sorbitol), 3 genotypes(col.0, lbd16-1, ds2.3) and three replicates. To test differently expressed genes of treated/untreated effect between lbd16 and col.0, I wrote my script like this:

dds <- DESeqDataSetFromMatrix(countdata, colData, design= ~ genotype + treatment + genotype:treatment)
dds$treatment <- relevel(dds$treatment , "Control")
dds$genotype <- relevel(dds$genotype , "Col.0")

keep <- rowSums(counts(dds)) >= 1
dds_F <- dds[keep,]

dds2 <- DESeq(dds_F)
dds2$group <- factor(paste0(dds2$genotype, dds2$treatment))
design(dds2) <- ~ group

[1] "Intercept"                         "genotype_ds2.3_vs_Col.0"           "genotype_lbd16.1_vs_Col.0"        
 [4] "treatment_ABA_vs_Control"          "treatment_NaCl_vs_Control"         "treatment_sorbitol_vs_Control"    
 [7] "genotypeds2.3.treatmentABA"        "genotypelbd16.1.treatmentABA"      "genotypeds2.3.treatmentNaCl"      
[10] "genotypelbd16.1.treatmentNaCl"     "genotypeds2.3.treatmentsorbitol"   "genotypelbd16.1.treatmentsorbitol".

My question is:

  1. Is it the right script to find DEGs among treaments and genotypes?
  2. will res<-results(dds2, contrast=list( c("treatment_ABA_vs_Control","genotypeds2.3.treatmentABA"))) give me the result that differently expressed genes of ABAvscontrol between ds2.3 and col.0. If not, what would be the right one?
  3. If I just want to see DEGs of ABAvscontrol of Col0, is this right? results(dds, contrast=c("treatment","ABA","Control"))
  4. If I just want to see DEGs of ABAvscontrol of lbd16, is this right? results(dds, name="genotypelbd16.1.treatmentABA")
deseq2 • 90 views
ADD COMMENTlink modified 6 weeks ago by Michael Love23k • written 6 weeks ago by lihongfei930
Answer: Usage of interactions for multi-factor analysis
gravatar for Michael Love
6 weeks ago by
Michael Love23k
United States
Michael Love23k wrote:

Take a look first at the vignette section on interactions.

2) for this you would use the interaction term genotypeds2.3.treatmentABA. This is the difference in treatment effect btwn ds2.3 and the reference genotype (col.0). The interaction terms give these differences in treatment effects that you are interested in.

3) In an interaction model with three genotypes, you have three effects of treatment. There isn't a general treatment effect, there is the effect in the reference genotype, and the other two.

4) To obtain the treatment effect in a non-reference genotype (not the difference among genotypes) you would use the list(c("...","...")) paradigm, adding the main effect and the interaction term. See the vignette section on interactions for a better idea on this.

ADD COMMENTlink written 6 weeks ago by Michael Love23k

Thanks for your reply. I am not sure if I understand correctly.

So if aiming to answer treatment effect (e.g ABA treatment) between(not separately) genotype ds2.3 and reference genotype, using results(dds, name="genotypeds2.3.treatmentABA") is the right way. For treatment effect in a non-reference genotype, results(dds, list( c("treatmentABAvs_Control","genotypeds2.3.treatmentABA") )) will answer it.

ADD REPLYlink written 5 weeks ago by lihongfei930
Please log in to add an answer.


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