{"id":13612280,"url":"https://github.com/scverse/muon","last_synced_at":"2025-07-07T01:09:00.817Z","repository":{"id":37747830,"uuid":"237867216","full_name":"scverse/muon","owner":"scverse","description":"muon is a multimodal omics Python framework","archived":false,"fork":false,"pushed_at":"2025-02-28T15:58:29.000Z","size":5293,"stargazers_count":239,"open_issues_count":48,"forks_count":31,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-07-04T03:43:00.522Z","etag":null,"topics":["anndata","cite-seq","mudata","multi-omics","multimodal-data","multimodal-omics-analysis","muon","scanpy","scatac-seq","scrna-seq","scverse"],"latest_commit_sha":null,"homepage":"https://muon.scverse.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scverse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-03T02:00:15.000Z","updated_at":"2025-06-18T02:10:30.000Z","dependencies_parsed_at":"2024-01-14T04:57:26.326Z","dependency_job_id":"7044d551-a7a2-44d2-96a3-79ab9467723d","html_url":"https://github.com/scverse/muon","commit_stats":{"total_commits":472,"total_committers":10,"mean_commits":47.2,"dds":0.3432203389830508,"last_synced_commit":"8b57dd720dfdde32cb8db03ceae2a0fc951a9354"},"previous_names":["pmbio/muon"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/scverse/muon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scverse%2Fmuon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scverse%2Fmuon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scverse%2Fmuon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scverse%2Fmuon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scverse","download_url":"https://codeload.github.com/scverse/muon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scverse%2Fmuon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263996091,"owners_count":23541402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anndata","cite-seq","mudata","multi-omics","multimodal-data","multimodal-omics-analysis","muon","scanpy","scatac-seq","scrna-seq","scverse"],"created_at":"2024-08-01T20:00:26.331Z","updated_at":"2025-07-07T01:09:00.804Z","avatar_url":"https://github.com/scverse.png","language":"Python","funding_links":[],"categories":["Multi-omics data management","Ranked by starred repositories"],"sub_categories":["Multi-omics simulation"],"readme":"\u003cimg src=\"./docs/img/muon_header.png\" data-canonical-src=\"./docs/img/muon_header.png\" width=\"700\"/\u003e\n\n`muon` is a multimodal omics Python framework. \n\n[Documentation](https://muon.readthedocs.io/) | [Tutorials](https://muon-tutorials.readthedocs.io/) | [Publication](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-021-02577-8)\n\n[![Documentation Status](https://readthedocs.org/projects/muon/badge/?version=latest)](http://muon.readthedocs.io/?badge=latest)\n[![PyPi version](https://img.shields.io/pypi/v/muon)](https://pypi.org/project/muon)\n[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat\u0026colorA=E1523D\u0026colorB=007D8A)](https://numfocus.org)\n\n## Data structure\n\n`muon` is designed around `MuData` (multimodal data) objects — in the same vein as [scanpy](https://github.com/theislab/scanpy) and [AnnData](https://github.com/theislab/anndata) are designed to work primarily with scRNA-seq data in Python. Individual modalities in `MuData` are naturally represented with `AnnData` objects.\n\n`MuData` class and `.h5mu` files I/O operations are part of [the standalone mudata library](https://github.com/scverse/mudata).\n\n### Input\n\n`MuData` class is implemented in the [mudata](https://github.com/scverse/mudata) library and is exposed in `muon`:\n\n```py\nfrom muon import MuData\n\nmdata = MuData({'rna': adata_rna, 'atac': adata_atac})\n```\n\nIf [multimodal data from 10X Genomics](https://support.10xgenomics.com/single-cell-multiome-atac-gex/software/pipelines/latest/output/overview) is to be read, `muon` provides a reader that returns a `MuData` object with AnnData objects inside, each corresponding to its own modality:\n\n```py\nimport muon as mu\n\nmu.read_10x_h5(\"filtered_feature_bc_matrix.h5\")\n# MuData object with n_obs × n_vars = 10000 × 80000 \n# 2 modalities\n#   rna:\t10000 x 30000\n#     var:\t'gene_ids', 'feature_types', 'genome', 'interval'\n#   atac:\t10000 x 50000\n#     var:\t'gene_ids', 'feature_types', 'genome', 'interval'\n#     uns:\t'atac', 'files'\n```\n\n### I/O with `.h5mu` files\n\nBasic `.h5mu` files I/O functionality is implemented in [mudata](https://github.com/scverse/mudata) and is exposed in `muon`. A `MuData` object represents modalities as collections of `AnnData` objects, and these collections can be saved on disk and retrieved using HDF5-based `.h5mu` files, which design is based on `.h5ad` file structure.\n\n```py\nmdata.write(\"pbmc_10k.h5mu\")\nmdata = mu.read(\"pbmc_10k.h5mu\")\n```\n\nIt allows to effectively use the hierarchical nature of HDF5 files and to read/write AnnData object directly from/to `.h5mu` files:\n\n```py\nadata = mu.read(\"pbmc_10k.h5mu/rna\")\nmu.write(\"pbmc_10k.h5mu/rna\", adata)\n```\n\n## Multimodal omics analysis\n\n`muon` incorporates a set of methods for multimodal omics analysis. These methods address the challenge of taking multimodal data as their input. For instance, while for a unimodal analysis one would use principal components analysis, `muon` comes with a method to run [multi-omics factor analysis](https://github.com/bioFAM/MOFA2):\n\n```py\n# Unimodal\nimport scanpy as sc\nsc.tl.pca(adata)\n\n# Multimodal\nimport muon as mu\nmu.tl.mofa(mdata)\n``` \n\n## Individual assays\n\nIndividual assays are stored as AnnData object, which enables the use of all the default `scanpy` functionality per assay:\n\n```py\nimport scanpy as sc\n\nsc.tl.umap(mdata.mod[\"rna\"])\n```\n\nTypically, a modality inside a container can be referred to with a variable to make the code more concise:\n\n```py\nrna = mdata.mod[\"rna\"]\nsc.pl.umap(rna)\n```\n\n### Modules in `muon`\n\n`muon` comes with a set of modules that can be used hand in hand with scanpy's API. These modules are named after respective sequencing protocols and comprise special functions that might come in handy. It is also handy to import them as two letter abbreviations:\n\n```py\n# ATAC module:\nfrom muon import atac as ac\n\n# Protein (epitope) module:\nfrom muon import prot as pt\n```\n\n---\n\nSome implementation details are noted in [DESIGN.md](./DESIGN.md). \n\n[Contributions](./CONTRIBUTING.md) in the form of [issues](https://github.com/scverse/muon/issues), [pull requests](https://github.com/scverse/muon/pulls) or [discussions](https://github.com/scverse/muon/discussions) are welcome.\n\n## Citation\n\nIf you use `muon` in your work, please cite the `muon` publication as follows:\n\n\u003e **MUON: multimodal omics analysis framework**\n\u003e \n\u003e Danila Bredikhin, Ilia Kats, Oliver Stegle\n\u003e\n\u003e _Genome Biology_ 2022 Feb 01. doi: [10.1186/s13059-021-02577-8](https://doi.org/10.1186/s13059-021-02577-8).\n\nYou can cite the scverse publication as follows:\n\n\u003e **The scverse project provides a computational ecosystem for single-cell omics data analysis**\n\u003e\n\u003e Isaac Virshup, Danila Bredikhin, Lukas Heumos, Giovanni Palla, Gregor Sturm, Adam Gayoso, Ilia Kats, Mikaela Koutrouli, Scverse Community, Bonnie Berger, Dana Pe’er, Aviv Regev, Sarah A. Teichmann, Francesca Finotello, F. Alexander Wolf, Nir Yosef, Oliver Stegle \u0026 Fabian J. Theis\n\u003e\n\u003e _Nat Biotechnol._ 2023 Apr 10. doi: [10.1038/s41587-023-01733-8](https://doi.org/10.1038/s41587-023-01733-8).\n\n\n[//]: # \"numfocus-fiscal-sponsor-attribution\"\n\n`muon` is part of the scverse® project ([website](https://scverse.org), [governance](https://scverse.org/about/roles)) and is fiscally sponsored by [NumFOCUS](https://numfocus.org/).\nIf you like scverse® and want to support our mission, please consider making a tax-deductible [donation](https://numfocus.org/donate-to-scverse) to help the project pay for developer time, professional services, travel, workshops, and a variety of other needs.\n\n\u003cdiv align=\"center\"\u003e\n\u003ca href=\"https://numfocus.org/project/scverse\"\u003e\n  \u003cimg\n    src=\"https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png\"\n    width=\"200\"\n  \u003e\n\u003c/a\u003e\n\u003c/div\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscverse%2Fmuon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscverse%2Fmuon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscverse%2Fmuon/lists"}