MutaTrace — tissue-of-origin from somatic mutations
Cancer genomics · reproducible ML workflow

MutaTrace

Multiclass tissue-of-origin classification from somatic mutation profiles.

A reproducible workflow that assigns a tumour to its tissue of origin — breast, lung, or colorectal — from its somatic mutation profile alone (no imaging, no histology). 90.0% accuracy under 5-fold stratified cross-validation, on 2,098 TCGA patients.

C>AC>GC>TT>AT>CT>G
Observed SBS-96 spectrum — breast carcinoma, TCGA (n≈8,000 SNVs). Bars coloured by substitution class.
90.0%
Accuracy · 5-fold CV
2,098
TCGA patients
450k
Somatic mutations
187
Features per patient
Background
In 3–5% of metastatic cancers, the primary site cannot be identified.

This is Cancer of Unknown Primary (CUP). Treatment is largely selected by tissue of origin, so these cases are hard to manage and carry poor outcomes. The somatic mutation profile is one signal almost always available. MutaTrace frames tissue-of-origin as a supervised classification problem: mutation profile → tissue label.

Data

Whole-exome somatic mutation calls from real tumours.

Input is the TCGA PanCancer Atlas, pulled from the cBioPortal public API — de-identified whole-exome somatic mutation calls. No simulated data.

SourceTCGA PanCancer Atlas 2018, via the cBioPortal REST API
AssayWhole-exome somatic mutation calls (MAF-format variants)
BuildGRCh37 — trinucleotide context fetched from Ensembl
Scale2,098 patients · 450,107 somatic mutations
Breast · 1,009 Lung · 561 Colorectal · 528
One input record · a single somatic mutation
patientTCGA-05-4244 geneKRAS locuschr12:25,398,285 changeC>A  (SNP) effectMissense proteinG12C labelLung · LUAD
≈ 215 such records per patient → one 187-feature vector
cBioPortal API features · gene matrix / TMB / SBS-96 DNABERT context XGBoost SHAP + GPT-4o

Every figure is produced by a numbered script in the repo from this one API — reproducible end-to-end with python scripts/01…08.

Methods

Three feature families, fused per patient.

Each patient is encoded as a 187-dimensional feature vector from three independent signal sources, then classified with gradient-boosted trees (XGBoost).

01 · gene matrix

Driver architecture

Binary mutation status across the top 150 recurrently-mutated genes. Each tissue has a characteristic driver set — the strongest single signal.

APC → colonPIK3CA → breastEGFR → lung
02 · SBS-96

Mutational signatures

Trinucleotide context of each SNV, summarised as the 96-channel substitution spectrum — encodes the mutational process (tobacco, APOBEC, ageing).

C>A = tobaccoCpG C>T = ageing
03 · DNABERT

Sequence context

129 bp around each driver mutation embedded with DNABERT (768-d), reduced to 20 PCs — local sequence context beyond gene identity.

DNABERT · 768-dPCA → 20
Figures
Fig. 1 · Oncoprint Oncoprint of driver-gene mutations across 2,098 tumours
Oncoprint, 2,098 tumours. Each column a patient, each row a driver gene. The black APC block in colorectal, PIK3CA in breast, and EGFR/STK11 in lung are the tissue-specific driver sets the classifier exploits. TTN/MUC16 excluded as long-gene artefacts.
Fig. 2 · SBS-96 spectra SBS-96 mutational signature spectra per cancer type
SBS-96 spectra by tissue. Lung's C>A block is the tobacco signature (SBS4); colorectal's C>T peaks are the ageing/CpG clock (SBS1); breast shows an APOBEC pattern. Trinucleotide context fetched from Ensembl GRCh37.
Fig. 3 · Per-patient inference Per-patient tissue-of-origin inference for three patients
Held-out (out-of-fold) predictions. Tissue-of-origin probabilities for three patients, primary site withheld. Two confident calls; one hard case (right) where the classifier hedges 55/45 and narrowly misses, while the GPT-4o layer flags the BRCA1 truncation the tabular model under-weighted.
Results

90.0% accuracy under 5-fold cross-validation.

Stratified 5-fold CV on 2,098 patients. Somatic mutations alone place a tumour to tissue without clinical, imaging, or expression data.

90.0%
overall accuracy · macro-F1 89.7%
random baseline 33% · majority-class baseline 48%
Breast · BRCA
0.91
P 0.87 · R 0.95 · n=1009
Lung · LUAD
0.85
P 0.93 · R 0.79 · n=561
Colorectal · COAD
0.93
P 0.94 · R 0.92 · n=528 — cleanest class; APC truncation + high burden
Confusion · 5-fold CV Confusion matrix of tissue-of-origin predictions
Lung's lower recall reflects its heterogeneity — EGFR-mutant, KRAS-mutant, and driver-wildtype subgroups; the last is genuinely hard from mutations alone.
Implementation
DatacBioPortal API · TCGA PanCancer Atlas
SequenceEnsembl GRCh37 REST
Foundation modelDNABERT (6-mer, 768-d)
ClassifierXGBoost · 300 trees
ExplainabilitySHAP · UMAP
ReasoningGPT-4o · LangGraph
Features187 · genes + TMB + SBS + DNA-PCs
Validation5-fold stratified CV
Limitations & honesty

What it is — and what it is not.

Tissue-of-origin classification is a well-established problem with substantial prior work. MutaTrace makes no novelty claim — its value is a clean, interpretable, fully reproducible end-to-end build on public data, not a new method.

No leakage in the demo. Per-patient probabilities are out-of-fold — each patient scored by a model that never trained on them.

Curated drivers. TTN and MUC16 excluded — long genes that masquerade as drivers by mutation count.

Interpretable by construction. SHAP attributes each call to genes and signatures; GPT-4o writes the rationale.

Real patient tumours. TCGA PanCancer Atlas, de-identified and public — not simulated data.

Three tissues, not thirty-three. A proof of concept; the architecture is class-agnostic and extends to the full TCGA panel.

Mutations only. Adding copy-number, expression, and methylation — plus an independent hold-out cohort — is the path to clinical grade.