muvi
A multi-view latent variable model with domain-informed structured sparsity for integrating noisy feature sets.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.4%) to scientific vocabulary
Repository
A multi-view latent variable model with domain-informed structured sparsity for integrating noisy feature sets.
Basic Info
Statistics
- Stars: 31
- Watchers: 3
- Forks: 2
- Open Issues: 0
- Releases: 5
Metadata Files
README.md
MuVI
A multi-view latent variable model with domain-informed structured sparsity, that integrates noisy domain expertise in terms of feature sets.
Basic usage
The MuVI class is the main entry point for loading the data and performing the inference:
```py import numpy as np import pandas as pd import anndata as ad import mudata as md import muvi
Load processed input data (missing values are allowed)
Matrix of dimensions nsamples x nrna_features
rnadf = pd.readcsv(...)
Matrix of dimensions nsamples x nprot_features
protdf = pd.readcsv(...)
Load prior feature sets, e.g. gene sets
genesets = muvi.fs.fromgmt(...)
Binary matrix of dimensions ngenesets x nrnafeatures
genesetsmask = genesets.tomask(rna_df.columns)
Create a MuVI object by passing both input data and prior information
model = muvi.MuVI( observations={"rna": rnadf, "prot": protdf}, priormasks={"rna": genesets_mask}, ... device=device, )
Alternatively, create a MuVI model from AnnData (single-view)
rnaadata = ad.AnnData(rnadf, dtype=np.float32) rnaadata.varm['genesetsmask'] = genesetsmask.T model = muvi.tl.fromadata( adata, priormaskkey="genesetsmask", ..., device=device )
Alternatively, create a MuVI model from MuData (multi-view)
mdata = md.MuData({"rna": rnaadata, "prot": protadata}) model = muvi.tl.mdata( mdata, priormaskkey="genesetsmask", ..., device=device )
Fit the model for a given number of training epochs
model.fit(batchsize, nepochs, ...)
Continue with the downstream analysis (see below)
```
Submodules
The package consists of three additional submodules for analysing the results post-training:
muvi.tlprovides tools for downstream analysis, e.g.,- compute
muvi.tl.variance_explainedacross all factors and views muvi.tl.testthe significance between the prior feature sets and the inferred factors- apply clustering on the latent space such as
muvi.tl.leiden muvi.tl.savethe model in order tomuvi.tl.loadit at a later point in time
- compute
muvi.plworks in tandem withmuvi.tlby providing visualization methods such asmuvi.pl.variance_explained(see above)- plotting the latent space via
muvi.pl.tsne,muvi.pl.scatterormuvi.pl.stripplot - investigating factors in terms of their inferred loadings with
muvi.pl.inspect_factor
muvi.fsserves the data structure and methods for loading, processing and storing the prior information from feature sets
Tutorials
Check out our basic tutorial to get familiar with MuVI, or jump straight to a single-cell multiome analysis!
R users can readily export a trained MuVI model into R with a single line of code and resume the analysis with the MOFA2 package.
py
muvi.ext.save_as_hdf5(model, "muvi.hdf5", save_metadata=True)
See this vignette for more details!
Installation
We suggest using conda to manage your environments, and pip to install muvi as a python package. Follow these steps to get muvi up and running!
- Create a python environment in
conda:
bash
conda create -n muvi python=3.10
- Activate freshly created environment:
bash
source activate muvi
- Install
muviwithpip:
bash
python3 -m pip install muvi
- Alternatively, install the latest version with
pip:
bash
python3 -m pip install git+https://github.com/MLO-lab/MuVI.git
Make sure to install a GPU version of PyTorch to significantly speed up the inference.
Citation
If you use MuVI in your work, please use this BibTeX entry:
Encoding Domain Knowledge in Multi-view Latent Variable Models: A Bayesian Approach with Structured Sparsity
Arber Qoku and Florian Buettner
International Conference on Artificial Intelligence and Statistics (AISTATS) 2023
Owner
- Name: MLO Lab
- Login: MLO-lab
- Kind: organization
- Website: https://mlo-lab.github.io
- Repositories: 4
- Profile: https://github.com/MLO-lab
Machine Learning in Oncology
Citation (citation.bib)
@InProceedings{pmlr-v206-qoku23a,
title = {Encoding Domain Knowledge in Multi-view Latent Variable Models: A Bayesian Approach with Structured Sparsity},
author = {Qoku, Arber and Buettner, Florian},
booktitle = {Proceedings of The 26th International Conference on Artificial Intelligence and Statistics},
pages = {11545--11562},
year = {2023},
editor = {Ruiz, Francisco and Dy, Jennifer and van de Meent, Jan-Willem},
volume = {206},
series = {Proceedings of Machine Learning Research},
month = {25--27 Apr},
publisher = {PMLR},
pdf = {https://proceedings.mlr.press/v206/qoku23a/qoku23a.pdf},
url = {https://proceedings.mlr.press/v206/qoku23a.html}
}
GitHub Events
Total
- Create event: 5
- Issues event: 2
- Release event: 1
- Watch event: 3
- Delete event: 3
- Issue comment event: 3
- Push event: 9
- Pull request review event: 2
- Pull request event: 6
- Fork event: 1
Last Year
- Create event: 5
- Issues event: 2
- Release event: 1
- Watch event: 3
- Delete event: 3
- Issue comment event: 3
- Push event: 9
- Pull request review event: 2
- Pull request event: 6
- Fork event: 1
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 1
- Total pull requests: 3
- Average time to close issues: 2 months
- Average time to close pull requests: about 4 hours
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 2.0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 3
Past Year
- Issues: 1
- Pull requests: 3
- Average time to close issues: 2 months
- Average time to close pull requests: about 4 hours
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 2.0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 3
Top Authors
Issue Authors
- jpintar (1)
Pull Request Authors
- dependabot[bot] (3)
- arberqoku (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 3
-
Total downloads:
- pypi 47 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 0
(may contain duplicates) - Total versions: 17
- Total maintainers: 1
proxy.golang.org: github.com/MLO-lab/MuVI
- Documentation: https://pkg.go.dev/github.com/MLO-lab/MuVI#section-documentation
- License: bsd-3-clause
-
Latest release: v0.1.5
published over 1 year ago
Rankings
proxy.golang.org: github.com/mlo-lab/muvi
- Documentation: https://pkg.go.dev/github.com/mlo-lab/muvi#section-documentation
- License: bsd-3-clause
-
Latest release: v0.1.5
published over 1 year ago
Rankings
pypi.org: muvi
MuVI: A multi-view latent variable model with domain-informed structured sparsity for integrating noisy feature sets.
- Homepage: https://github.com/MLO-lab/MuVI
- Documentation: https://muvi.readthedocs.io/
- License: bsd-3-clause
-
Latest release: 0.1.5
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- 149 dependencies
- black >=22.6.0
- flake8 >=3.9.2
- gsea-api ^0.3.4
- ipython >=7.25
- isort >=5.9
- jupyter >=1.0
- leidenalg ^0.8.9
- lifelines ^0.27.0
- muon ^0.1.2
- numpy >=1.20
- openpyxl ^3.0.9
- pandas >=1.0
- pre-commit ^2.17.0
- pyro-ppl >=1.8.0
- pytest ^6.2.5
- python >=3.8,<3.11
- scikit-learn ^1.0.2
- scipy ^1.8.0
- seaborn >=0.11
- statsmodels ^0.13.2
- torch >=1.9.0
- tqdm >=4.61.1
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3 composite
- snok/install-poetry v1 composite