CustOmics: a versatile deep-learning based strategy for multi-omics integration
Integrate RNA-seq, CNV, DNA methylation, and more into a single predictive model.
customics is a Python package for integrating multiple genomic data modalities using a hierarchical deep-learning architecture. It supports classification, survival outcome prediction, and SHAP-based explainability — all in a single scikit-learn-style API, built on MuData from scverse.
Documentation
Check customics's documentation to get started. It contains installation explanations, API details, and tutorials.
Installation
customics can be installed from PyPI on all OS, for any Python version >=3.12:
pip install customics
Features
- Multi-omics integration — a hierarchical architecture (per-source autoencoders feeding a central VAE) that fuses heterogeneous, high-dimensional modalities into a shared latent space.
- Built-in tasks — tumor classification and survival prediction (Cox), with one scikit-learn-style
fit/predict/evaluateAPI. - Explainability — per-source feature attribution via SHAP.
- Visualization — latent-space projection (UMAP) and Kaplan-Meier survival stratification out of the box.
Usage
import customics
from customics import CustOMICS
# --- 1. Load and prepare data ---
# toy_dataset() returns a MuData object: one modality per omics source,
# with clinical annotations in `.obs`.
mdata = customics.toy_dataset()
customics.prepare_input(
mdata,
label="PAM50", # classification target column
event="OS", # survival event column (0/1)
surv_time="OS.time", # survival time column
)
# --- 2. Instantiate the model ---
# Each config dict tunes one component. See the configuration reference for the
# full schema: https://prism-oncology.github.io/customics/hyperparameter_tuning/
model = CustOMICS(
source_params=source_params,
central_params=central_params,
classif_params=classif_params,
surv_params=surv_params,
train_params=train_params
)
# --- 3. Train ---
model.fit(mdata, batch_size=32, n_epochs=30, verbose=True)
# --- 4. Evaluate ---
metrics = model.evaluate(mdata, task="classification") # Accuracy, F1, AUC, …
ci = model.evaluate(mdata, task="survival") # concordance index
# --- 5. Visualise & explain ---
model.plot_loss()
model.plot_representation(mdata, color="PAM50")
model.stratify(mdata, show=True)
model.explain(sample_ids, mdata, source="rna", subtype="Her2")
Reproducing Paper Results
Download TCGA data from the GDC Data Portal or cBioPortal. Pre-computed 5-fold CV splits for BRCA, LUAD, UCEC, BLCA, GBM, OV, and PANCAN are included in the data/splits/ directory.
See our documentation for a complete end-to-end walkthrough using the bundled toy dataset.
Citation
If you use customics in your research, please cite:
@article{benkirane2023,
doi = {10.1371/journal.pcbi.1010921},
author = {Benkirane, Hakim AND Pradat, Yoann AND Michiels, Stefan AND Cournède, Paul-Henry},
journal = {PLOS Computational Biology},
publisher = {Public Library of Science},
title = {CustOmics: A versatile deep-learning based strategy for multi-omics integration},
year = {2023},
month = {03},
volume = {19},
pages = {1--19},
number = {3}
}
Metadata
Release files for customics 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| customics-0.1.2.tar.gz | 25.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| customics-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 63.0 kB
Release files / customics-0.1.2.tar.gz
| Download URL | customics-0.1.2.tar.gz |
|---|---|
| Size | 25.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74ab44bcb43c9250594ae29b11e9c0e276e1cfc58113343a4283a07b60e4f357
|
|
BLAKE2b-256 checksum How to use checksums |
c0f089a2939218bbbf591f62619251b5101f62d4ba22e4f594f7477f074f8dea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.20
|
Release files / customics-0.1.2-py3-none-any.whl
| Download URL | customics-0.1.2-py3-none-any.whl |
|---|---|
| Size | 37.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
186226e8b48082162676a4ada69ac68e2fc15f5c53dd1b125e4fab3ce258e3c7
|
|
BLAKE2b-256 checksum How to use checksums |
e2e5182f0503425f9a40cc3cceb020399bb7227a070da1c3af39d4c823677a14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.5.20
|
Security for customics 0.1.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.