MuTopia learns topographic models of somatic mutation: it simultaneously decomposes a cohort’s mutation counts into distinct processes (signatures) and explains how local genomic context shapes each signature’s activity across the genome.
Documentation
Full documentation, API reference, and tutorials are at sigscape.github.io/MuTopia.
The site includes step-by-step tutorials covering every part of the package:
Building a G-Tensor from genomic feature tracks and VCFs
Analyzing G-Tensors (slicing, feature management, region queries)
Training topographic models (single-fit and Optuna hyperparameter studies)
Analyzing trained models (component plots, SHAP, marginal predictions)
Genome-browser plotting (composable track views over any region)
System requirements
Software dependencies
Python 3.11 (pinned for scikit-learn==1.4.2)
See setup.cfg for the complete pinned dependency list.
CLI bioinformatics tools (auto-installed via Docker / bioconda): bedtools, bcftools, tabix, samtools, UCSC bigWigAverageOverBed.
Tested on
macOS
Linux (x86_64)
Hardware
MuTopia runs on CPU hardware — no GPU required. Training a 15-component model on a cohort of ~200 WGS samples uses ~8 GB RAM with default settings; inference and annotation use <4 GB.
Installation
MuTopia requires Python 3.11 due to a pinned scikit-learn dependency (1.4.2) used for fast gradient-boosted tree training.
With Docker (zero setup) — ~2 minutes:
docker pull allenlynch/mutopia:latest
docker run --rm -v "$PWD":/workspace allenlynch/mutopia:latest gtensor --help
With conda / bioconda — 2–4 minutes:
MuTopia is published on bioconda, which pulls in the bioinformatics tool dependencies (bedtools, bcftools, tabix, samtools) automatically:
conda create -n mutopia -c conda-forge -c bioconda -y python=3.11 mutopia
conda activate mutopia
With uv (you must install bioinformatic dependencies separately) — under 30 seconds:
# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv --python 3.11 .venv
source .venv/bin/activate
uv pip install mutopia
Verify the CLI tools are on your PATH:
gtensor --help
topo-model --help
mutopia --help
Demo
The fastest way to see MuTopia in action is to apply a pre-trained model to a sample VCF. The annotate-vcf command infers which topographical mutational processes are active in your sample and annotates each mutation with its most likely generating process.
Note: this is just an example VCF; the results aren’t biologically meaningful.
docker pull allenlynch/mutopia:latest
TUMOR_TYPE="Liver-HCC"
FASTA="path/to/hg38.fasta"
ZENODO="https://zenodo.org/records/18803136/files"
MODEL=${TUMOR_TYPE}.model.pkl
DATA=${TUMOR_TYPE}.nc
wget ${ZENODO}/${MODEL}
wget ${ZENODO}/${DATA}
wget ${ZENODO}/${DATA}.regions.bed
VCF=CHC197.sample.hg38.vcf.gz
wget -O ${VCF} https://github.com/sigscape/MuTopia/releases/download/v1.0.5/CHC197.sample.hg38.vcf.gz
docker run --rm -v "$PWD":/workspace allenlynch/mutopia:latest \
topo-model setup ${MODEL} ${DATA} ${TUMOR_TYPE}.setup.nc -@ 4
docker run --rm -v "$PWD":/workspace -v "$(dirname ${FASTA})":/fasta allenlynch/mutopia:latest \
mutopia-sbs annotate-vcf ${MODEL} ${TUMOR_TYPE}.setup.nc ${VCF} --no-pass-only --no-cluster -fa /fasta/$(basename ${FASTA}) -w VAF -o annotated.vcf
Expected output: annotated.vcf is a copy of the input VCF with new INFO fields per record giving the most likely component (signature) for that mutation and its posterior probability.
Expected run time: ~2–3 minutes end-to-end (annotation itself ~30 seconds; the rest is the one-time G-Tensor download).
Instructions for use
To run on your own data:
Annotate a VCF with a pre-trained model — follow the demo above, replacing CHC197.sample.hg38.vcf.gz with your VCF and choosing the tumor-type-matched model from the Zenodo repository.
Train a new model on your cohort — see Tutorials 1-3 for the end-to-end workflow (build G-Tensor → split → train → score).
Analyze a trained model — see Tutorial 4 for signature plots, SHAP feature attribution, and marginal predictions. See Tutorial 5 for genome-browser visualizations.
Preprint
Lynch AW, et al. (2026). Topographical archetypes of somatic mutagenesis in cancer.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mutopia-1.0.9.tar.gz.
File metadata
- Download URL: mutopia-1.0.9.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b3ddfaec3bc81bb620ae6cbd871ac17aeea100c09b5ba0726795a697cc8c7ce
|
|
| MD5 |
76715c706d38756af56f9d86fd6c8709
|
|
| BLAKE2b-256 |
60e2e03597401f76e82ec71cf1594fe2da8daad7e12b688b3a625ac66da4628b
|
Provenance
The following attestation bundles were made for mutopia-1.0.9.tar.gz:
Publisher:
publish.yml on sigscape/MuTopia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mutopia-1.0.9.tar.gz -
Subject digest:
0b3ddfaec3bc81bb620ae6cbd871ac17aeea100c09b5ba0726795a697cc8c7ce - Sigstore transparency entry: 2369790304
- Sigstore integration time:
-
Permalink:
sigscape/MuTopia@d42132a479550e583c01a1cfd66e88c53bd406ab -
Branch / Tag:
refs/tags/v1.0.9 - Owner: https://github.com/sigscape
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d42132a479550e583c01a1cfd66e88c53bd406ab -
Trigger Event:
push
-
Statement type:
File details
Details for the file mutopia-1.0.9-py3-none-any.whl.
File metadata
- Download URL: mutopia-1.0.9-py3-none-any.whl
- Upload date:
- Size: 346.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7124f30ab9a858aa6b8853742df0e51dfd3ac0f8c686810a61063a1df44bfebf
|
|
| MD5 |
55a2f6d16892dbc0936114731c3956cd
|
|
| BLAKE2b-256 |
ebd2c048a4cf1d2a6adb53038e0cf3efd68693f8adb35a69c8eac43b2a52a092
|
Provenance
The following attestation bundles were made for mutopia-1.0.9-py3-none-any.whl:
Publisher:
publish.yml on sigscape/MuTopia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mutopia-1.0.9-py3-none-any.whl -
Subject digest:
7124f30ab9a858aa6b8853742df0e51dfd3ac0f8c686810a61063a1df44bfebf - Sigstore transparency entry: 2369790349
- Sigstore integration time:
-
Permalink:
sigscape/MuTopia@d42132a479550e583c01a1cfd66e88c53bd406ab -
Branch / Tag:
refs/tags/v1.0.9 - Owner: https://github.com/sigscape
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d42132a479550e583c01a1cfd66e88c53bd406ab -
Trigger Event:
push
-
Statement type: