Example files and environment
Every Input block on these pages was run, as written, on the environment below, with the files below and nothing else. An Output block shows what the block before it printed on that run, compared word for word at every replay, so a table on a page is the table the release prints. A block that needs your own data is labeled Template and names the file to replace. The replay that checks this is scripts/sigma2/replay-docs.py in the site's repository.
The environment
| Part | What the examples assume |
|---|---|
| Python | 3.9 or newer; the replay used 3.12 |
| Package | pip install --pre sigma2, release 0.0.16-alpha.20 from PyPI, in a fresh virtual environment |
| Reference genome | hg19, installed with sigma2 data genome hg19 into the data directory |
| Repeat-locus files | installed with sigma2 data fetch --all for a GitHub account the maintainers have given access, or from the public SigMA (R) repository; needed by the MMRD/POLE steps, including the one an HRD run starts with |
| Data directory | the genome, the repeat-locus files and the models the package installs from the wheel, nothing else: a store holding models of your own changes what run() and describe() find, so the replay refuses one |
| Working directory | one directory per page, with the page's files downloaded into it; Python is started there and reads the files by name |
| Network | for curl of the mutation files from the SigMA (R) repository and of the files below |
| Extras | pip install --pre 'sigma2[panel]' and the bedtools binary for the training example only |
| Resources | a workstation; the quickstart and the two worked examples run in under a minute each, the training example in about two minutes at two cross-validation repeats |
| Environment variables | none required; SIGMA2_DATA_DIR moves the data directory, SIGMA2_GITHUB_TOKEN (or GITHUB_TOKEN) authorizes the repeat-locus download |
python -m venv sigma2-env && source sigma2-env/bin/activate
pip install --pre sigma2
sigma2 data genome hg19
sigma2 data fetch --all
The files
Every file an example reads, where it comes from, and what the example does with it. The mutation files are SigMA (R)'s public example data and are downloaded from its repository by the page that uses them; the segment files and the template are served by this site. The archive holds the site's files with a README that names each one's source.
- Purpose
- The mutations of the quickstart, the run guide and the fifty-breast-panels example: SNVs and indels of fifty panels.
- Used as
- input= of run() and predict_mmrd_ppd(), read by name from the working directory.
- Put it in
- the working directory of the example
- Source
- SigMA (R) repository, inst/extdata/examples; fifty MSK-IMPACT 2017 breast panels. SigMA's license.
- Purpose
- The mutations of the HRD-on-exomes example: about a thousand TCGA breast exomes with SNVs and indels.
- Used as
- Filtered to the six tumors that have segments, then input= of run(soi="HRD") and hrd_features().
- Put it in
- the working directory of the example
- Source
- SigMA (R) repository, inst/extdata/examples; TCGA MC3 breast exomes. SigMA's license.
- Purpose
- Copy number for the HRD step of the fifty-breast-panels example; runs the HRD model's tcn variant.
- Used as
- segments= of run(soi="HRD") beside the MAF; the ID column matches the MAF's sample names.
- Put it in
- the working directory of the example
- Source
- The MSK-IMPACT 2017 cohort on cBioPortal, the segments of the fifty panels of test_mutations_50sample.maf.
- Purpose
- Copy number for the HRD-on-exomes example; runs the HRD model's gis variant and genomic_instability().
- Used as
- segments= of run(soi="HRD") and hrd_features(), and the input of genomic_instability(); the sample column matches the MAF's barcodes.
- Put it in
- the working directory of the example
- Source
- ASCAT copy-number calls of six TCGA breast tumors that are also in tcga_mc3_brca.maf.
- Purpose
- The column layout the training example's exposure table must have; the rows come from your own genomes.
- Used as
- exposures= of Add(), after your refit fills the rows.
- Put it in
- cohort/exposures.csv, filled with one row per genome
- Source
- The signature columns of the cosmic_v3p2_inhouse catalog, written by scripts/sigma2/examples.py.
What is not provided
The training example runs on whole genomes with known signature exposures. The genomes used to write that page were PCAWG breast genomes with MuSiCal exposures, which this site does not redistribute; the page is written so that a cohort of your own in the same layout runs through it unchanged, and the exposure template above gives the table's columns.