hread: Query and store an HDF5 dataset on row and column indices.

View source: R/accessors.R

hreadR Documentation

Query and store an HDF5 dataset on row and column indices.

Description

Connect to an HDF5 database h5 file with rhdf5::h5read(). Returns the subsetted data.

Usage

hread(ri, ci, dsn = "redsignal", dbn = "remethdb2.h5")

Arguments

ri

Row indices in dataset.

ci

Column indices in dataset.

dsn

Name of dataset or group of dataset to connect with.

dbn

Path to h5 database file.

Value

HDF5 database connection object.

Examples

# Get tests data pointer
path <- system.file("extdata", "h5test", package = "recountmethylation")
fn <- list.files(path)
dbpath <- file.path(path, fn)
# red signal, first 2 assay addr, 3 samples
reds <- hread(1:2, 1:3, d = "redsignal", dbn = dbpath)
dim(reds) # [1] 2 3

metamaden/recountmethylation documentation built on Jan. 5, 2023, 9:56 a.m.