From variants to spectra
A VCF, a MAF or a plain table of mutations becomes SBS-96 and DBS-78 spectra in the page, with nothing installed. Open Tally on the Start board with the variant file selected.
What it reads
| File | Samples | Kept |
|---|---|---|
| VCF, one sample or none | one, named after the file | PASS or . in FILTER |
| VCF, several sample columns | one per column that carries the mutation (a called GT with an ALT allele, or ALT reads in AD, or AF above zero); a column named as the matched normal is left out and reported | PASS or . |
| MAF | one per Tumor_Sample_Barcode | Variant_Type SNP, FILTER PASS or empty |
| Table (TSV or CSV) | one per value of a sample column | columns chrom, pos, ref, alt |
Gzipped files are fine, including bgzip. Two SNVs of one sample at adjacent positions are one doublet: they count once in DBS-78 and not in SBS-96.
Where the bases come from
The two bases around each SNV come from a reference genome, read by range: only the bytes around each position are fetched, never the whole genome.
- A reference you bind. An indexed FASTA in the runner's workspace, a FASTA dropped together with its
.fai, or a.2bitfile. Nothing leaves your device. - No reference bound. The page reads UCSC's public hg19 and hg38 2bit files. It first checks 200 of the file's REF alleles against both builds; the build that agrees supplies the contexts. UCSC sees which byte ranges are requested, so it can infer the positions looked up. It never sees the alleles, the sample names or the file. Bind your own reference when that matters (see the Privacy Policy).
Wrong builds stop the tally
Before anything is counted, 200 REF alleles are checked against the genome. On the right build all of them match; on the wrong one about a quarter do, by chance. Below nine in ten the tally stops and says so: lift the file over, or bind the reference it was called against. A chromosome named 1 in the file and chr1 in the genome is resolved either way, as are MT and chrM.
What you get
- The spectrum of each sample, and its doublets when it has any.
- Attach the spectra puts them on the record: every function that takes SBS-96 samples can then take it.
- SBS-96 matrix and DBS-78 matrix download SigProfiler's layout (
MutationTypethen a column per sample).
The tally is sigscape-core's, compiled to WebAssembly: the same code the Python wheel runs. Checked against an independent pysam tally on three files, it agrees channel for channel:
| File | Genome | SNVs | Doublets | Time | |---|---|---|---|---| | PCAWG breast, hg38, tumor/normal VCF | runner FASTA | 4,139 | 0 | under 0.1 s | | PCAWG consensus, hg19 | UCSC hg19, detected | 15,277 | 225 | 9.5 s, first use | | PCAWG consensus, hg19, bgzip, 52,151 rows | UCSC hg19, detected | 45,211 | 707 | 7.5 s |
The first lookup against a hosted genome reads its index, about half a megabyte; later ones in the same page skip that.