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

Error: Unable to allocate 932. GiB for an array with shape (353762, 353762) #35

Open
bmill3r opened this issue Jun 16, 2023 · 1 comment

Comments

@bmill3r
Copy link

bmill3r commented Jun 16, 2023

Hello,

First, thanks for this great tool!

I am trying to apply it to a somewhat large single cell resolution vizgen dataset of human lung cancer (Vizgen_Human_LungCancer_Patient1) from the MERSCOPE FFPE Human Immuno-oncology data release. The dataset contains 353762 cells. When I try to run SpatialDE.run()

I receive the following error:
MemoryError: Unable to allocate 932. GiB for an array with shape (353762, 353762) and data type float64.

I think the function is generating a spatial graph of (353762, 353762) and requires 932. GiB of memory, which is way more than what I have available, even on an HPC node. Note that if I subset the data to about 25%, I get a similar same error:
MemoryError: Unable to allocate 64.8 GiB for an array with shape (93270, 93270) and data type float64

Have you come across this error before, and if so, do you have any suggestions to overcome it? Is there some way to read/write and store the data more efficiently so that I can apply SpatialDE to single cell resolution datasets? Squidpy seems to be able to handle datasets of this size, so maybe there is something they do that SpatialDE can also incorporate?

Thanks!
Brendan

@SmallHorseBrother
Copy link

This method is not suitable for situations with large datasets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants