Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning when running computeCommunProb NAs produced by integer overflow #250

Open
Rayan21100 opened this issue Oct 26, 2024 · 2 comments
Open

Comments

@Rayan21100
Copy link

Rayan21100 commented Oct 26, 2024

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 !

@Harrison-Q-Ma
Copy link

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?

@ycl6
Copy link

ycl6 commented Dec 12, 2024

Hi all, I believe the issue lies with the future package and I have provided a fix via PR here futureverse/future#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, futureverse/parallelly#123, has been implemented in parallelly (>= 1.40.1-9007).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants