ReshapedHDF5ArraySeed objects
ReshapedHDF5ArraySeed-class.Rd
ReshapedHDF5ArraySeed is a low-level helper class for representing a pointer to a virtually reshaped HDF5 dataset.
ReshapedHDF5ArraySeed objects are not intended to be used directly.
Most end users should create and manipulate ReshapedHDF5Array
objects instead. See ?ReshapedHDF5Array
for more information.
Arguments
- filepath, name, dim, type
See
?ReshapedHDF5Array
for a description of these arguments.
Details
No operation can be performed directly on a ReshapedHDF5ArraySeed object. It first needs to be wrapped in a DelayedArray object. The result of this wrapping is a ReshapedHDF5Array object (a ReshapedHDF5Array object is just a ReshapedHDF5ArraySeed object wrapped in a DelayedArray object).
See also
ReshapedHDF5Array objects.
h5ls
to list the content of an HDF5 file.
Examples
library(h5vcData)
tally_file <- system.file("extdata", "example.tally.hfs5",
package="h5vcData")
h5ls(tally_file)
#> group name otype dclass dim
#> 0 / ExampleStudy H5I_GROUP
#> 1 /ExampleStudy 16 H5I_GROUP
#> 2 /ExampleStudy/16 Counts H5I_DATASET INTEGER 12 x 6 x 2 x 90354753
#> 3 /ExampleStudy/16 Coverages H5I_DATASET INTEGER 6 x 2 x 90354753
#> 4 /ExampleStudy/16 Deletions H5I_DATASET INTEGER 6 x 2 x 90354753
#> 5 /ExampleStudy/16 Reference H5I_DATASET INTEGER 90354753
#> 6 /ExampleStudy 22 H5I_GROUP
#> 7 /ExampleStudy/22 Counts H5I_DATASET INTEGER 12 x 6 x 2 x 51304566
#> 8 /ExampleStudy/22 Coverages H5I_DATASET INTEGER 6 x 2 x 51304566
#> 9 /ExampleStudy/22 Deletions H5I_DATASET INTEGER 6 x 2 x 51304566
#> 10 /ExampleStudy/22 Reference H5I_DATASET INTEGER 51304566
## Collapse the first 2 dimensions:
seed <- ReshapedHDF5ArraySeed(tally_file, "/ExampleStudy/16/Coverages",
dim=c(12, 90354753))
seed
#> An object of class "ReshapedHDF5ArraySeed"
#> Slot "reshaped_dim":
#> [1] 12 90354753
#>
#> Slot "reshaped_chunkdim":
#> [1] 1 88238
#>
#> Slot "filepath":
#> [1] "/usr/local/lib/R/site-library/h5vcData/extdata/example.tally.hfs5"
#>
#> Slot "name":
#> [1] "/ExampleStudy/16/Coverages"
#>
#> Slot "as_sparse":
#> [1] FALSE
#>
#> Slot "type":
#> [1] NA
#>
#> Slot "dim":
#> [1] 6 2 90354753
#>
#> Slot "chunkdim":
#> [1] 1 1 88238
#>
#> Slot "first_val":
#> [1] 0
#>
path(seed)
#> [1] "/usr/local/lib/R/site-library/h5vcData/extdata/example.tally.hfs5"
dim(seed)
#> [1] 12 90354753
chunkdim(seed)
#> [1] 1 88238