Skip to main content

Matilda: Multi-task learning from single-cell multimodal omics


Matilda is a multi-task framework for learning from single-cell multimodal omics data. Matilda leverages the information from the multi-modality of such data and trains a neural network model to simultaneously learn multiple tasks including data simulation, dimension reduction, visualization, classification, and feature selection.

For more details, please check out our publication.


This repository packages Matilda as a Python package (pip install matilda-sc, import matilda) and an R package, wrapping the unchanged published engine, with documentation and runnable Colab tutorials.

Install

Python (import name matilda; PyPI distribution matilda-sc):

pip install matilda-sc

R (Python is provisioned automatically by basilisk, so you never install or manage it):

remotes::install_github("PYangLab/Matilda", subdir = "matilda-r")

Two interfaces, one engine

Matilda ships as a Python package (import matilda) and an R package (matilda, operating on a SingleCellExperiment). Both call the same engine, so on the same hardware they give the same result. Pick the interface that matches your workflow; see the documentation for both APIs and full tutorials.

Quickstart (Python)

Work with in-memory AnnData (or arrays, or file paths) and get results back as objects. After train, there is one verb per task: classify / reduce / markers / simulate.

import matilda

# rna/adt/atac: AnnData | ndarray | scipy.sparse | path | None
# labels: a vector, an `.obs` column name, or a .csv path (string or numeric labels)
fit = matilda.train(rna, adt=adt, atac=atac, labels="cell_type")

res = matilda.classify({"rna": q_rna, "adt": q_adt, "atac": q_atac},
                       model=fit, query_labels=q_labels)
res.predictions        # DataFrame: cell_id, real, predicted, probability
res.celltype_accuracy  # DataFrame: celltype, accuracy, n

lat = matilda.reduce({"rna": rna, "adt": adt, "atac": atac}, model=fit)                        # lat.latent
mk  = matilda.markers({"rna": rna, "adt": adt, "atac": atac}, model=fit, labels="cell_type")   # mk.markers
sim = matilda.simulate({"rna": rna, "adt": adt, "atac": atac}, model=fit, celltype="B.Naive", n=200, labels="cell_type")  # sim.simulated

The modality combination is inferred automatically (RNA only, RNA+ADT for CITE-seq, RNA+ATAC for SHARE-seq, all three for TEA-seq). classify reconciles features automatically: if the query is missing some of the model's features it takes the per-modality reference intersection (real values, no zero-padding), retrains, and classifies; res.retrained / res.common_features report what happened. See the Quickstart and API reference for the full surface.

Citation

If you use Matilda, please cite the Matilda paper

Liu C, Huang H, Yang P. Multi-task learning from multimodal single-cell omics with Matilda. Nucleic Acids Research, 51(8), e45 (2023). https://doi.org/10.1093/nar/gkad157

(see the Citation page).

Metadata

Release files for matilda-sc 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for matilda-sc 0.2.2
File Size Uploaded Provenance Actions
matilda_sc-0.2.2.tar.gz 35.8 kB Without provenance Details for matilda_sc-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for matilda-sc 0.2.2
File Interpreter ABI Platform Actions
matilda_sc-0.2.2-py3-none-any.whl Python 3 none any Details for matilda_sc-0.2.2-py3-none-any.whl

Total release size: 77.6 kB

Release files / matilda_sc-0.2.2.tar.gz

Download URL matilda_sc-0.2.2.tar.gz
Size 35.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f6f2aa5fb207b96366e7f98f5bf8b77ac59d7e258e885eaf4a49c4af85783dc9
BLAKE2b-256 checksum
How to use checksums
8a01833c8536c625b004ee25dc259a367cf4ea08b7ab3de2955b6895f637a590
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / matilda_sc-0.2.2-py3-none-any.whl

Download URL matilda_sc-0.2.2-py3-none-any.whl
Size 41.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f4873d8d2c8c057d4ea3d06255b956fe7999874e42aa2631faa64d9acb37a15
BLAKE2b-256 checksum
How to use checksums
0feccfc4780e2ae8bf07d1ed878ee485ed2fe3afd0209ae6905f2e47081bd213
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Security for matilda-sc 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page