DESeq 2x3 design contrast question
0
0
Entering edit mode
3.6 years ago
Mir • 0

Hi!

So I'm basically asking the same question as [this post][1], but have a slightly more complex design and want to make sure I'm setting up the proper contrasts.

I have samples from two different genotypes (B6 & TCR) reared in 3 stress conditions (no stress, NS; single hit, SH; double hit, DH). I am interested in the main effect of genotype, the main effect of stress, and the interaction between the two and so have coded my design like so: ~ genotype+ DoubleHit+ Genotype:DoubleHit.

I understand that retrieving results as follows:

res = results(dds, name = 'GENOTYPE_TCR_vs_B6')

only gives me the effect of genotype within the reference level of stress. I have already releveled the factor in the metadata such that no stress is the reference level.

I want the main effect of genotype independent of stress and vice versa.

I have resultsNames as follows:

[1] "Intercept"               "GENOTYPE_TCR_vs_B6"      "DoubleHit_SH_vs_NS"     
[4] "DoubleHit_DH_vs_NS"      "GENOTYPETCR.DoubleHitSH" "GENOTYPETCR.DoubleHitDH"

What is the correct way to set up contrasts in the results function to get the desired outcome?

My attempt at getting the main effect of genotype independent of stress:

res = results(dds, contrast=c(0,1,0,0,0.5,0.5))

And vice versa:

res = results(dds, contrast=c(0,0,1,1,0.5,0.5))

If I'm on track or way off base please let me know! Furthermore, how would setting the contrast to 1 for only one stress condition (ex. if I'm only interested in DH vs NS) compare to setting them both to one for interpretation?

Thanks so much in advance!

microbiome DESeq2 differentialAbundance • 552 views
ADD COMMENT

Login before adding your answer.

Traffic: 2082 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6