r3fang / SnapATAC

Analysis Pipeline for Single Cell ATAC-seq
GNU General Public License v3.0
296 stars 125 forks source link

[Error: Cholmod error 'problem too large']: when integrating multiple matrix using snapRbind function #244

Open murphchuyi opened 2 years ago

murphchuyi commented 2 years ago

Hi, when I used SnapATAC(v1.0.0) to perform upstream analysis on 2 samples of mine, everything worked fine, and I got a binarized matrix of 19365 * 605083 with bin.size = 5kb. However, when I tried to call addBmatToSnap() function on my integrated snap object which, using the same pipeline and arguments, consisted of 28 samples about 250k cells, I had the following error log:

Loading required package: Matrix
Loading required package: rhdf5
Warning message:
no DISPLAY variable so Tk is not available 
Epoch: reading cell-bin count matrix session ...
Error in .rbind2Csp(x, y) : 
  Cholmod error 'problem too large' at file ../Core/cholmod_sparse.c, line 89
Calls: addBmatToSnap ... rbind -> rbind2 -> rbind2 -> rbind2sparse -> .rbind2Csp
Execution halted

I guessed it's the memory problem, so I set the RAM to 500gb, but it still didn't work. I also tried to run addBmatToSnap() for each sample separately, and then to run snapRbind() to integrate multiple matrices, but the same error appeared.

As the Matrix::rBind function called by snapRbind is defunct in Matrix since v1.3-3, I edit the snapRbind function like this: Error" 'rBind' is defunct. #234.

Any help would be appreciated!

murphchuyi commented 2 years ago

I just find the author's fresh commit about snapatac2... emmm, ok, maybe I 'll try it lately.