/wgs_somatic_snp_viper

Primary LanguagePythonMIT LicenseMIT

wgs_somatic_snp_viper

Simple workflow to call short variants in somatic whole genome data

Snakefmt License: MIT

💬 Introduction

This snakemake workflow takes .bam files, which were prepped according to GATK best practices, and calls SNVs and small Indels. The workflow can process tumor samples paired with normals or be run as a tumor-only analysis.

Mutect2

The variant calling is done according to this tutorial and requires a panel of normals (PoN).

VarDict

Calling variants with VarDict is performed as as indicated in the respective repository.

❗ Dependencies

To run this workflow, the following tools need to be available:

python snakemake singularity

🎒 Preparations

Sample data

  1. Add all sample ids to samples.tsv in the column sample.
  2. Add sample type information, normal or tumor, to units.tsv.
  3. Use the analysis_output folder from wgs_std_viper as input.
  4. If a PoN was not created earlier, use the analysis_output folder from wgs_somatic_pon as input.

Reference data

  1. You need a reference .fasta file representing the genome used for mapping. For the different tools to work, you also need to prepare index files and a .dict file.
  • The required files for the human reference genome GRCh38 can be downloaded from google cloud. The download can be manually done using the browser or using gsutil via the command line:
gsutil cp gs://genomics-public-data/resources/broad/hg38/v0/Homo_sapiens_assembly38.fasta /path/to/download/dir/
  • If those resources are not available for your reference you may generate them yourself:
samtools faidx /path/to/reference.fasta
gatk CreateSequenceDictionary -R /path/to/reference.fasta -O /path/to/reference.dict
  1. A VarDict .bed file containing all these genomic regions, which Vardict should call variants in. The regions should be split by 5 MBp or less.
  2. Mutect2 requires a panel of normals (PoN) which should be supplied. If you do not have a PoN you can simply leave "" instead to link the workflow to the output from wgs_somatic_pon.
  3. Mutect2 also requires a modified gnomad database as a .vcf.gz. For GRCh38, the file can be retrieved from google cloud as described under 1.
  4. Add the paths of the different files to the config.yaml. The index files should be in the same directory as the reference .fasta.
  5. Make sure that the docker container versions are correct.

✅ Testing

The workflow repository contains a small test dataset .tests/integration which can be run like so:

cd .tests/integration
snakemake -s ../../workflow/Snakefile -j1 --use-singularity

🚀 Usage

The workflow is designed for WGS data meaning huge datasets which require a lot of compute power. For HPC clusters, it is recommended to use a cluster profile and run something like:

snakemake -s /path/to/Snakefile --profile my-awesome-profile

🧑‍⚖️ Rule Graph

rule_graph