Skip to main content

A torch-based integration method for single-cell multi-omic data.

Project description

MIDAS

MIDAS Logo

MIDAS turns raw mosaic single-cell multimodal data into imputed, batch-corrected matrices and disentangled latent representations.

CI Status PyPI version Documentation Status License GitHub Stars

Documentation: scmidas.readthedocs.io

Key features

  • Mosaic integration — handle datasets where different batches measure different modality combinations (e.g. some batches have RNA + ATAC, others only RNA).
  • Multi-modal support — RNA, ADT, ATAC out of the box; configurable for additional modalities.
  • Imputation — fill in missing modalities with model-derived values.
  • Batch correction — remove technical variation across batches.
  • Knowledge transfer — fine-tune a pre-trained reference model on a query dataset.
  • Multi-GPU training — built on PyTorch Lightning, with DDP support for mosaic data.
  • TensorBoard integration — live training loss and UMAP visualisations.

Installation

conda create -n scmidas python=3.12
conda activate scmidas
pip install scmidas

Quick start

The MIDAS workflow is four calls. The snippet below is an API sketch — replace ... with your data and refer to the tutorials for runnable end-to-end examples.

from scmidas.config import load_config
from scmidas.model import MIDAS

# 1. Build a model bound to a mosaic dataset.
#    Input is either a directory of per-batch MTX matrices, or a MuData
#    object via MIDAS.configure_data_from_mdata(...).
model = MIDAS.configure_data_from_dir(load_config(), ..., transform={'atac': 'binarize'})

# 2. Train.
model.train(max_epochs=2000)

# 3. Predict — latent embeddings (z_c, z_u) and imputed counts per batch.
pred = model.predict()

# 4. (Optional) UMAP of the integrated latent space.
model.get_emb_umap()

Reproducibility

Code and data to reproduce the results in the paper live on the reproducibility branch.

Citation

If you use MIDAS in your research, please cite:

@article{he2024mosaic,
  title   = {Mosaic integration and knowledge transfer of single-cell multimodal data with {MIDAS}},
  author  = {He, Zhen and Hu, Shuofeng and Chen, Yaowen and An, Sijing
             and Zhou, Jiahao and Liu, Runyan and Shi, Junfeng and Wang, Jing
             and Dong, Guohua and Shi, Jinhui and Zhao, Jiaxin and Ou-Yang, Le
             and Zhu, Yuan and Bo, Xiaochen and Ying, Xiaomin},
  journal = {Nature Biotechnology},
  volume  = {42},
  number  = {10},
  pages   = {1594--1605},
  year    = {2024},
  doi     = {10.1038/s41587-023-02040-y},
  publisher = {Nature Publishing Group}
}

Contributing

Bug reports and feature requests: please open a GitHub issue. For code contributions, branch from main, make sure pytest tests/ passes, and open a pull request — for non-trivial changes, an issue first to discuss the design is appreciated.

License

MIT.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scmidas-0.1.19.tar.gz (55.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scmidas-0.1.19-py3-none-any.whl (50.0 kB view details)

Uploaded Python 3

File details

Details for the file scmidas-0.1.19.tar.gz.

File metadata

  • Download URL: scmidas-0.1.19.tar.gz
  • Upload date:
  • Size: 55.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for scmidas-0.1.19.tar.gz
Algorithm Hash digest
SHA256 b3b989daf14657d3db597de4f2d9563bc529d2fdf9615747ed61093dc2607670
MD5 674cbe324f7f0b9f36208487077e0bf6
BLAKE2b-256 a3de96f130c6c1daf140a0ceef0089c976efd9fe560ddca6da7fa050fcddc68d

See more details on using hashes here.

File details

Details for the file scmidas-0.1.19-py3-none-any.whl.

File metadata

  • Download URL: scmidas-0.1.19-py3-none-any.whl
  • Upload date:
  • Size: 50.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for scmidas-0.1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 9ce78e74e8b0efa4a0e63da8582453e9d11222f35df2243433c49fbe70c1fbbd
MD5 0d61489443cd31558c37cd1a7d697422
BLAKE2b-256 510c01dd46881bcdf7b142c5acb5355d932e5d2fab6d582578bb1c54a83d86f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page