monocle-release icon indicating copy to clipboard operation
monocle-release copied to clipboard

estimateDispersions warning message when using data imported from Seurat v3

Open benjytan88 opened this issue 5 years ago • 9 comments

Hi. I am using Seurat v3 for my analysis and I imported the data manually into Monocle as per the instructions here: https://github.com/cole-trapnell-lab/monocle-release/issues/262#issuecomment-465749521

However, when I run the estimateDispersions function, I received a warning message as shown below:

NaNs produced step size truncated due to divergence glm.fit: algorithm did not converge Dispersion fit did not converge.Removing 10 outliers

The data looks OK as I was able to run the next steps but I am not sure what this warning message is trying to inform me. Is there anything faulty with my data? Anyone face this problem before and can you explain it to me?

benjytan88 avatar Mar 14 '19 04:03 benjytan88

Hello, I ran into a similar error after importing my Seurat v3 object using the instructions at #262 .

Warning message in log(ifelse(y == 0, 1, y/mu)): “NaNs produced”Warning message: “step size truncated due to divergence”Removing 110 outliers

I was wondering if you ran into any issues with the differentialGeneTest() method.

mragsac avatar Mar 19 '19 21:03 mragsac

I am also experiencing this issue. Any insights would be greatly appreciated!

roosheelpatel avatar Apr 18 '19 18:04 roosheelpatel

Hi! did someone solve this issue already by any chance?? Running into the same problem..

Sandradehaan avatar Oct 17 '19 23:10 Sandradehaan

Me too, i've the same issue when loading "raw data" (counts) slot. By using the "data" slot i don't have any problem.

mb84 avatar Oct 24 '19 10:10 mb84

I am also having this issue, anyone knows how to solve it?

Sandradehaan avatar Mar 02 '20 12:03 Sandradehaan

I had the same problem and got a fix.

You need to add a model to fit for dispersion estimation:

HSMM<-estimateDispersions(HSMM, modelFormulaStr=“~Condition”)

Default model is “~1”

Rvirgenslane avatar May 27 '20 22:05 Rvirgenslane

Getting same error:

“glm.fit: algorithm did not converge”Warning message in parametricDispersionFit(disp_table, verbose):
“Dispersion fit did not converge.”Removing 177 outliers
Warning message in log(ifelse(y == 0, 1, y/mu)):
“NaNs produced”Warning message:
“step size truncated due to divergence”Warning message in log(ifelse(y == 0, 1, y/mu))

Not sure Rvirgenslane answer solves the problem if you want to calculate Dispersions not by specified variable.

Bernadetadad avatar Jul 12 '20 18:07 Bernadetadad

I had the same problem and got a fix. When you create the CDS_object, You can't use sparse matrix. Use as.matrix()like the following:

my_cds <- newCellDataSet(as.matrix(gbm), phenoData = new("AnnotatedDataFrame", data = pd), featureData = new("AnnotatedDataFrame", data =fd), lowerDetectionLimit = 0.1 ) my_cds <- estimateSizeFactors(my_cds) my_cds <- estimateDispersions(my_cds,cores=32)

penglbio avatar Jul 16 '20 00:07 penglbio

hello,I had a problem like this: cds <- estimateDispersions(cds) Removing 17 outliers There were 50 or more warnings (use warnings() to see the first 50) anyone knows how to solve it?

lisahnglai avatar Aug 08 '22 07:08 lisahnglai