CellChat icon indicating copy to clipboard operation
CellChat copied to clipboard

Warning when running computeCommunProb NAs produced by integer overflow

Open Rayan21100 opened this issue 1 year ago • 2 comments

Hi,

First, thank you for this amazing and user-friendly package !

I'm analyzing a public CosMx dataset (lung FFPE), each object has approximately 100k cells and a 960 gene panel. I'm running computeComunProb on each of the object, I followed exactly the vignette of single spatially resolved transcriptomic dataset up until this point and I didn't have any problem. For 3 objects out of 7 I have this warning message:

Warning message:
In size + sum(size_args, na.rm = FALSE) : NAs produced by integer overflow

I don't really know from where it could come from and how to fix it. I don't know if I can trust the results afterwards.

The code I'm running is:

lung5_1 <- computeCommunProb(lung5_1, type = "truncatedMean", trim = 0.1,
                                     distance.use = TRUE, interaction.range = 250, scale.distance = 5.6,
                                     contact.dependent = TRUE, contact.range = 10)

For the scale.distance parameter, when I tried it on the first object, I had a message telling me to change it for a value a little bit lower than 5.7 so I chose 5.6 and I applied it for all the other objects. Maybe that's the problem ? Should I have a different value for every object? Can I still compare them with different scale.distance values ?

When I use the PPI method, I don't have this warning,

Thanks in advance !

Rayan21100 avatar Oct 26 '24 08:10 Rayan21100

Running into the same issue cellchat <- computeCommunProb(cellchat, type = "triMean") is giving the Warning message: In size + sum(size_args, na.rm = FALSE) : NAs produced by integer overflow error. Have you solved this?

Harrison-Q-Ma avatar Dec 09 '24 04:12 Harrison-Q-Ma

Hi all, I believe the issue lies with the future package and I have provided a fix via PR here https://github.com/futureverse/future/pull/755.

I re-run the computeCommunProb step after updating future and the warning message is gone.


Edit (15 Dec 2024):

An update from future's developer. He has identified an upstream function in the package parallelly that will be best to implement the fix.

The fix, https://github.com/futureverse/parallelly/issues/123, has been implemented in parallelly (>= 1.40.1-9007).

ycl6 avatar Dec 12 '24 18:12 ycl6