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.18.tar.gz (55.3 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.18-py3-none-any.whl (49.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scmidas-0.1.18.tar.gz
  • Upload date:
  • Size: 55.3 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.18.tar.gz
Algorithm Hash digest
SHA256 399ab24c2a578628359929aafb454db3126348d84a9672d3db8d6c478f9850dd
MD5 49bcaf2d5285dace629ac554fea79f71
BLAKE2b-256 f7e2cf5d064c5da386710350de4eceb00182a497b1ff750053b3e7314ab23201

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scmidas-0.1.18-py3-none-any.whl
  • Upload date:
  • Size: 49.5 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.18-py3-none-any.whl
Algorithm Hash digest
SHA256 590ab58cd8c35012cc9284234fad77a694c8719e3ad5bbe5ed5b03ba7251ee01
MD5 7c3959281e6eececfb276d0bb38d4f74
BLAKE2b-256 66a5b0dfd7fc19c2e8fe3577affa09dfb465879b59455b4b9bddbab9a6a0f6f5

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