DESeq2 two conditions with interaction
1
0
Entering edit mode
mboeck • 0
@92ad9ad8
Last seen 27 days ago
United States

I am looking more for clarification about how DESeq2 handles multiple conditions/genotypes. We are interested in looking at a WT/Mut with treatment based on the analysis for two comparisons, two genotypes with interaction outline here. Our data is WT:Treat, WT:NoTreat, Mut:Treat, Mut:NoTreat. I want to know what genes are upregulated/important for each of the different versions of our experiment; Mut, WT, Treat, NoTreat, but also what is different based off the interactions (do the genes upregulated in the treatment change in the mutant compared to WT). Can DESeq2 handle this type of question and is the following code how we should approach this? Does DESeq2 account for the condition or genotype when making the reciprocal comparison?

I am not doing a great job explaining this, but I really want to be able to confidently say that when I compare our mutant to WT the treatment alters X number of genes differently than when looking at just WT and all permutations within these (WT vs Mut NO treatment and also Treatment vs no Treatment Mut etc.).


dds <- DESeqDataSetFromMatrix(as.data.frame(rawdata),
                              as.data.frame(design_deseq),
                              ~ genotype + condition + genotype:condition)

res = results(dds, contrast=c("condition","Geno1","Geno2"))

res = results(dds, contrast=c("genotype","Cond1","Cond2"))
DESeq2 • 142 views
ADD COMMENT
1
Entering edit mode
res = results(dds, contrast=c("condition","Geno1","Geno2"))

Umm, what?

Don't you mean

res = results(dds, contrast=c("genotype","Geno1","Geno2"))

Note that this results call, combined with a your design with an interaction term, does not compare all the Geno1 to Geno2 samples. It only compares the Geno1 WT to Geno2 WT (assuming WT is set as your reference for condition)

ADD REPLY
2
Entering edit mode
@kevin
Last seen 3 hours ago
United States

Our data is WT:Treat, WT:NoTreat, Mut:Treat, Mut:NoTreat. I want to know what genes are upregulated/important for each of the different versions of our experiment; Mut, WT, Treat, NoTreat

Hi, you may need to explain this, specifically what is meant by "each of the different versions" - you mean you want to find genes uniquely expressed in, e.g., Mut? This cannot really be addressed via differential expression comparisons. You may want to instead go the route of transforming the dataset to Z-scores.



Regarding the interaction, have you checked the examples accessible via ?DESeq2::results?

 ## Example 2: two conditions, two genotypes, with an interaction term

 dds <- makeExampleDESeqDataSet(n=100,m=12)
 dds$genotype <- factor(rep(rep(c("I","II"),each=3),2))

 design(dds) <- ~ genotype + condition + genotype:condition
 dds <- DESeq(dds) 
 resultsNames(dds)

 # the condition effect for genotype I (the main effect)
 results(dds, contrast=c("condition","B","A"))

 # the condition effect for genotype II
 # this is, by definition, the main effect *plus* the interaction term
 # (the extra condition effect in genotype II compared to genotype I).
 results(dds, list( c("condition_B_vs_A","genotypeII.conditionB") ))

 # the interaction term, answering: is the condition effect *different* across genotypes?
 results(dds, name="genotypeII.conditionB")
ADD COMMENT
0
Entering edit mode

Thank you for responding. Yes, I am trying to see which genes are uniquely altered in response to either treatment OR mutation while perhaps controlling for the other variable. This is partially because our initial attempt to do 1-to-1 comparison (Mut:Treat vs WT:Treat, Mut:Treat vs Mut:NoTreat etc.) using DESeq2 showed MANY genes changed due to treatment and few due to mutation. This led us to want to try a more sophisticated analysis that potentially controlled for the different magnitude of affects. I think your example answers some of my question of WHAT the different results are spitting out in regards to the different conditions.

Following up on your z-score idea, are you suggesting converting genes to z-score and then performing DESeq analysis or is there a better/different method than DESeq you are thinking of?

ADD REPLY
1
Entering edit mode

Well, any standard differential expression test is not testing for 'uniqueness' [of expression]. Also, by introducing more complex design models, i.e., attempting to adjust for various known | unknown effects, I feel that there exists a risk of 'overfitting' and making false interpretations on the data, particularly if there was no statistical power to start with (that is, you would need a very large study cohort).

How can we even define what is uniquely expressed? The idea of transforming your data to Z-scores is a very simplistic way to attempt to infer 'uniqueness'. You would normalise the data as standard via DESeq2, transform via vst(), and then transform further to Z-scores. On the Z scale, 1.96 is equivalent to p=0.05 (on a two-tailed distribution). So, you could obtain the group mean Z-score and then infer what is expressed | not expressed in this way.

Either way, we have somewhat gone beyond the scope of this forum, which is primarily for technical issues relating to Bioconductor packages.

ADD REPLY

Login before adding your answer.

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