Search
Question: Multiple differential expression analyses with DESeq2
0
gravatar for jonas
9 months ago by
jonas0
jonas0 wrote:

I have a RNA-Seq dataset and want to test differential gene expression with DESeq2 for just some of the genes but for many different phenotypes. Now I have 3 questions:

  1. I have to give DESeq all the genes and then only subset the results to the genes of interest, correct?
  2. The most time-consuming step seems to be the dispersion estimation. Is this dependent on the design matrix, i.e. the phenotype? Or is there a way to correct for dispersion once and then perform the differential expression test for multiple phenotypes on the same normalized dataset?
  3. If 2 is possible: Can I do the testing for only some of the genes after I normalised the dataset with all the genes?
ADD COMMENTlink modified 8 months ago by Michael Love19k • written 9 months ago by jonas0
2
gravatar for Michael Love
8 months ago by
Michael Love19k
United States
Michael Love19k wrote:

1) yes 2) do you mean comparing groups? Take a look at the ‘contrast’ argument in this help file:

?results

3) if you have prespecifed the genes before you look at the data, then yes you could recompute BH adjustment just on your genes of interest, but peeking at the data first and then choosing the set of genes will lead to inflation of false positives.

ADD COMMENTlink written 8 months ago by Michael Love19k

2) no I mean actually different phenotypes, i.e. different variables each of them with 2 groups. Could I normalise like with this:

dds <- DESeqDataSetFromMatrix(countData = mycounts, colData = mycoldata, design = ~1) 
dds  <- estimateSizeFactors(dds)
dds  <- estimateDispersions(dds)

And then do the tests for each phenotype with

for(p in phenos)
design(dds) = as.formula(~pheno)
## only test genes of interest
dds2 = dds[genes.of.interest, ]
res  <- nbinomWaldTest(dds2)
##save results here
}

3) yes, I know, I actually have only few genes of interest. But if I subset the genes after the normalisation and before the differential expression test like this?

dd  <- estimateSizeFactors(dd)
dd  <- estimateDispersions(dd)
dd  <- dd[genes.of.interest, ]
dd  <- nbinomWaldTest(dd)   
ADD REPLYlink written 8 months ago by jonas0

No you can't change the design after calculating dispersion. The dispersion only make sense relative to a certain design.

Imagine, if you set ~1, and you have a gene with DE across two groups of samples. You will get a high dispersion estimate, because the design doesn't allow for different mean counts for the two groups. Then you switch to ~condition, you would get a lower dispersion estimate.

Yes, you can subset before differential expression testing.

ADD REPLYlink written 8 months ago by Michael Love19k

ok, thanks!

ADD REPLYlink written 8 months ago by jonas0
Please log in to add an answer.

Help
Access

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