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.11:

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 (t-SNE) 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.1.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.1-py3-none-any.whl (37.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: customics-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 721250e3843d5c1d4fbf09d467ab8a06b72bb4d04ca6c464676071a620295548
MD5 a3ae96d09be455a09ea2d2323deff520
BLAKE2b-256 70142e2d08b1baa367c33c7eec793c931b1525e69dd5b0f9ca3f9a2fe7eda41f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: customics-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90932b7cc88d014ea55c05ced9b04f7d3077d57ae8f30ba2d5620cfe2a18b90a
MD5 9c7e15f34b740d93a02e148f29048da8
BLAKE2b-256 1bb6831fdf04edc0d2aff8d0e73ea0dce4e1377cf901b6a6af2bcd90105c37e7

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

2 files

This release

0.1.1 This release

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