RausellLab / CelliD

Gene signature extraction and cell-identity recognition at individual cell level from single-cell RNA-seq.
GNU General Public License v3.0
83 stars 19 forks source link

RunMCA() error for large cell numbers #10

Open qianzhengzong opened 3 years ago

qianzhengzong commented 3 years ago

hi, I really appreciate your efforts for applying MCA and HGT to Single-Cell Data, but when i use RunMCA() funciton to Seurat object with more than 70000 cells, it come up with error like this:

Error in asMethod(object) : Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 102 Calls: RunMCA ... RunMCA.Seurat -> as.matrix -> as.matrix -> as -> asMethod

Is this an error of CellID or other package CellID based on? Is their a limit of max cell numbers for using CellID? many thanks!

YukuanHuang commented 2 years ago

Hi, I have met the same error when I use RunMCA(). I made a few dirty modifications to reimplement the RunMCA() function and avoid using "as.matrix".The reimplemented RunMCA.dgCMatrix() can barely use to my Seurat object with > 500,000 cells, although it takes a lot of time and memory. If you are interested in my implementation, see https://github.com/YukuanHuang/CelliD However, I guess that there is a more elegant way to support for a large number of cells.

AlexandrePelletier commented 5 months ago

Hi, I have the same issue with ~150k cells, with this error:

Computing Fuzzy Matrix
Error: Mat::init(): requested size is too large; suggest to enable ARMA_64BIT_WORD
In addition: Warning message:
In asMethod(object) :
  sparse->dense coercion: allocating vector of size 35.9 GiB

Is there a way to optimized this function ? (e.g run through dgCMatrix instead of full matrix) ? I'm not sure what means the suggestion but maybe can help. Thanks!