read_hdf() reads the dataset key of an HDF5 (.h5) file into the X of an
AnnData() object, as Python's read_hdf().
If the file also has the datasets row_names and col_names they become
the obs and var names.
Value
An AnnData() object.
Examples
path <- tempfile(fileext = ".h5")
rhdf5::h5createFile(path)
rhdf5::h5write(matrix(c(0.5, 1.5, 2.5, 3.5), 2), path, "data")
read_hdf(path, "data")
#> AnnData object with n_obs × n_vars = 2 × 2
#> layers: None (.X)