mudata.MuData
mudata.MuData#
- class mudata.MuData(data: Optional[Union[anndata._core.anndata.AnnData, Mapping[str, anndata._core.anndata.AnnData], mudata._core.mudata.MuData]] = None, feature_types_names: Optional[dict] = {'Antibody Capture': 'prot', 'Gene Expression': 'rna', 'Peaks': 'atac'}, as_view: bool = False, index: Optional[Union[Tuple[Union[slice, numbers.Integral], Union[slice, numbers.Integral]], slice, numbers.Integral]] = None, **kwargs)#
Multimodal data object
MuData represents modalities as collections of AnnData objects as well as includes multimodal annotations such as embeddings and neighbours graphs learned jointly on multiple modalities and generalised sample and feature metadata tables.
- __init__(data: Optional[Union[anndata._core.anndata.AnnData, Mapping[str, anndata._core.anndata.AnnData], mudata._core.mudata.MuData]] = None, feature_types_names: Optional[dict] = {'Antibody Capture': 'prot', 'Gene Expression': 'rna', 'Peaks': 'atac'}, as_view: bool = False, index: Optional[Union[Tuple[Union[slice, numbers.Integral], Union[slice, numbers.Integral]], slice, numbers.Integral]] = None, **kwargs)#
Methods
__init__
([data, feature_types_names, ...])copy
([filename])obs_keys
()List keys of observation annotation
obs
.obs_names_make_unique
()Call .obs_names_make_unique() method on each AnnData object.
obs_vector
(key[, layer])Return an array of values for the requested key of length n_obs
obsm_keys
()List keys of observation annotation
obsm
.strings_to_categoricals
([df])Transform string columns in .var and .obs slots of MuData to categorical as well as of .var and .obs slots in each AnnData object
uns_keys
()List keys of unstructured annotation.
update
()Update both .obs and .var of MuData with the data from all the modalities
update_obs
()Update .obs slot of MuData with the newest .obs data from all the modalities
update_var
()Update .var slot of MuData with the newest .var data from all the modalities
var_keys
()List keys of variable annotation
var
.var_names_make_unique
()Call .var_names_make_unique() method on each AnnData object.
var_vector
(key[, layer])Return an array of values for the requested key of length n_var
varm_keys
()List keys of variable annotation
varm
.write
([filename])Write MuData object to an HDF5 file
write_h5mu
([filename])Write MuData object to an HDF5 file
write_zarr
(store, **kwargs)Write MuData object to a Zarr store
Attributes
axis
MuData axis
filename
isbacked
n_mod
n_obs
Total number of observations
n_var
Total number of variables
n_vars
Total number of variables
obs
Annotation of observation
obs_names
Names of variables (alias for .obs.index)
obsm
Multi-dimensional annotation of observation
obsmap
Mapping of observation index in the MuData to indices in individual modalities.
obsp
Pairwise annotatation of observations
shape
Shape of data, all variables and observations combined (
n_obs
,n_var
).var
Annotation of variables
var_names
Names of variables (alias for .var.index)
varm
Multi-dimensional annotation of variables
varmap
Mapping of feature index in the MuData to indices in individual modalities.
varp
Pairwise annotatation of variables