SigMA2 in the studio
SigMA2 runs as the real package on the local runner. Bound to mutations and an exposure table, its pipeline is three kept runs, Build (annotate and cluster), Simulate (every sample downsampled into each panel) and Tune (one classifier per signature and assay); bound to an Add-object JSON, Tune alone; bound to tuning results, Compare sets two runs against each other. The stages are a rail; keys 1 to 5 switch them.
Score: a classifier on new tumors
Score applies a classifier to tumors that were not in any training, through sigma2.run() as the package runs it, with nothing reimplemented. It works standalone with the classifiers sigma2 ships (no build or tune needed), with SigMA v1's legacy SBS3 classifier, or with the model a Tune run in the same tab trained.
What it takes, any of: one VCF (plain or gzipped), a folder of VCFs in the runner's data folder, a MAF with several samples, a SigMA CSV, or SBS-96 spectra the page tallied (the studio uploads its own matrix, so no reference genome is needed). A copy-number segments table (sample, chromosome, start, end, major and minor copy number) beside them scores HRD.
What it asks: the tumor type, one signature of interest (SBS3, APOBEC, SBS8, …, or HRD), the assay (msk, fo, op, seqcap, tcga_mc3, wgs, or read off a VCF's or MAF's positions against sigma2's own panel regions, with a note when a named assay disagrees with the positions), the classifier (bundled, legacy, or a tune run's), and sigma2's options: readjust the cutoff to the cohort's median burden, MSI features, MMRd and POLE through predict_mmrd_ppd (a VCF or MAF), and force, which scores with an experimental classifier the release gate withheld and labels every such call "not validated". Two settings are choices with a default that follows the classifier, never a constant: the SNV floor is the classifier's own, the floor it was trained at as its card records it (else sigma2's for the tumor type: 5, prostate 4, osteosarcoma and pancreatic neuroendocrine 3), unless a number is entered, and the catalog is the classifier's own, read from its card (SigMA v1's cosmic_v2_inhouse for the legacy classifier, the HRD model's Signature 3 catalog for HRD) unless one is named. Neither is passed to sigma2 unless set, and the result states both with their source. The package's own documentation is at /docs/sigma2.
What it refuses, before anything runs: a tumor type × signature × assay cell sigma2 has no classifier for (naming the cells it has, and the legacy classifier when that covers it), HRD without segments, the assay from positions on spectra, MMRd on spectra, an experimental-only cell without force.
What comes back: one row per sample with its SNV count against the floor (below it, not scored, and listed as such), the classifier's score, the call at the released operating point and at the strict one, and HRD or MMRd columns when asked; the cohort's summary; the model card beside the table, from what the classifier records about itself: released or experimental, the evidence grade, the released cutoff's sensitivity and false-positive rate with their intervals, the training counts, how the training labels were curated (breast SBS3 on MSK-IMPACT, for one, is not intended to call weak SBS3), and whether sigma2 recommends readjusting. Export scores writes the table as TSV, sigma2's full out.df downloads from the run, and the recipe and the reporting block are as for every function.
Refit confidence on these records opens the same tumors as the step below, so a panel sample the refit report leaves undetermined shows the SigMA2 call next to the refit verdict: the two routes the studio offers for the panel majority.
The runner lists the classifiers its sigma2 can run after the first score run (or List classifiers), and the stage offers the tumor types and signatures from that list.