Skip to contents

Read an .h5ad file and convert to a Seurat

Usage

h5ad_to_srt(path, verbose = TRUE, prepare_for_reticulate = TRUE)

Arguments

path

Path to an .h5ad file (passed to scanpy.read_h5ad()).

verbose

Whether to print the message. Default is TRUE.

prepare_for_reticulate

If TRUE (default), coerces X and each layer matrix to CSR float64 in Python (avoids invalid dgRMatrix conversion via reticulate). Layers that still fail in adata_to_srt() are skipped and reported. Set to FALSE for a plain read_h5ad then convert.

Value

A Seurat object.

Examples

if (FALSE) { # \dontrun{
srt <- h5ad_to_srt("path/to/data.h5ad")
srt
} # }