This is a test version of Biostars. For the public version, visit https://www.biostars.org.
DESeq2 - Warning message

When comparing 13 controls and 32 samples, I get the following warning message in DESeq2. Is there a way to know which row had "a non positive estimates"? ​

dds <- DESeqDataSetFromMatrix(countData = as.matrix(data), colData=samples, design=~condition)
dds <- DESeq(dds, betaPrior=FALSE)estimating size factors
estimating dispersions
gene-wise dispersion estimates
mean-dispersion relationship
final dispersion estimates
fitting model and testing
-- replacing outliers and refitting for 663 genes
-- DESeq argument 'minReplicatesForReplace' = 7 
-- original counts are preserved in counts(dds)
estimating dispersions
fitting model and testing

Warning messages:
1: In fitNbinomGLMs(objectNZ, maxit = maxit, useOptim = useOptim, useQR = useQR,  :
  1rows had non-positive estimates of variance for coefficients
2: In fitNbinomGLMs(objectNZ[fitidx, , drop = FALSE], alpha_hat = alpha_hat[fitidx],  :
  1rows had non-positive estimates of variance for coefficients
deseq2 rna-seq software-error r

1 answer

Hi,

Can you reproduce this bug using the release version (DESeq2 v1.8)? Typically the rows with GLM convergence issues are those with almost all zeros except for a few samples. It is valid to filter out these rows before running DESeq() as they don't have power for detection of differences anyway. For example:

dds <- estimateSizeFactors(dds)
rmeans <- rowMeans(counts(dds, normalized=TRUE))
dds <- dds[rmeans > 1,]

I was unable to reproduce the error, it must have been smth out of my control. Thanks anyway

Hi Michael,

I am running DESeq2 v1.22.2 for a dataset with 30 samples. I have been getting similar warning messages about non-positive estimates of variance for coefficients even after applying the rowMeans cutoff as you suggested above. Would you recommend raising the rowMeans cutoff further until there are no non-positive estimates of variance for coefficients? What effects on downstream analysis will there be if one ignores this warning?

Thank you
Joyce

Log in to answer this question.