scAI icon indicating copy to clipboard operation
scAI copied to clipboard

lmHeatmap: node stack overflow

Open f6v opened this issue 5 years ago • 5 comments

I'm trying to run the example with the simulated data, and I've got a failure on the following line:

lmHeatmap(scAI_outs, color.by = "labels")

Error in is.leaf(dend) : node stack overflow Error during wrapup: node stack overflow Error: no more error handlers available (recursive errors?); invoking 'abort' restart

Quick search led me to trying the following: options(expression = 1000000), though the result was the same. Have you seen this issue before?

I'm running R 4.0.2 on macOS.

Thanks in advance!

f6v avatar Oct 11 '20 14:10 f6v

Hi @f6v , I am sorry that I have not encounter such issue before. I have not upgraded my R version to 4.0. There might be some conflicts with R version or the ComplexHeatmap package.

sqjin avatar Oct 12 '20 00:10 sqjin

Thanks, I guess the issue arises from https://github.com/jokergoo/ComplexHeatmap/issues/539

f6v avatar Oct 12 '20 09:10 f6v

Yes, that was a bug in ComplexHeatmap and a little difficult to fix. Can you add tiny noise to the matrix e.g.

scAI_outs = scAI_outs + runif(length(scAI_outs), min = -0.5, max = 0.5)*1e-5

jokergoo avatar Oct 19 '20 10:10 jokergoo

Thanks @jokergoo !! I just added a tiny noise to the matrix @f6v

sqjin avatar Oct 20 '20 00:10 sqjin

Hi, I think I have fixed this bug. The problem was when there are too many identical rows or columns, the dendrogram will be very deep, which causes the recursive function which was used in ComplexHeatmap to generate too many stack calls. Now I have changed the recursive implementation with iterations and I think there should be no such error any more.

You can just update the version from Github if you want to use it now. I will do more testing and then I will push to bioconductor in the next few days.

jokergoo avatar Oct 20 '20 07:10 jokergoo