stack overflow error when using the `plot_dendro_and_colors` function
JCanales810 opened this issue · 3 comments
Hello BioNERO Team,
I encountered a stack overflow error when using the plot_dendro_and_colors
function. This error occur when processing an small dataset for dendrogram plotting and color mapping.
Hi, @JCanales810
Thank you for opening this issue and for using BioNERO.
I've recently rewritten all the graphical functions in BioNERO so that they all use the ggplot2 system, not the base R system. For plot_dendro_and_colors()
, BioNERO now uses the {ggdendro} package to convert a dendrogram to a data frame, so it can be plotted with ggplot2. It turns out that {ggdendro} had this "node stack overflow" when there were too many identical branches in the dendrogram.
This problem seems to have been fixed in the latest version of {ggdendro} (see andrie/ggdendro#27). Could you try to update your version of the {ggdendro} package and check if the problem is gone? You can do that with:
remotes::install_github("andrie/ggdendro")
Best,
Fabricio
Hi @almeidasilvaf,
Thank you for your prompt and insightful response regarding the issue with plot_dendro_and_colors() in BioNERO. I appreciate your efforts in transitioning the graphical functions to utilize the ggplot2 system, enhancing the functionality and user experience.
Following your advice, I updated the {ggdendro} package using the method you suggested. I am pleased to report that this resolved the "node stack overflow" issue effectively. The dendrogram now renders correctly without any errors, demonstrating the efficacy of the latest {ggdendro} update in handling dendrograms with numerous identical branches.
Your assistance in this matter has been invaluable, and I am grateful for your dedication to improving BioNERO. This experience has not only resolved the immediate issue but also provided me with deeper insights into the workings of BioNERO and the underlying packages.
Warm regards,
Javier
Great to know that it worked! 🎉
I'll close the issue, then.