-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Hello, and thank you for maintaining this package since it has significantly streamlined my work with large single-cell datasets!
I am reporting an issue encountered while merging 15 scATAC-seq Seurat objects whose count matrices collectively exceed the 2^31 integer index limit. Despite utilizing cbind on BPCells IterableMatrix pointers to try and bypass this, the merging process consistently crashes due to a forced conversion to dgCMatrix.
The crash occurs in the peaks assay construction step, where Seurat/Signac validates the assay counts:
Error in `asMethod()`:
! Error converting IterableMatrix to dgCMatrix
• dgCMatrix objects cannot hold more than 2^31 non-zero entries
• Input matrix has 2722799842 entries
Backtrace:
1. └─SeuratObject::CreateAssayObject(...)
2. ├─SeuratObject::as.sparse(x = counts)
3. └─Seurat:::as.sparse.IterableMatrix(x = counts)
4. └─methods::as(object = x, Class = "dgCMatrix")
5. └─BPCells (local) asMethod(object)
Given that my R core (4.5.0) and Matrix package (1.7.3) are recent, this suggests a method dispatch issue where Seurat's validation logic overrides BPCells's ability to maintain the pointer class. Could you please advise on why the SeuratObject path forces this conversion and if there is a workaround that successfully bypasses this asMethod(…,Class="dgCMatrix") call and helps to fix my Seurat object merging issue?
Thank you for your time and expertise!