sqjin / scAI

An unsupervised approach for the integrative analysis of single-cell multi-omics data
GNU General Public License v3.0
29 stars 8 forks source link

lmHeatmap: node stack overflow #12

Open f6v opened 4 years ago

f6v commented 4 years ago

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!

sqjin commented 4 years ago

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.

f6v commented 4 years ago

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

jokergoo commented 4 years ago

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
sqjin commented 4 years ago

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

jokergoo commented 4 years ago

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.