Metadata-Version: 2.4
Name: mofaflex
Version: 0.1.1
Summary: Factor Analysis Models
Project-URL: Documentation, https://mofaflex.readthedocs.io/
Project-URL: Home-page, https://github.com/bioFAM/mofaflex
Project-URL: Source, https://github.com/bioFAM/mofaflex
Author-email: Ilia Kats <i.kats@dkfz.de>, Arber Qoku <arber.qoku@dkfz.de>, Florin Walter <florin.walter@dkfz.de>, Martin Rohbeck <martin.rohbeck@dkfz.de>
Maintainer-email: Ilia Kats <i.kats@dkfz.de>
License: BSD 3-Clause License
        
        Copyright (c) 2024 Ilia Kats, Arber Qoku, Florin Walter, Martin Rohbeck
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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: anndata>=0.11
Requires-Dist: array-api-compat
Requires-Dist: dtw-python
Requires-Dist: gpytorch
Requires-Dist: h5py
Requires-Dist: mizani
Requires-Dist: mudata>=0.3.2
Requires-Dist: numpy
Requires-Dist: packaging
Requires-Dist: pandas
Requires-Dist: platformdirs
Requires-Dist: plotnine
Requires-Dist: pyro-ppl
Requires-Dist: scikit-learn
Requires-Dist: scipy>=1.8
Requires-Dist: session-info2
Requires-Dist: statsmodels
Requires-Dist: torch
Requires-Dist: tqdm
Provides-Extra: dev
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: twine>=4.0.2; extra == 'dev'
Provides-Extra: doc
Requires-Dist: docutils!=0.18.*,!=0.19.*,>=0.8; extra == 'doc'
Requires-Dist: ipykernel; extra == 'doc'
Requires-Dist: ipython; extra == 'doc'
Requires-Dist: myst-nb>=1.1; extra == 'doc'
Requires-Dist: pandas; extra == 'doc'
Requires-Dist: setuptools; extra == 'doc'
Requires-Dist: sphinx-autodoc-typehints; extra == 'doc'
Requires-Dist: sphinx-automodapi; extra == 'doc'
Requires-Dist: sphinx-book-theme>=1; extra == 'doc'
Requires-Dist: sphinx-copybutton; extra == 'doc'
Requires-Dist: sphinx-tabs; extra == 'doc'
Requires-Dist: sphinx>=8.1; extra == 'doc'
Requires-Dist: sphinxcontrib-bibtex>=1; extra == 'doc'
Requires-Dist: sphinxext-opengraph; extra == 'doc'
Provides-Extra: lazy
Requires-Dist: dask[array,dataframe]!=2025.5; extra == 'lazy'
Provides-Extra: test
Requires-Dist: coverage>=7.10; extra == 'test'
Requires-Dist: dask[array,dataframe]!=2025.5; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

# MOFA-FLEX

[![PyPI][badge-pypi]][pypi]
[![Tests][badge-tests]][tests]
[![codecov][badge-codecov]][codecov]
[![Documentation][badge-docs]][documentation]

[badge-pypi]: https://img.shields.io/pypi/v/mofaflex
[badge-tests]: https://github.com/bioFAM/mofaflex/actions/workflows/test.yaml/badge.svg
[badge-codecov]: https://codecov.io/gh/bioFAM/mofaflex/graph/badge.svg?token=IJP1IA4JEU
[badge-docs]: https://img.shields.io/readthedocs/mofaflex


![graphical abstract](https://raw.githubusercontent.com/bioFAM/mofaflex/main/docs/_static/img/mofaflex_schematic.svg)

MOFA-FLEX is a versatile factor analysis framework designed to streamline the construction and training of complex matrix factorisation models for omics data.
It is built on a probabilistic programming-based Bayesian factor analysis framework that integrates concepts from multiple existing methods while remaining modular and extensible.
MOFA-FLEX generalises widely used matrix factorisation tools by incorporating flexible prior options (including structured sparsity priors for multi-omics data and covariate-informed priors for spatio-temporal data), non-negativity constraints, and diverse data likelihoods - allowing users to mix and match components to suit their specific needs.
Additionally, MOFA-FLEX introduces a novel module for integrating prior biological knowledge in the form of gene sets or, more generally, variable sets, enabling the inference of interpretable latent factors linked to specific molecular programs.

## Getting started

Please refer to the [documentation][]. In particular, the

- [Getting started guide][getting started].
- [Tutorials][].
- [API documentation][].

## Installation

You need to have Python 3.11 or newer installed on your system. If you don't have
Python installed, we recommend installing [Micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html).

There are several alternative options to install MOFA-FLEX:

1. Install the latest release of MOFA-FLEX from [PyPI][]:

```bash
pip install mofaflex
```

2. Install the latest development version:

```bash
pip install git+https://github.com/bioFAM/mofaflex.git@main
```

## Release notes

See the [changelog][].

## Contact

For questions and help requests, you can reach out in the [discussions][].
If you found a bug, please use the [issue tracker][].

## Citation

If you use MOFA-FLEX in your work, please cite
> Qoku A, Rohbeck M, Walter FC, Kats I, Stegle O, and Buettner F.  MOFA-FLEX: A Factor Model Framework for Integrating Omics Data with Prior Knowledge. Preprint at [bioRxiv](https://www.biorxiv.org/content/10.1101/2025.11.03.686250) (2025). DOI: [10.1101/2025.11.03.686250](https://doi.org/10.1101/2025.11.03.686250).

<details><summary>BibTeX</summary>

```bibtex
@article {mofaflex,
	author = {Qoku, Arber and Rohbeck, Martin and Walter, Florin Cornelius and Kats, Ilia and Stegle, Oliver and Buettner, Florian},
	title = {MOFA-FLEX: A Factor Model Framework for Integrating Omics Data with Prior Knowledge},
	eprint = {2025.11.03.686250},
	year = {2025},
	doi = {10.1101/2025.11.03.686250},
	URL = {https://www.biorxiv.org/content/early/2025/11/04/2025.11.03.686250},
	archiveprefix = {bioRxiv}
}
```
</details>

[issue tracker]: https://github.com/bioFAM/mofaflex/issues
[tests]: https://github.com/bioFAM/mofaflex/actions/workflows/test.yaml
[codecov]: https://codecov.io/gh/bioFAM/mofaflex
[documentation]: https://mofaflex.readthedocs.io
[discussions]: https://github.com/bioFAM/mofaflex/discussions
[changelog]: https://mofaflex.readthedocs.io/stable/changelog.html
[getting started]: https://mofaflex.readthedocs.io/stable/notebooks/getting_started.html
[tutorials]: https://mofaflex.readthedocs.io/stable/tutorials.html
[api documentation]: https://mofaflex.readthedocs.io/stable/api/index.html
[pypi]: https://pypi.org/project/mofaflex
