MarcElosua / SPOTlight

Spatial Transcriptomics Capture Location Deconvolution
https://marcelosua.github.io/SPOTlight
GNU General Public License v3.0
159 stars 24 forks source link

Problem on spotlight_deconvolution(old version) #73

Closed tewengtong closed 1 year ago

tewengtong commented 2 years ago

Hi, I'm using the old version of spotlight, and when I analyzed some large spatial data (rds size ≈2.5G) and scRNA-seq data (rds size ≈2G) through computer cluster, I received the error like this:

Error in asMethod(object) : Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 102 Calls: spotlight_deconvolution ... is.data.frame -> as.matrix -> as.matrix.Matrix -> as -> asMethod Execution halted

No matter how large Memory size I gave, this error still existed, so do you have any good ideas on how to solve this problem?

MarcElosua commented 2 years ago

Hi @tewengtong thank you so much for your interest in SPOTlight.

I think the issue you're facing is because as currently written SPOTlight requires the use of dense matrices. These can get very large very quickly and skyrocket the memory requirements. I would suggest 2 things I believe could help: i) subset you scRNAseq dataset to 100 cells/cell type in another script and only load this subset in the script where you carry out the deconvolution. ii) Try to strip as much information as you can from the spatial data object - ideally keeping only the raw count matrix.

We are currently working on making SPOTlight compatible with sparse matrices but in the meantime, hope this helps you with your analysis! Marc