Command line
sigma2 on the command line fetches data, checks the install, scores HRD without Python, and re-scores a finished training run. Library calls never download on their own; when one needs a file that is not there it raises MissingAsset and names the command below, except the repeat-locus files: without them the MMRD/POLE classifier and the MMRD/POLE step of an HRD run proceed without their microsatellite counts and print nothing at the default verbosity.
sigma2 [-h] {info,data,export-threshold-table,hrd} ...
sigma2 info
sigma2 info
sigma2 0.0.16-alpha.20
package : .../site-packages/sigma2/__init__.py
data dir : /home/you/.local/share/sigma2
installed : 835 MB
free : 36.5 GB
data release: expected 2026.2, installed 2026.2 [up to date]
data assets : 6/6 present
classifiers : 92 legacy (SigMA v1)
sigma2 data
sigma2 data list
sigma2 data fetch [--all] [--group G] [--force] [name ...]
sigma2 data verify
sigma2 data genome [hg19|hg38 ...] [--force]
sigma2 data path <name>
sigma2 data list
sigma2 data genome hg19
sigma2 data fetch --all
The assets are the six repeat-locus BED files (group repeat_bed, about 835 MB), needed for microsatellite indel counts. They are fetched from the private SigMA2 repository, only for a GitHub account the maintainers have given access (gh auth login, or a token in SIGMA2_GITHUB_TOKEN), while the manuscript is in preparation; without access the fetch returns 404 and names the way to ask for it. The same six files, with the same checksums, are in the public SigMA (R) repository. Genomes are not part of fetch --all; data genome downloads them from UCSC, about 3 GB each.
sigma2 hrd
sigma2 hrd score --input INPUT --tumor-type T --seq-type S [--ref-genome R] [--indels I]
[--segments SEG] [--model M] [-o OUT] [--all-columns] [--verbose {0,1,2}]
sigma2 hrd features --input INPUT --tumor-type T --seq-type S [--ref-genome R] [--indels I] [--segments SEG] [-o OUT]
sigma2 hrd gis --segments SEG [--genome {hg19,hg38}] [-o OUT]
sigma2 hrd tune --features F --seq-type S [--label-column C] [--tumor-type-column C] [--name N]
[--min-positives N] [--neighbors N] [--cv N] [--seed N] [--sig3-model M] [--sig3-catalog C]
sigma2 hrd models
| Command | What |
|---|---|
score | HRD from a VCF, MAF or directory of VCFs, with optional segments; tab-separated to -o or stdout. --all-columns adds SigMA's own columns. |
features | the HRD feature table, for training or inspection |
gis | HRD-LOH, TAI and LST from allele-specific segments |
tune | train an HRD model from a feature table with a biallelic BRCA1/2 label column (true/false) |
models | the installed HRD models |
The example files of Detect HRD:
curl -LO https://raw.githubusercontent.com/parklab/SigMA/master/inst/extdata/examples/test_mutations_50sample.maf
curl -LO https://sigscape.org/sigma2/examples/msk_breast_50_segments.seg
sigma2 hrd score --input test_mutations_50sample.maf --tumor-type breast \
--seq-type msk --segments msk_breast_50_segments.seg -o hrd.tsv
sigma2 hrd features --input test_mutations_50sample.maf --tumor-type breast \
--seq-type msk --segments msk_breast_50_segments.seg -o features.tsv
sigma2 hrd models
Detect HRD describes the inputs and the output columns.
sigma2 export-threshold-table
sigma2 export-threshold-table --results DIR [--tumor-type T] [--objective O] [--legacy-lock SIG ...] [--stratifier SIG]
sigma2 export-threshold-table --results cohort/results
--tumor-type defaults to the single tumor directory in the tree; --legacy-lock pins signatures to the SigMA v1 floor; --stratifier splits every discrimination measure by another signature's status. The Python form is Add.export_threshold_table.
What is not on the command line
Scoring a signature classifier, MMRD/POLE, and training are Python calls: sg2.run, sg2.predict_mmrd_ppd, sg2.Add. In sigscape studio the same package runs through the local runner with every run kept; see In sigscape studio.
Environment variables
| Variable | Effect |
|---|---|
SIGMA2_DATA_DIR | the data directory (Install) |
SIGMA2_DECOMP_CACHE | a directory that memoizes decompositions; atomic writes, so concurrent runs can share it. Its entries are pickles: never share it with anyone you would not run code from. |
GITHUB_TOKEN | credentials for sigma2 data fetch while the repository is private |
LOKY_MAX_CPU_COUNT | caps the worker pool when runs share a machine; mxw sets a run's own count |