Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue with clustering duplicates #298

Closed
bczech opened this issue Oct 30, 2023 · 5 comments
Closed

Performance issue with clustering duplicates #298

bczech opened this issue Oct 30, 2023 · 5 comments
Labels

Comments

@bczech
Copy link

bczech commented Oct 30, 2023

Describe the bug

During clustering of columns of [1, 483] matrix we detected the performance issue: Error: C stack usage 7969316 is too close to the limit.
In our case we used a Bioc-devel docker image with 8 GB of memory.

To Reproduce

data <- structure(c(1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, -0.63721185561396, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.08197242820826, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, -4, -4, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.25412348577246, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, -0.514168290397842, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.26334567055877, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, -0.938041635162273, 
1.30257021196862, 1.42046951549569, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, -0.194594761524711, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.36755834126481, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966, 1.47712125471966, 
1.47712125471966, 1.47712125471966, 1.47712125471966), dim = c(1L, 
483L), dimnames = list(NULL, NULL))

heatmaply::heatmaply(x = data,
                     plot_method = "plotly",
                     Rowv = FALSE,
                     Colv = TRUE)

Expected behavior

Display the heatmap with dendrogram for columns

Screenshots

N/A

Additional context

@bczech bczech added the bug label Oct 30, 2023
@alanocallaghan
Copy link
Collaborator

I think you just need more resources or to increase the C stack limit. It's probably an R/dendrogram issue rather than a heatmaply issue, unless the traceback suggests otherwise

@talgalili
Copy link
Owner

talgalili commented Oct 30, 2023 via email

@bczech
Copy link
Author

bczech commented Jan 31, 2024

The only solution was to manually turn off the dendrogram drawing

@talgalili
Copy link
Owner

talgalili commented Jan 31, 2024 via email

@bczech
Copy link
Author

bczech commented Jan 31, 2024

Yes, we can close this issue for now.

@bczech bczech closed this as completed Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants