DESeq2: difficulty with contrasts and main effects
Entering edit mode
Mir • 0
Last seen 15 months ago


I'm working in an experimental design that consists of two genotypes, B6 and TCR, in four different stress conditions: saline-control, saline-maternal separation, LPS-control, and LPS-maternal separation (SAL_CON, SAL_MS, LPS_CON, LPS_MS, respectively) I'm trying to use DESeq2 to answer the following question: what are the taxa that are affected by genotype, irrespective of which genotype/stress condition we consider? Sort of like the main result of an ANOVA, without the post hoc pairwise comparisons.

My Current model is shown below:

dds = phyloseq_to_deseq2(dat_OBIT_f, ~fGenotype + fP3_P9 + fGenotype:fP3_P9)
dds = DESeq(dds)

I've made the following comparisons:

#main effects
  #genotype: this is within the baseline level SAL_CON
  res_geno = results(dds, list(c("fGenotype_TCR_vs_B6")))
  #stress: this is within the baseline Genotype group (B6)
  res_stress = results(dds, list(c("fP3_P9_LPS_MS_vs_SAL_CON")))

#effect of stress in TCR: main effect plus interaction
  # what is the effect of stress in TCR?
  res_str_TCR = results(dds, list( c("fGenotype_TCR_vs_B6","fGenotypeTCR.fP3_P9LPS_MS") ))

res_int = results(dds, contrast=list(c("fGenotypeTCR.fP3_P9LPS_MS")))

I understand that the first results output will compare genotype groups, but only within the reference level of stress (which I releveled to be saline control)

I also understand that the same goes for the second results() call, but flipped to test for stress differences within the B6 genotype Finally, I tested for the effects of stress within TCR by adding the "main effect" of Genotype plus the interaction.

I'm wondering whether there is some way to control for or ignore the effects of stress while testing for taxonomic differences between genotypes. Again similar to the main effect of an ANOVA prior to posthoc comparison, so not B6 vs TCR within SAL_CON but across all samples.

Thanks so much!

DESeq2 phyloseq contrasts • 729 views
Entering edit mode
Last seen 2 days ago
United States

For guidance on statistical design and interpreting coefficients, I recommend to work with a local statistician or someone familiar with linear models in R. I unfortunately only have sufficient time to answer software related questions on the support site.

Entering edit mode

No worries, I'll repost on biostars! Sorry for the misplaced question

Entering edit mode

Login before adding your answer.

Traffic: 583 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