Skip to main content

customics_logo

CustOmics: a versatile deep-learning based strategy for multi-omics integration

PyPI version Downloads documentation Build License uv Ruff

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 / evaluate API.
  • 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")

[!NOTE] See this usage section for more details about usage.

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}
}

Download files

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

Source Distribution

customics-0.1.2.tar.gz (25.7 kB view details)

Uploaded Source

Built Distribution

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

customics-0.1.2-py3-none-any.whl (37.3 kB view details)

Uploaded Python 3

File details

Details for the file customics-0.1.2.tar.gz.

File metadata

  • Download URL: customics-0.1.2.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.20

File hashes

Hashes for customics-0.1.2.tar.gz
Algorithm Hash digest
SHA256 74ab44bcb43c9250594ae29b11e9c0e276e1cfc58113343a4283a07b60e4f357
MD5 6d3de5717a7b5b62aabb48de2fa4412a
BLAKE2b-256 c0f089a2939218bbbf591f62619251b5101f62d4ba22e4f594f7477f074f8dea

See more details on using hashes here.

File details

Details for the file customics-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: customics-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 37.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.20

File hashes

Hashes for customics-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 186226e8b48082162676a4ada69ac68e2fc15f5c53dd1b125e4fab3ce258e3c7
MD5 f8262b89e5c746212518426254621a04
BLAKE2b-256 e2e5182f0503425f9a40cc3cceb020399bb7227a070da1c3af39d4c823677a14

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

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