Entering edit mode
25 days ago
Chris
▴
360
Hi Biostar,
I have two large cellchat objects, 16Gb and 21Gb. I try to merge them to run rankNet(). However, I got the error below. Would you please have a suggestion in this case. Thank you so much!
ob.list <- list(Con1 = cellchat_condition1, Con2 = cellchat_condition2)
cellchat <- mergeCellChat(list(Con1 = cellchat_condition1, Con2 = cellchat_condition2), add.names = names(ob.list))
Error in cbind.Matrix(x, y, deparse.level = 0L) :
p[length(p)] cannot exceed 2^31-1
The error suggests you are hitting the vector size limit of R (2^31-1). Additionally, the CellChat repository has been archived, and it will no longer be possible to open a new issue. Take a look at the following issue, which includes a fix for a similar problem.
https://github.com/sqjin/CellChat/issues/348
CellChat is here https://github.com/jinworks/CellChat
Beyond that, I personally found that https://cyrillagger.github.io/scDiffCom/ works with much less of a PITA (at least for me) than CellChat, maybe try that.
Thank you so much for your reply! Very nice paper. May I know what is PITA?
pain in the a**
Hi Arup, thank you for the link. I checked it but couldn't find the resolution.
The
mergeCellChat
is more complex thanprojectOnNetwork
, and with a large number of cells, multiple operations in the function can reach the 2^31-1 limit, so I don't think this fix will be of much help.https://github.com/sqjin/CellChat/pull/349/commits/4e8733d1121b345cf29c1a9d90b38d82bee75070
Cross post: https://github.com/jinworks/CellChat/issues/392