DESeq2 lfcShrink warning use ashr method
1
0
Entering edit mode
MatthewP • 0
@matthewp-21562
Last seen 3.8 years ago
China

Hello, my lfcShrink function gives warning I don't understand, post on biostar link.

> resLFC_sh2 <- lfcShrink(dds, contrast=c("Treatment", "Sh2", "Control"), type="ashr")
using 'ashr' for LFC shrinkage. If used in published research, please cite:
    Stephens, M. (2016) False discovery rates: a new deal. Biostatistics, 18:2.
    https://doi.org/10.1093/biostatistics/kxw041
Warning message:
In estimate_mixprop(data, g, prior, optmethod = optmethod, control = control,  :
  Optimization failed to converge. Results may be unreliable. Try increasing maxiter and rerunning.

MA plot

res <- results(dds, contrast=c("Treatment", "Sh2", "Control"))
plotMA(res)

plotMa
Plot link

deseq2 • 2.6k views
ADD COMMENT
0
Entering edit mode

Mike, we directed the user here, as we were unsure about this one. I personally had not seen that warning message before. https://www.biostars.org/p/397274/

ADD REPLY
0
Entering edit mode
@mikelove
Last seen 3 days ago
United States

I added the warning to your post...

Can you post an MA plot of the un-shrunk LFC?

res <- results(dds, contrast=c(...))
plotMA(res, ylim=c(-6,6))
ADD COMMENT
0
Entering edit mode

Ok, added to post now.

ADD REPLY
0
Entering edit mode

It looks like it's not shrinking much, so maybe I'd go with a different method.

You can use:

res <- lfcShrink(dds, coef="treatment_Sh2_vs_Control", type="apeglm")

right?

ADD REPLY
0
Entering edit mode

Yes yes apeglm work.

ADD REPLY
0
Entering edit mode

Hello Michael

I am having a similar problem than that of Matthew, but in my case I was trying to compare several samples on each group.

I have 3 replicates per sample and say 8 unrelated samples, coming from different tissues. Now I want to compare 4 of these samples against the other 4 since they can be grouped in these two groups based on a phenotypic character (but other groupings are also plausible). I'm using the approach given in this link (https://support.bioconductor.org/p/101096/) when they remove the intercept from the design, and I'm having the above error "Optimization failed to converge. Results may be unreliable. Try increasing maxiter and rerunning.".

As I removed the intercept, my resultsNames(dds) now gives a list of the sample names so I can compare, but now using apeglm (and therefore the "coef" parameter) is not suitable since I would not specify a specific comparison conditionAvsB but a sample conditionA.

Should I avoid combining samples the way I did? Is there any major issue in my approach? I've read the DESeq2 vignette but it's mostly guided to the most common cases, which is not my case.

ADD REPLY
0
Entering edit mode

You can use apeglm with nearly any design, you just have to relevel the factor and run nbinomWaldTest() to create the new coefficients. This is a little workaround which works perfectly fine, although an extra step of work for the user.

It's discussed in this section:

http://bioconductor.org/packages/release/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#extended-section-on-shrinkage-estimators

ADD REPLY
0
Entering edit mode

Since I want to do group-wise comparisons grouping samples in different ways, I will define different grouping variables and, for each comparison, set a new design and rerun nbinomWaldTest. I guess it is correct (software-wise, I'm aware that the correctness from a biological point of view is on me). Thank you for your help!

ADD REPLY

Login before adding your answer.

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