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

The process of 'Spatial Clustering of Local Spots' using SpatialDE is taking an excessive amount of time. Could I have overlooked some parameters? #29

Open
ABU-TO opened this issue Jan 8, 2024 · 2 comments

Comments

@ABU-TO
Copy link

ABU-TO commented Jan 8, 2024

I ran the 'Spatial Clustering of Local Spots' step using the following code:

from threadpoolctl import threadpool_limits
with threadpool_limits(limits=10, user_api='blas'):
    results = SpatialDE.run(adata.obsm['spatial'], bin_spots.transpose())
    histology_results, patterns = SpatialDE.aeh.spatial_patterns(
        adata.obsm['spatial'], bin_spots.transpose(), results, C=3, l=3, verbosity=1)

For 7,000 spots, it took approximately 4 hours. However, for 30,000 spots, it has been running for more than 48 hours and hasn't finished yet. Does anyone have insights into why it takes so long, or did I miss some parameters?

@jackywangtj66
Copy link
Collaborator

Thank you for raising the question.
Yes, indeed, it takes so long. That's because we directly use the SpatialDE method, and it does some matrix operation straightforward. When the dimension goes higher, it will require significantly more computation.
Maybe we will make update later on this part if we figure out some ways to increase the scalability.

@Rafael-Silva-Oliveira
Copy link

Rafael-Silva-Oliveira commented Apr 12, 2024

@jackywangtj66 I wonder if an update could be made to use VisiumHD? Visium works fine, but still quite slow. Now with VisiumHD we can get from 100k to 650k + barcodes (spots) since they're now 2 micron instead of the old 55 micron so SpatialDM is pretty much unusable with VisiumHD data at this stage (keeps throwing memory issues, etc)

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

3 participants