Closed PeteHaitch closed 6 years ago
Thanks Pete. I've narrowed this down to DelayedArray:::simple_abind()
breaking when the objects to bind are longer than .Machine$integer.max
:
library(DelayedArray)
m <- matrix(raw(), nrow=5e7, ncol=25)
tmp <- DelayedArray:::simple_abind(m, m, along=2L)
# Error in validObject(.Object) :
# invalid class “IRanges” object: 'start(x)', 'end(x)', and 'width(x)' cannot contain NAs
# In addition: Warning messages:
# 1: In .intertwine_blocks(objects, block_lens) :
# integer overflow in 'cumsum'; use 'cumsum(as.numeric(.))'
# 2: In width(x) - 1L + start(x) : NAs produced by integer overflow
Will work on a fix. H.
This should be fixed in DelayedArray 0.7.13 (commit 88700ad478678099b674808e32ce01a7a9568011).
@PeteHaitch Hi Pete, is this something we can close? Thx!
I tries this on (roughly) the same example dataset and got the following:
Warning message:
In block_lens * dims[n, ] : NAs produced by integer overflow
It does seem to have worked, however (e.g. there are no NA
elements in the final matrix).
This is using v0.7.18
.
arghh... I see. Should be addressed in DelayedArray 0.7.24 (see https://github.com/Bioconductor/DelayedArray/commit/7f9e7dd4514864c4b7065f8d12c8c1123868dd0b). Can you give it another try? Hopefully this time I got it right.
Thanks Pete!
Closing this. Feel free to re-open if this still gives you trouble.
I made a large DelayedMatrix,
M0
, bycbind()
-ing two HDF5Matrix objects (there was also some row-subsetting). When callingas.matrix(M0))
, I got a rather obscure error. It looks like integer overflow, which may be related to the fact the thelength(M0) > .Machine$integer.max
:I can post more details tomorrow, but I wanted to jot this down before heading home for the day. Obviously calling
as.matrix()
on such a large DelayedMatrix isn't generally a good idea, but I've got a big memory machine and it helps a bit when doing quick exploratory analyses.