MuData (Multimodal Data) is a Python library for working with multimodal single-cell data, building upon the AnnData ecosystem. It provides a container for multiple AnnData objects, representing different modalities, allowing for unified storage and analysis. The current version is 0.3.4, and the library typically releases minor versions every few months, with patch releases addressing compatibility and bug fixes.
pip install mudataVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a `MuData` object from multiple `AnnData` objects, access individual modalities, and inspect shared observation metadata. The example simulates two modalities (RNA and ATAC) for 10 cells.
Adopt the new `.pull()` and `.push()` interface, or revert to the old `.update()` behavior by setting `mudata.set_options(pull_on_update=False)`.
Ensure `anndata` and `mudata` are up-to-date and compatible. If encountering issues with old files, try loading with the version of `mudata`/`anndata` that created the file and resaving it with the latest versions.
Always ensure your `anndata` installation is compatible with your `numpy` and `mudata` versions. A `pip install --upgrade anndata mudata` can resolve most dependency mismatches.
Upgrade to MuData v0.3.2 or newer to benefit from improved stability and correctness when slicing or copying `MuData` objects and their views.
Upgrade both `anndata` and `mudata` to their latest compatible versions: `pip install --upgrade anndata mudata`.
Adopt the new annotation management interface using `.pull()` to fetch metadata from modalities or `.push()` to send it. If you need the old implicit behavior, set `mudata.set_options(pull_on_update=True)` before creating or updating the `MuData` object.
Ensure `anndata` and `mudata` are both fully updated (`pip install --upgrade anndata mudata`). If the problem persists, the file may need to be re-exported from its original source using a compatible version of the libraries.