Skip to main content

Links between modalities in mudata

Project description

mulink

Tests Documentation

Links between modalities in mudata

Getting started

mulink models feature relationships between mudata modalities as directed acyclic graph. To work with this mapping, it extends the namespace of mudata with a custom link attribute. The individual functionalities are implemented as accessors to this namespace.

import mudata as md
import mulink  # registers the `link` namespace on mudata
from scipy.sparse import csr_matrix

# minimal example
mdata = mulink.simulate.hierarchical_mudata(n_mod=3)
assert isinstance(mdata, md.MuData)
assert "feature_mapping" in mdata.varp.keys()
assert hasattr(mdata, "link")

# add linkage matrix
mdata.link.add_link(csr_matrix(...))

# querying
mdata.link.query.descendants("mod0-0")
mdata.link.query.ancestors("mod2-0")

# plotting
mdata.link.pl.graph()

For more information, please refer to the documentation, in particular, the API documentation and the Design Document.

Installation

You need to have Python 3.11 or newer installed on your system. If you don't have Python installed, we recommend installing uv.

There are several alternative options to install mulink:

  1. Install the latest development version:
pip install git+https://github.com/lucas-diedrich/mulink.git@main

Release notes

See the changelog.

Contact

If you found a bug, please use the issue tracker.

Citation

This project was started at the scverse proteomics hackathon in Berlin 2026. Comparable features are implemented in the QFeatures package in R.

scverse proteomics working group 2026. mulink.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mulink-0.0.1.tar.gz (720.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mulink-0.0.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page