The sample explorer
Drop one tumor's VCF or MAF (hg38) and open Sample explorer. The report fills in from the page in about a second, after a one-time load of the model's genome-wide rates (10–19 MB). The placing runs in a background worker, so the page stays responsive; closing the tab stops it.
The engine, and how close it is
Each SNV gets a posterior over the MuTopia model's components: the component's spectrum at the mutation's channel times its rate at the mutation's 10 kb locus, the rates taken from the trained model genome-wide and normalized over loci. Exposures are the mixture weights by EM (sigscape-core's em_mixture). Strand and each locus's trinucleotide make-up are left out.
That is an approximation, and the exact model runs on the runner (the MuTopia function, mutopia-sbs annotate-vcf). It was gated against the exact model twice:
- Gate 1, exploratory, on 151 PCAWG tumors (about ten per model, lifted to hg38, plus two breast genomes), scored on the split components. Seven models passed. A look at the failures afterwards showed that most of the disagreement lay between components that share a spectrum and differ only in topography.
- Gate 2, pre-registered, on 147 new tumors (none from gate 1 by aliquot; one prostate aliquot shares its donor with a gate 1 tumor, and its model passes without it; ten per model, Bladder-TCC's seven), scored on groups of components whose spectra agree at cosine 0.8 or more (complete linkage within a model). The hypothesis, the rule, the groups, the tumor list and the engine were fixed and written down before the first run.
The rule: a model passes when every tumor has a grouped exposure correlation of at least 0.85 and the same component group on at least 60% of its mutations. The pins: sigscape-core 0.6.0, sigscape_wasm_bg.wasm sha256 358d178ae4d83c51e0795f754f0fb8468f8db7053f2318ea92d4b82fc7d50076; the engine lib/explorer/engine.ts sha256 8c4dc8969e41f4f6a707a24d9a831e5f41c7b7b261f1c68cd1a3258ed2b2f717; the groups sha256 64393b1c2e22d978f22b247bcd328f853f3a13b42a42a5b49367d3f5dc49ca18; the scorer scripts/validate/explorer.ts at sigscape-client commit 1381cf9. Eleven models pass:
| Model | Tumors (not in training) | Same group per mutation, median (range) | Grouped exposure correlation, median (range) | Same component (split), median (range) | Split correlation, median (range) | Tumors below the bar | In the page | |---|---|---|---|---|---|---|---| | Breast-All | 10 (10) | 85% (76–94%) | 0.98 (0.94–1.00) | 84% (73–92%) | 0.97 (0.94–1.00) | 0 | yes | | ColoRect-AdenoCA | 10 (1) | 86% (76–94%) | 0.98 (0.97–0.99) | 86% (76–93%) | 0.98 (0.97–0.99) | 0 | yes | | Eso-AdenoCA | 10 (0) | 79% (73–88%) | 0.93 (0.86–0.99) | 77% (70–87%) | 0.92 (0.82–0.98) | 0 | yes | | Head-SCC | 10 (0) | 84% (72–92%) | 0.94 (0.92–0.98) | 84% (72–92%) | 0.95 (0.91–0.98) | 0 | yes | | Liver-HCC | 10 (0) | 71% (62–93%) | 0.94 (0.85–0.99) | 70% (51–93%) | 0.89 (0.43–0.99) | 0 | yes | | Lung-All | 10 (0) | 86% (75–90%) | 0.99 (0.95–1.00) | 80% (64–86%) | 0.96 (0.89–0.98) | 0 | yes | | Ovary-AdenoCA | 10 (0) | 85% (71–91%) | 0.98 (0.91–0.99) | 81% (56–91%) | 0.95 (0.78–0.98) | 0 | yes | | Panc-AdenoCA | 10 (0) | 85% (70–99%) | 0.99 (0.91–1.00) | 85% (68–99%) | 0.99 (0.91–1.00) | 0 | yes | | Prost-AdenoCA | 10 (2) | 76% (64–100%) | 0.92 (0.86–1.00) | 76% (61–100%) | 0.93 (0.78–1.00) | 0 | yes | | Skin-Melanoma | 10 (0) | 87% (78–97%) | 0.99 (0.96–1.00) | 86% (78–97%) | 0.99 (0.95–1.00) | 0 | yes | | Stomach-AdenoCA | 10 (0) | 86% (70–94%) | 0.97 (0.92–0.99) | 85% (63–94%) | 0.95 (0.81–0.98) | 0 | yes | | Bladder-TCC | 7 (0) | 78% (31–97%) | 0.93 (0.32–0.99) | 78% (30–97%) | 0.94 (0.23–0.99) | 2 | runner only | | Cervix-All | 10 (0) | 80% (71–94%) | 0.92 (0.59–0.99) | 79% (66–94%) | 0.87 (0.53–0.98) | 4 | runner only | | Kidney-All | 10 (1) | 78% (64–93%) | 0.94 (0.80–0.99) | 71% (55–93%) | 0.89 (0.60–0.98) | 2 | runner only | | Uterus-AdenoCA | 10 (2) | 80% (52–93%) | 0.98 (0.83–1.00) | 74% (48–93%) | 0.84 (0.34–0.99) | 1 | runner only |
Over all 147 tumors the median grouped agreement is 83% and the median grouped exposure correlation 0.97 (split: 81% and 0.95). Bladder-TCC, Cervix-All, Kidney-All and Uterus-AdenoCA are listed as runner only and point to the MuTopia function.
What the split columns say beside the gate: grouping is what carries Liver-HCC, Ovary-AdenoCA, Eso-AdenoCA, Prost-AdenoCA and Stomach-AdenoCA, none of which would pass on split components. Breast-All passes even the split rule, on ten tumors its model was not trained on (worst correlation 0.94, worst agreement 73%); the page reports it by group all the same, because the rule is one rule for every model. Bladder-TCC is the honest case against post hoc grouping: on gate 1, grouping its components fixed its one failing tumor after the fact; on the new tumors two of seven fail with the groups too (worst grouped correlation 0.32, agreement 31%). That is why the rule was pre-registered before the second set was run.
Most gated tumors were in the training set of the model they were scored against: MuTopia's models were trained on nearly every PCAWG tumor of their type. The 16 that were not (the ten breast tumors, two prostate, two uterus, one kidney, one colorectal) agree at least as well: grouped correlation median 0.98 (0.94–1.00) against 0.97 for the trained ones, grouped agreement 85% against 82%. The gate compares the engine with the exact model on the same tumor, so it measures the approximation, not how well a model fits a new tumor. The explorer prints the chosen model's own figures beside every result.
The report
- Processes, by spectrum group: each group's share and expected mutations, with its topotype. A group of several components (SBS2-A + SBS2-B, the two forms of SBS8, Bsig3 + Bsig10) is one row: the engine passed its gate on groups, so that is what it reports. When MuTopia's exact run exists for these records and this model, the row also prints the split within the group, named as the exact run's.
- Topotype fingerprint: the sample's mutations by the eight MuTopia topotypes. A group whose forms differ in topotype is shown as "forms not split in the page" until the exact run resolves it.
- Process states, from the exact run on the runner: for processes MuTopia splits by topography (SBS8 into a canonical and a StressD form, APOBEC into CanAPOBEC and RepAPOBEC in breast), the split, from at least 50 mutations between the two forms, with what the split indicated in the MuTopia study. The two forms share a spectrum, so the in-page engine does not split them; the explorer reads the split from the MuTopia function's run on the same records (the newest finished one with this model, or the one chosen there) and offers to run MuTopia as the step below when there is none.
- Observed over expected in 1 Mb windows: the model's expected density for this sample (the engine's fitted mixture of locus rates) against the observed count. A window is in excess when its Poisson upper tail is below 0.01 divided by the number of windows. An excess is a cluster or a copy-number gain; without a copy-number table the two look alike.
- Each mutation's process, by group, filterable by position, and the full table of posteriors over groups as TSV.
The recipe names the model, the tracks, the groups file and that components are reported by group, and lists both the group and the component exposures.
Models in the page
Packed: the eleven models that passed the pre-registered gate (10–19 MB each, loaded only when chosen). A model is packed by exporting its rates and component spectra from the trained model (mutopia.analysis.annot_component_rates and annot_components, about four minutes) and sigscape-reference/evaluate/pack_tracks.py; evaluate/explorer_gate_runs.py runs a gate, scripts/validate/explorer.ts scores it, and scripts/reference/explorer-gate.mjs writes the page's gate.json, index.json and groups.json from the score. The next step for the four runner-only models is strand in the engine, developed on gate 1's tumors and gated again on a fresh set under its own pre-registration.
Same spectrum, different topography
Within a model, components whose spectra are nearly the same can act in different parts of the genome. Of 40 pairs at spectrum cosine ≥ 0.8 across eleven models, 25 have genome-wide rates correlated below 0.5. Breast's two APOBEC forms (SBS2-A and SBS2-B) have spectra at cosine 0.91 and rates anti-correlated at −0.71; melanoma's SBS7a and SBS7b, 0.83 and −0.25. A spectrum alone would merge them; their topography keeps them apart. Pairs like lung's SBS4 and SBS18 (0.98 and 0.87) are alike in both. These are the groups the explorer reports by, and the reason the split within one is left to the exact model.