Obtaining expanded model matrices when using apeglm
1
0
Entering edit mode
@dequattroconcetta-21510
Last seen 2.2 years ago
Italy

Hi! I am performing a differential expression analysis with DESeq2. I built a unique dds dataset and I would like to compare different conditions. In particular I got this combination:

resultsNames(dds)
[1] "Intercept"
[2] "condition_cond1_vs_cond2"
[3] "condition_cond3_vs_cond2"
[4] "condition_cond4_vs_cond2"

Considering that I used the method apeglm to compare cond3 vs cond4 I can not use the option contrast. So, to do this I have done:

dds <- relevel(dds, ref="cond3")
dds <- nbinomWaldTest(dds, betaPrior =TRUE)
res <- lfcshrink(dds, coef=2, type=”apeglm”)

I was wondering if the workflow is correct. In addition considering that with apeglm you can not use contrast function, is there a way to get the symmetric Log2FoldChange, in other words have the same result if I perform cond1 vs cond2 or cond2 vs cond1.

Thank you!

Concetta

deseq2 • 456 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 1 hour ago
United States

betaPrior should be FALSE (TRUE is basically deprecated, but kept for backward compatibility).

Otherwise, this is correct, and what we recommend from the vignette.

We have abandoned the expanded model matrix approach for apeglm and lfcShrink, as it was difficult for users to interpret (it was really a big cause of confusion on the support site while it was the default method for shrinkage). So we don't have any support for the symmetric approach now.

ADD COMMENT

Login before adding your answer.

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