readH5AD | R Documentation |
Reads a H5AD file and returns a SingleCellExperiment object.
readH5AD(
file,
X_name = NULL,
use_hdf5 = FALSE,
reader = c("python", "R"),
version = NULL,
verbose = NULL,
...
)
file |
String containing a path to a |
X_name |
Name used when saving |
use_hdf5 |
Logical scalar indicating whether assays should be loaded as HDF5-based matrices from the HDF5Array package. |
reader |
Which HDF5 reader to use. Either |
version |
A string giving the version of the anndata Python library
to use. Allowed values are available in |
verbose |
Logical scalar indicating whether to print progress messages.
If |
... |
Arguments passed on to
|
Setting use_hdf5 = TRUE
allows for very large datasets to be efficiently
represented on machines with little memory. However, this comes at the cost
of access speed as data needs to be fetched from the HDF5 file upon request.
Setting reader = "R"
will use an experimental native R reader instead of
reading the file into Python and converting the result. This avoids the need
for a Python environment and some of the issues with conversion but is still
under development and is likely to return slightly different output.
See AnnData-Environment for more details on zellkonverter Python environments.
A SingleCellExperiment object is returned.
Luke Zappia
Aaron Lun
writeH5AD()
, to write a SingleCellExperiment object to a
H5AD file.
AnnData2SCE()
, for developers to convert existing AnnData instances to a
SingleCellExperiment.
library(SummarizedExperiment)
file <- system.file("extdata", "krumsiek11.h5ad", package = "zellkonverter")
sce <- readH5AD(file)
class(assay(sce))
sce2 <- readH5AD(file, use_hdf5 = TRUE)
class(assay(sce2))
sce3 <- readH5AD(file, reader = "R")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.