Multiple differential expression analyses with DESeq2
1
0
Entering edit mode
jonas • 0
@jonas-14423
Last seen 6.4 years ago

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?
deseq2 differential gene expression • 1.0k views
ADD COMMENT
2
Entering edit mode
@mikelove
Last seen 3 hours ago
United States

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

ok, thanks!

ADD REPLY

Login before adding your answer.

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