Skip to content

Find and quantify COSMIC mutational signatures across samples

License

Notifications You must be signed in to change notification settings

stjudecloud/mtsg

Repository files navigation

Mutational Signatures

Mutational Signatures (abbreviated as mtsg) finds and quantifies COSMIC mutational signatures across samples.

mtsg uses a base set of mutational signatures extracted by SigProfiler for single-base substitutions (SBS), i.e., single-nucleotide variants (SNV), using 2780 whole-genome variant calls from the ICGC/TCGA Pan-Cancer Analysis of Whole Genomes (PCAWG) project.

Prerequisites

Install

Use Poetry to install mtsg and its dependencies.

$ poetry install --no-dev

mtsg init can then be used to install base mutational matrices given a supported genome build.

$ mtsg init --genome-build <genome-build>

Replace <genome-build> with one of GRCh37, GRCh38 (Homo sapiens), mm9, mm10 (Mus musculus), or rn6 (Rattus norvegicus).

Usage

Mutational Signatures is installed as the executable mtsg. It has three commands: init, run, and visualize.

Run

run is used to profile samples (as VCFs) using known mutational signatures. The selected genome build must match the input VCFs and previously installed during the installation.

usage: mtsg run [-h] [--dst-prefix DST_PREFIX] [--genome-build {GRCh37,GRCh38,mm9,mm10,rn6}] src-prefix

positional arguments:
  src-prefix

optional arguments:
  -h, --help            show this help message and exit
  --dst-prefix DST_PREFIX
  --genome-build {GRCh37,GRCh38,mm9,mm10,rn6}

Visualize

visualize uses signature activities (generated by run and typically named Sig_activities.txt) to create an interactive plot.

usage: mtsg visualize [-h] --reference REFERENCE --output OUTPUT src

positional arguments:
  src

optional arguments:
  -h, --help            show this help message and exit
  --reference REFERENCE
  --output OUTPUT

Docker

Mutational Signatures has a Dockerfile to create a container image, which sets up and installs the required runtime and dependencies. It installs reference files for only GRCh38 and uses COMSIC mutational signatures 3.1. To build and use this image, install Docker for your platform.

Build

In the Mutational Signatures project directory, build the container image.

$ docker image build --tag mtsg .

Run

The image uses mtsg as its entrypoint, giving access to all commands.

$ docker container run mtsg <args...>

For example, a typical workflow is to run the run command followed by visualize.

$ docker container run \
  --rm \
  --mount type=bind,source=$PWD/data,target=/data \
  --mount type=bind,source=$PWD/results,target=/results \
  mtsg \
  run \
  --dst-prefix /results \
  /data

$ docker container run \
  --rm \
  --mount type=bind,source=$PWD/references,target=/references,readonly \
  --mount type=bind,source=$PWD/results,target=/results \
  mtsg \
  visualize \
  --reference /references/reference.tsv \
  --output /results/signatures.html \
  /results/Sig_activities.txt

References