thelovelab / DESeq2

Differential expression of RNA-seq data using the Negative Binomial
https://bioconductor.org/packages/DESeq2
355 stars 90 forks source link

maxit parameter cannot be changed in DESeq function #3

Closed nalcala closed 6 years ago

nalcala commented 6 years ago

Hi,

When launching the DESeq function, I get the following warning:

25 rows did not converge in beta, labelled in mcols(object)$betaConv. Use larger maxit argument with nbinomWaldTest

Nevertheless, there is no way to specify the maxit argument to the DESeq function so it can pass it along to nbinomWaldTest. Could this feature be added?

Thanks in advance!

Nicolas

mikelove commented 6 years ago

hi Nicolas,

You can just instead run nbinomWaldTest() directly after and this is equivalent to re-running DESeq() with more iterations. You can also substitute DESeq() from the beginning with the equivalent code:

dds <- estimateSizeFactors(dds)
dds <- estimateDispersions(dds)
dds <- nbinomWaldTest(dds)

For further questions please post to https://support.bioconductor.org

nalcala commented 6 years ago

Hi Mike,

Thanks for the prompt answer. Yes, this will solve the issue. Nevertheless, I still think that adding maxit as a parameter would be beneficial to the users, unless you want to drop the function DESeq in the future.

Best,

Nicolas

mikelove commented 6 years ago

Noted.

gabrielet commented 1 year ago

i have a follow up question, regarding the set up of the maxit parameter. what if, when using the methodology outlined above i am unable to reach convergence using a maxit=10000000? I thought I may increase the betaTol threshold, i.e. from the default 1e-8 to 1e-7 but I am unsure about how this parameter is influencing the computation and how reliable the estimates may be after the tweak. any hints on this?

mikelove commented 1 year ago

Usually this occurs when the model is not a good match to the data. When running DESeq2 on typical bulk RNA-seq it converges with a few iterations, e.g. often <10 or so. What kind of data do you have?

gabrielet commented 1 year ago

yep, i am not analysing RNA-seq data. i am using DESeq2 to run some differential abundance on bacterial amplicon data, i.e. ASVs matrix, so apparently that is the problem.

mikelove commented 1 year ago

Yeah, i'm skeptical of the applicability of DESeq2 here.

gabrielet commented 1 year ago

yes, I read some papers stating that DESeq2 is not a good fit for such data but I wanted to try it out in combination with other tools. however, if you say it's really not a good idea, then i will stick to other methods that are explicitly made for this purpose. thank you very much for your time!