mudata.read_anndata

Contents

mudata.read_anndata#

mudata.read_anndata(filename, mod, backed=False)#

Read a modality from inside a .h5mu file or from a standalone .h5ad file (mod=None).

Parameters:
  • filename – The file name or an fsspec object.

  • backed (default: False) – Whether to open the file in backed mode. In this mode, the data matrix X is not read into memory, but is a reference to the on-disk datasets.

Examples

>>> adata = read_h5ad("file.h5mu", "rna")
>>> adata = read_h5ad("rna.h5ad")
>>> with fsspec.open("https://example.com/file.h5mu") as f:
...     adata = read_h5ad(f, "rna")
>>> with fsspec.open("https://example.com/rna.h5ad") as f:
...     adata = read_h5ad(f)