GreenleafLab / ArchR

ArchR : Analysis of Regulatory Chromatin in R (www.ArchRProject.com)
MIT License
387 stars 140 forks source link

getMatrixFromProject error: p[length(p)] cannot exceed 2^31-1 #2187

Open YiweiNiu opened 4 months ago

YiweiNiu commented 4 months ago

Hi,

I would like to get the peak x cell matrix using getMatrixFromProject. There are over 200k cells here. I tried to google this and learned that it's related to the memory limit of R. But I wonder if you know a workaround for this, or if all I can do is downsampling?

> proj_PeakMatrix <- getMatrixFromProject(
+   ArchRProj = proj,
+   useMatrix = "PeakMatrix",
+ )
ArchR logging to : ArchRLogs/ArchR-getMatrixFromProject-b5665a55581-Date-2024-07-12_Time-12-11-36.331077.log
If there is an issue, please report to github with logFile!
2024-07-12 12:16:06.346852 : Organizing colData, 4.5 mins elapsed.
2024-07-12 12:16:08.768331 : Organizing rowData, 4.541 mins elapsed.
2024-07-12 12:16:08.837847 : Organizing rowRanges, 4.542 mins elapsed.
2024-07-12 12:16:08.928274 : Organizing Assays (1 of 1), 4.543 mins elapsed.
Error in cbind.Matrix(x, y, deparse.level = 0L) : 
  p[length(p)] cannot exceed 2^31-1
13: (function () 
    traceback(2))() at bind2.R#56
12: cbind.Matrix(x, y, deparse.level = 0L) at bind2.R#65
11: cbind2(argl[[i]], r)
10: cbind2(argl[[i]], r)
9: cbind(deparse.level, ...)
8: f(init, x[[i]])
7: Reduce("cbind", .)
6: lapply(seq_along(seL), function(j) {
       assays(seL[[j]])[[nAssays[i]]]
   }) %>% Reduce("cbind", .)
5: FUN(X[[i]], ...)
4: lapply(seq_along(nAssays), function(i) {
       .logDiffTime(sprintf("Organizing Assays (%s of %s)", i, length(nAssays)), 
           t1 = tstart, verbose = verbose, logFile = logFile)
       m <- lapply(seq_along(seL), function(j) {
           assays(seL[[j]])[[nAssays[i]]]
       }) %>% Reduce("cbind", .)
       m
   }) at SimpleList-class.R#95
3: SimpleList(.)
2: lapply(seq_along(nAssays), function(i) {
       .logDiffTime(sprintf("Organizing Assays (%s of %s)", i, length(nAssays)), 
           t1 = tstart, verbose = verbose, logFile = logFile)
       m <- lapply(seq_along(seL), function(j) {
           assays(seL[[j]])[[nAssays[i]]]
       }) %>% Reduce("cbind", .)
       m
   }) %>% SimpleList()
1: getMatrixFromProject(ArchRProj = proj, useMatrix = "PeakMatrix", 
       )

Thanks in advance!

rcorces commented 4 months ago

Hi @YiweiNiu! Thanks for using ArchR! Lately, it has been very challenging for me to keep up with maintenance of this package and all of my other responsibilities as a PI. I have not been responding to issue posts and I have not been pushing updates to the software. We are actively searching to hire a computational biologist to continue to develop and maintain ArchR and related tools. If you know someone who might be a good fit, please let us know! In the meantime, your issue will likely go without a reply. Most issues with ArchR right not relate to compatibility. Try reverting to R 4.1 and Bioconductor 3.15. Newer versions of Seurat and Matrix also are causing issues. Sorry for not being able to provide active support for this package at this time.