-
Notifications
You must be signed in to change notification settings - Fork 9
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
Filling large DelayedArray with iid standard normals #89
Comments
Hi @ekernf01 , You want to write your own arbitrary data to an HDF5 file. This doesn't need to involve DelayedArray objects and can be easily achieved with plain use of the rhdf5 package. However, the DelayedArray/HDF5Array framework provides RealizationSink objects to make this more convenient, and to abstract away the details of the particular backend being used (e.g. HDF5 file or TileTB). This helps make the code simpler, easier to understand, and portable across backends. See H. |
Thanks, I adapted that RealizationSink example and it works really well. If I want to just us rhdf5 in the future, can the DelayedArray package read any hdf5 file, or are there certain expectations that have to be met? I don't know much about hdf5 yet, so please forgive me if it's an ignorant question, but I'm asking because in the past I have had some trouble writing hdf5 files with one scRNA package and then trying to read them with another. |
The DelayedArray package implements all the backend agnostic stuff used by DelayedArray objects in general so is not geared specifically towards hdf5 datasets. The These parameters are documented in |
Thanks! After a little trouble with locking, I got that to work too now. I will close the issue. |
FWIW, the original question can also be answered with: library(DelayedRandomArray) # see https://github.com/LTLA/DelayedRandomArray
randnorm <- RandomNormArray(c(1000, 100000))
library(HDF5Array)
writeHDF5Array(randnorm, file="foo.h5", path="bar") # generates a pretty large file; not very compressible. Takes about 20 seconds for me. |
Hi DelayedArray devs, how would you fill a 1000 by 100,000 DelayedArray or HDF5Array with iid standard Normal draws? Here's what I have tried.
simplify
. Seems to make no difference to the too-big tree.realize
with HDF5Array backend. This works but seems slow.Thanks in advance for considering this request. The package is awesome -- easy to use and valuable.
The text was updated successfully, but these errors were encountered: