Skip to contents

Read H5AD as SingleCellExperiment where counts is a file-backed DelayedArray

Usage

readH5AD(file, layer = NULL, ondisk = TRUE, verbose = FALSE, raw = FALSE)

Arguments

file

H5AD file

layer

NULL (the default) or the name of a matrix in the /layers group. By default (i.e. when layer is not specified) returns the central matrix (X).

ondisk

if TRUE (default), only stream count data into memory when needed. If FALSE, read count data into memory now as a sparseMatrix

verbose

print messages

raw

if TRUE, read counts from /raw/X. Cannot be used with layer.

Value

SingleCellExperiment

Details

Uses HDF5Array::H5ADMatrix() to read counts as a file-backed DelayedArray, and anndataR::read_h5ad() to read all other data from H5AD.

Examples

file <- system.file("extdata", "example.h5ad", package = "anndataR")
sce <- readH5AD(file)