Utilities, share links and recipes
Four functions run in the page with nothing installed, on spectra, signature sets and exposure tables. Each one gives three things back: a link that reopens the view, a recipe that reproduces its numbers, and its plots as one SVG.
Compare spectra
Every pair of spectra gets its cosine and, beside it, what two draws of one process would give at the pair's mutation counts. The draws are multinomial samples from the pooled profile, 1,000 per pair. A cosine at or above the 5th percentile of those draws is within noise: at these counts the two cannot be told apart. Below it, they differ.
On PCAWG genomes: a 500-mutation subsample of a 45,211-mutation genome has cosine 0.993 with its parent, against a 5th percentile of 0.989, so it reads within noise, as it should. Two different genomes at 45,211 and 24,022 mutations have cosine 0.071, where draws of one process stay above 0.999.
The pair in focus shows both spectra overlaid and the difference per channel, against a band of two standard deviations of what noise alone gives at these counts. About 4 of 96 channels leave their band by chance.
Proportions (signatures, normalized spectra) have no counts to resample, so they get a cosine and no noise call.
Signature diff
Two signature sets are matched one to one by the Hungarian algorithm on 1 − cosine. A matched pair below the threshold (0.8 by default) is not a match. The second set is another record or any catalog the studio knows, so a de novo run can be held against COSMIC directly. Signatures without a match are listed with their nearest counterpart.
Crosswalk
An exposure table's catalog is read off its signature names. The crosswalk then says, for each signature, whether it carries over under the same name, splits (COSMIC v3.4 split SBS40 into SBS40a, b and c), merges, or goes to its nearest match. A split shares the exposure in proportion to each part's cosine with the source. A nearest match below the chosen cosine is dropped and named, never carried silently. The translated table downloads as TSV.
Artifact screen
The spectrum is fitted with the whole COSMIC v3.4 catalog by non-negative least squares, with 200 bootstrap replicates. The screen reports the share taken by the signatures COSMIC lists as possible sequencing artifacts, each with its interval and how often the bootstrap kept it. A share whose interval reaches zero is not evidence of an artifact. Oxidative damage (SBS45) and C>T outside CpG, where formalin fixation adds mutations, are shown on their own. There is no fixed cut-off for the latter; compare it with the tumor type's usual.
Share links
Share link puts the view's inputs, compressed, in the link's fragment (the part after #). Browsers do not send the fragment to any server, so sigscape stores nothing and the link works as long as the site does. Whoever has the link can read those inputs; share it only where the data may go. A link carries spectra, signature profiles or exposure tables, never a raw variant file. Beyond 32 KB the studio offers the recipe instead, which carries the inputs too.
Copy as a badge gives Markdown for a README or a paper:
[](https://sigscape.org/#d=…)
Recipes
A recipe is a JSON file with the utility, the studio and sigscape-core versions, every input with its sha256, the parameters (draws, seed, threshold, catalog) and the results the page showed. The local runner recomputes it with the same crate (Check on runner, or sigscape-daemon recipe check recipe.json), checking each input against its checksum, and reports the largest difference. For the comparison, the signature diff and the artifact screen above, the largest difference was 0. A crosswalk is a lookup with no numerics of its own; its recipe records the mapping.
Figures
Figure (SVG) stacks the view's plots into one SVG with their colors written in, captioned with the share link when the link is short enough.