Metadata-Version: 2.4
Name: mulink
Version: 0.0.1
Summary: Links between modalities in mudata
Project-URL: Documentation, https://mulink.readthedocs.io/
Project-URL: Homepage, https://github.com/lucas-diedrich/mulink
Project-URL: Source, https://github.com/lucas-diedrich/mulink
Author: scverse-proteomics
Maintainer-email: scverse-proteomics <diedrich@biochem.mpg.de>
License: MIT License
        
        Copyright (c) 2026, scverse-proteomics
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.11
Requires-Dist: matplotlib
Requires-Dist: mudata
Requires-Dist: networkx
Requires-Dist: session-info2
Description-Content-Type: text/markdown

# mulink

[![Tests][badge-tests]][tests]
[![Documentation][badge-docs]][documentation]

[badge-tests]: https://img.shields.io/github/actions/workflow/status/lucas-diedrich/mulink/test.yaml?branch=main
[badge-docs]: https://img.shields.io/readthedocs/mulink

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.

```python
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 release of `mulink` from [PyPI][]:

```bash
pip install mulink
```
-->

1. Install the latest development version:

```bash
pip install git+https://github.com/lucas-diedrich/mulink.git@main
```

## Release notes

See the [changelog][].

## Contact

<!-- For questions and help requests, you can reach out in the [scverse discourse][]. -->
If you found a bug, please use the [issue tracker][].

## Citation

This project was started at the [scverse proteomics hackathon in Berlin 2026](https://github.com/scverse/202603_hackathon_proteomics). Comparable features are implemented in the [QFeatures](https://rformassspectrometry.github.io/QFeatures/) package in R.

> scverse proteomics working group 2026. mulink.

[uv]: https://github.com/astral-sh/uv
[scverse discourse]: https://discourse.scverse.org/
[issue tracker]: https://github.com/lucas-diedrich/mulink/issues
[tests]: https://github.com/lucas-diedrich/mulink/actions/workflows/test.yaml
[documentation]: https://mulink.readthedocs.io
[changelog]: https://mulink.readthedocs.io/en/latest/changelog.html
[api documentation]: https://mulink.readthedocs.io/en/latest/api.html
[Design Document]: https://mulink.readthedocs.io/en/latest/rfc.html

[pypi]: https://pypi.org/project/mulink
