ArchR icon indicating copy to clipboard operation
ArchR copied to clipboard

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

Open YiweiNiu opened this issue 1 year ago • 1 comments
trafficstars

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!

YiweiNiu avatar Jul 12 '24 10:07 YiweiNiu