Question: DESeq2 : results on combination of several levels of a factor
gravatar for denis
13 months ago by
denis0 wrote:

Dear DESeq2 experts,

I have RNA-Seq data replicated from different genotypes. Let's say for the sake of example

sample   genotype
samp1   A
samp2   A
samp3   B
samp4   B
samp5   C
samp6   C
samp7   D
samp8   D

and so on. I can easily compare each genotype against each other. Now let's say these genotypes have interesting common phenotypes (A and B have phenotype 1 and C and D have phenotype 2) and I want to compare combination of genotypes to find DEG that could explain the phenotypes. After reading DESeq2 vignette, manual, and several posts here and elsewhere, the only way I could think of to achieve this would be to write my condition file as :

sample   phenotype
samp1   1
samp2   1
samp3   1
samp4   1
samp5   2
samp6   2
samp7   2
samp8   2

then run the results function with contrast 2 versus 1. Can someone confirm this is the right and only way of doing it or am I missing something obvious here?

rna-seq deseq2 • 357 views
ADD COMMENTlink modified 13 months ago by swbarnes29.2k • written 13 months ago by denis0
gravatar for swbarnes2
13 months ago by
United States
swbarnes29.2k wrote:

I don't think that's the only way; I bet you can do something cute with lists in the contrast argument to results, but your way is probably the simplest.

ADD COMMENTlink written 13 months ago by swbarnes29.2k

Thanks for your answer. I looked into this way and I used to do something like this by the past:

res = results(dds, contrast = list(c("genotypeD", "genotypeC"), c("genotypeB","genotypeA")))

Only problem is that now it does not work because resultsNames() returns "genotype_D_vs_A", "genotype_C_vs_A" and so on and that's the only names DESeq2 accept with a list as value for the contrast argument

ADD REPLYlink written 13 months ago by denis0

Hi Denis

Have you managed to find a solution? I just ran in the exact same problem and I was wondering if you found a way to overcome this limitation

EDIT: Well minutes after writing this I found the following link where they give a working solution

ADD REPLYlink modified 12 months ago • written 12 months ago by Carles Borreda0
Please log in to add an answer.


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