M3
M3 is a deep generative framework for condition-aware integration, patient-level inference, and multi-resolution interpretation of multimodal single-cell omics data across many biological conditions and samples.
From one shared, condition-aware representation, M3 delivers six downstream tasks: factorised dimension reduction, condition-aware batch correction, mosaic integration + imputation, patient-level condition inference, patient/sample generation, and multi-resolution attribution.
📖 Documentation & tutorials: https://pyanglab.github.io/M3/
Install
Python
pip install m3-sc # imported as `import m3`
PyTorch comes along automatically. If you need a build matched to a specific CUDA version, install it first and pip will keep it:
pip install torch --index-url https://download.pytorch.org/whl/cu121
pip install m3-sc
For the development version: pip install "git+https://github.com/PYangLab/M3.git".
R
install.packages("remotes")
remotes::install_github("PYangLab/M3", subdir = "m3-r")
The R package provisions its own Python engine through basilisk on first use — no manual Python / PyTorch setup, and R and Python produce identical results.
Quickstart (Python)
import m3
data = m3.datasets.liu_demo() # built-in demo
model = m3.M3(data, condition_keys=["cond_group"],
celltype_key="mergedcelltype").train()
emb = model.embedding(part="bio") # integrated embedding
Repository layout
| Path | What |
|---|---|
src/m3/ |
the m3-sc Python package (PyTorch engine vendored under _engine/) |
m3-r/ |
the R package — library(m3), basilisk-wrapped, same engine |
website/ |
documentation site (MkDocs Material); mkdocs serve -f website/mkdocs.yml |
.github/workflows/deploy.yml |
builds + publishes the docs to GitHub Pages |
tests/ |
Python test suite |
License
See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file m3_sc-0.3.0.tar.gz.
File metadata
- Download URL: m3_sc-0.3.0.tar.gz
- Upload date:
- Size: 29.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8fef113f5e7131cfd1deea49d35658be708e0f18f753ba6389c544ea5e75141
|
|
| MD5 |
8e7799f30887cd40e296d52d2f24d6b3
|
|
| BLAKE2b-256 |
679b5f1b0ca76c80c1654bf5b8aef4809a51d1a5452f2a7be96fd66de21a244d
|
Provenance
The following attestation bundles were made for m3_sc-0.3.0.tar.gz:
Publisher:
publish.yml on PYangLab/M3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
m3_sc-0.3.0.tar.gz -
Subject digest:
e8fef113f5e7131cfd1deea49d35658be708e0f18f753ba6389c544ea5e75141 - Sigstore transparency entry: 2242659899
- Sigstore integration time:
-
Permalink:
PYangLab/M3@54c642039209d8339add68f56ccb7662f51df584 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/PYangLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54c642039209d8339add68f56ccb7662f51df584 -
Trigger Event:
push
-
Statement type:
File details
Details for the file m3_sc-0.3.0-py3-none-any.whl.
File metadata
- Download URL: m3_sc-0.3.0-py3-none-any.whl
- Upload date:
- Size: 29.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9382e23cd08e75c224ea117186800779980dff37a492a3779eb37d3171f5e59
|
|
| MD5 |
89493e4a50ae6c240ce3b3a43c8329af
|
|
| BLAKE2b-256 |
274bfeb896356857c754548aed3733f80cb447f30180ed0529ce180bde8bbce3
|
Provenance
The following attestation bundles were made for m3_sc-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on PYangLab/M3
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
m3_sc-0.3.0-py3-none-any.whl -
Subject digest:
d9382e23cd08e75c224ea117186800779980dff37a492a3779eb37d3171f5e59 - Sigstore transparency entry: 2242660132
- Sigstore integration time:
-
Permalink:
PYangLab/M3@54c642039209d8339add68f56ccb7662f51df584 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/PYangLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54c642039209d8339add68f56ccb7662f51df584 -
Trigger Event:
push
-
Statement type: