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

NAs produced by integer overflow #12

Open
ayyildizd opened this issue Mar 26, 2024 · 0 comments
Open

NAs produced by integer overflow #12

ayyildizd opened this issue Mar 26, 2024 · 0 comments

Comments

@ayyildizd
Copy link

ayyildizd commented Mar 26, 2024

Hi,

While running findCDImarkers function I had this error:

2024-03-26 13:26:58.175816: Computing co-dependency indices...
  |++++++++++++++++++++++++++++++++++                | 67% ~04s          Error in binom.test(x = imat[i, j], n = ncol(emat), p = fmat[i, j], alternative = "greater") : 
  'p' must be a single number between 0 and 1
In addition: There were 50 or more warnings (use warnings() to see the first 50)

when I check the warnings I get :

length(x) * length(y) : NAs produced by integer overflow

and I think it is due to this step here:

pmat <- mysapply(which.cells2, function(x) sapply(which.cells, 
    function(y) length(x) * length(y)))

and I fixed the error by taking integers with as.integer64() from the bit64 package to handle larger integer values.

pmat <- mysapply(which.cells2, function(x) sapply(which.cells, 
    function(y) as.integer64(length(x)) * as.integer64(length(y))))

However this inflated my FDR values. Could you help in this?

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

1 participant