Read raw count matrix from H5AD file. By default, readH5AD load
specified layer into memory (inMemory = TRUE). To use LIGER in delayed
mode for handling large datasets, set inMemory = FALSE to load the
data as a DelayedArray object. Note that only CSR format is supported
for the matrix.
When loaded in memory, a sparse matrix of class dgCMatrix will
be returned. When loaded in delayed mode, a TENxMatrix object will be
returned. If obs = TRUE, a list containing the matrix and the cell
metadata will be returned.
Arguments
filename
Character string, path to the H5AD file.
layer
Character string specifying the H5 path of raw count data to be
loaded. Use 'X' for adata.X, 'raw/X' for
adata.raw.X, or 'layers/layer_name' for
adata.layers['layer_name'].
inMemory
Logical, whether to load the data into memory. Default
TRUE. FALSE loads the data as a DelayedArray object.
obs
Logical, whether to also load the cell metadata from
adata.obs. Default FALSE.
Details
Currently, the only supported H5AD AnnData encoding versions are as follows:
adata.X, adata.raw.X, or adata.layers['layer'] -
csr_matrix 0.1.0
adata.obs and adata.var - dataframe 0.2.0
Categoricals in a data frame - categorical 0.2.0
If users possess H5AD files encoded with older specification, please either
open an issue on GitHub or use R package 'anndata' to manually extract
information.