How to handle the change in resultsNames() for DESeq2 ?
1
0
Entering edit mode
Ira ▴ 10
@ira-10794
Last seen 12 months ago

Hi,

I used DESeq2 about 4 months back to analyse my data with the design:

design=~species+condition+species:condition

with species A & B and condition 1 -5.

It gave resultsNames(dds) as:

"Intercept", "speciesA", "speciesB", "condition1"..."condition5", "speciesA.condition1"..."speciesB.condition5"

I used this to find various comparisons such as interaction effect of species and effect of any one condition against all others:

res_cond2=results(dds,contrast=list("condition2",c("condition1","condition3","condition4","conditon5")),listValues=c(1,-1/4))

However, when I use DESeq2 now (yesterday) with the same design & dataset, I get different resultsNames(dds):

"Intercept", "species_B_vs_A","condition_2_vs_1"..."condition_5_vs_1","speciesB.condition2"..."speciesB.condition5"

I have read the vignette help and understand these terms and that I can get different comparisons by releveling the reference factor. But I don't know how to get the data I could from the previous terms such as the comparison of one condition against groups of other conditions.

I think that this has to do with a change in the version of DESeq2 and someone updated the lab computer. Unfortunately I had not saved the sessionInfo() previously and don't know which version I had used. I would be grateful for any help regarding how I can get this information from these new terms, or even if I can go back to the old version with the previous terms since I am more familiar with them.

The current version I'm using is R version (3.2.3) and DESeq2_1.10.1 

Thanks!

deseq2 resultsnames multifactorial design • 1.3k views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 1 day ago
United States

hi Ira,

Yes, we make a note of this change in the NEWS file for version 1.10:

    o When the design contains an interaction, DESeq() will use
      betaPrior=FALSE. This makes coefficients easier to interpret.

I made the change because I decided that using standard coefficients for interaction models would be much easier for interpretation. Many users were either having difficulty formulating contrasts, or thought that the terms represented comparisons that they did not.

Can you tell me what specific comparisons you are interested in making, and I can give recommendations how to set things up?

ADD COMMENT
1
Entering edit mode

Thanks Michael for the quick response - indeed, the interaction terms are easier to understand in the new version.

Simply setting betaPrior=TRUE would result in the older expanded matrix full terms?

Would be grateful if you can suggest how to make the following comparisons using the current version:

1. Check the effect of condition2 compared to the average of the other 4 conditions controlling for species, so that I can see the DE genes unique for condition 2. I guess what I need is the equivalent of the old version's :

cond2=results(dds,contrast=list("condition2",c("condition1","condition3","condition4","conditon5")),listValues=c(1,-1/4))

2. Similarly, can I find the effect of any condition as compared to the intercept?

3. Check the comparison of condition2 over condition4 across all species?  i.e 

res = results(dds, contrast=list("condition2", "condition4"))

Thanks.

ADD REPLY
1
Entering edit mode

You can combine condition and species into a single factor (see vignette for code on how to do this).

Then you could easily obtain condition contrasts for each species or, averaging the contrast across species.

E.g. if you had 3 conditions and two species, you could define a new variable "cond" which combines condition and species. Then for the condition 3 vs 1,2 contrast for species A:

results(dds,
contrast=list("condA3", c("condA1","condA2")),
listValues=c(1, -1/2))

For the average condition 3 vs 1,2 contrast across species A and species B:

results(dds,
contrast=list(c("condA3","condB3"), c("condA1","condA2","condB1","condB2"))
listValues=c(1/2, -1/4))

 

ADD REPLY
0
Entering edit mode

Thanks a lot Micheal ! :)

ADD REPLY

Login before adding your answer.

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