Oh, I forgot an important point. Does the seed class need to contain "Array"? What about "array"? I just remembered that I changed it to "array" because I have no "Array" in my namespace.
On Mon, Oct 30, 2017 at 11:24 AM, Francesco Napolitano <franap...@gmail.com> wrote: > > > Il 29/10/2017 22:45, Hervé Pagès ha scritto: > > In particular, I'd like to read more about how to create a backend for > DelayedArray. Is there any documentation available beyond the > reference manual? > > > I'm guilty. I plan to remedy this ASAP. In the mean time I'll be glad > to help. Note that other people are already working (or planning to > work) on other backends: > > Backend for remote HDF5 data: > > https://github.com/vjcitn/RemoteArray > > See issues #1, #2, #3 for some discussion about this. > > Backend for GDS files: > > https://github.com/Bioconductor/VariantExperiment/issues/1 > > > Thank you, Hervé. Maybe I could use some help than! Discussions in issue #2 > seems useful for my case. I have a specific question: when I create a > DelayedArray with my backend, it seems that subset_seed_as_array() is > called, which is not really intuitive. Is this normal? What is this first > call supposed to do? In my case it fails with dimensionality problems (the > array is empty). > > I did look into HDF5Array code, but I'm not sure I understand what the > following is doing: > > .subset_HDF5ArraySeed_as_array <- function(seed, index) > { > ans_dim <- DelayedArray:::get_Nindex_lengths(index, dim(seed)) > if (any(ans_dim == 0L)) { > ans <- seed@first_val[0] > dim(ans) <- ans_dim > } else { > ans <- h5read2(seed@file, seed@name, index) > } > ans > } > > In particular, I'm not sure how to interpret the index variable, which seems > to be a list. Each element "i" is a vector of indices for the i-th > dimension? And what does seed@first_val[0] do? And the first_val attribute > in general. > > Thank you very much for your help, > francesco _______________________________________________ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel