mudata.read

Contents

mudata.read#

mudata.read(filename, **kwargs)#

Read an .h5mu formatted HDF5 file or a single modality inside it.

This function is designed to enhance I/O ease of use. It recognises the following formats of filename:

  • FILE.h5mu

  • FILE.h5ad

  • FILE.h5mu/MODALITY

  • FILE.h5mu/mod/MODALITY

The last two variantes will read the modality MODALITY and return an AnnData object.

Parameters:

Examples

>>> mdata = read("file.h5mu")
>>> adata = read("file.h5mu/rna")
>>> with fsspec.open("s3://bucket/file.h5mu") as f:
...     mdata = read(f)