to_mudata

Contents

to_mudata#

mudata.to_mudata(adata: AnnData, axis: Literal[0, 1], by: str) MuData#

Convert AnnData to MuData by splitting it along obs or var

Axis signifies the shared axis. Use axis=0 for getting MuData with shared observations (axis=0), and axis=1 for getting MuData with shared variables (axis=1).

Paramteters#

adataAnnData

AnnData object to convert to MuData

axisint

Axis of shared observations (0) or variables (1)

bystr

Key in adata.var (if axis=0) or adata.obs (if axis=1) to split by