×

nf-core/variantbenchmarking

Pipeline to evaluate and validate the accuracy of variant calling methods in genomic research

Version: 1.5.0 Git revision: 1.5.0 Commit: Content hash:
Run:
Workflow: main.nf

nf-core/variantbenchmarking

Open in GitHub Codespaces GitHub Actions CI Status GitHub Actions Linting StatusAWS CICite with Zenodo nf-test

Nextflow nf-core template version run with conda run with docker run with singularity Launch on Seqera Platform

Get help on SlackFollow on BlueskyFollow on MastodonWatch on YouTube

HiRSE Code Promo Badge

Introduction

nf-core/variantbenchmarking is designed to evaluate and validate the accuracy of variant calling methods in genomic research. Initially, the pipeline is tuned well for available gold standard truth sets (for example, Genome in a Bottle and SEQC2 samples) but it can be used to compare any two variant calling results. The workflow provides benchmarking tools for small variants including SNVs and INDELs, Structural Variants (SVs) and Copy Number Variations (CNVs) for germline and somatic analysis.

The pipeline is built using Nextflow, a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It uses Docker/Singularity containers making installation trivial and results highly reproducible. The Nextflow DSL2 implementation of this pipeline uses one container per process which makes it much easier to maintain and update software dependencies. Where possible, these processes have been submitted to and installed from nf-core/modules in order to make them available to all nf-core pipelines, and to everyone within the Nextflow community!

nf-core/variantbenchmarking metro map

The workflow involves several key processes to ensure reliable and reproducible results as follows:

Standardization and normalization of test (query/comparison) variants:

This initial step ensures consistent formatting and alignment of variants in test and truth VCF files for accurate comparison.

  • Subsample if input vcf is multisample (bcftools view)
  • Homogenization of multi-allelic variants, MNPs and SVs to BND (including imprecise paired breakends and single breakends) (variant-extractor)
  • Reformatting VCF files from different SV callers (svync)
  • Standardize SV variants to BND (SVTK standardize)
  • Decompose SVs to BND rtgtools svdecompose
  • Rename sample names (bcftools reheader)
  • Splitting multi-allelic variants(bcftools norm)
  • Deduplication of variants (bcftools norm)
  • Left aligning of variants (bcftools norm)
  • Use prepy in order to normalize. This option is only applicable for happy benchmarking of germline analysis (prepy)
  • Split SNVs and indels if the given test VCF contains both. This is only applicable for somatic analysis (bcftools view)

Standardization and normalization of truth (baseline) variants:

Ensemble (majority rule) approch to prepare truth variants:

When a "Gold Standard" (a high-confidence, validated set of variants) is not available, you can create a Proxy Ground Truth by looking for agreement between different tools. This is Majority Rule approach assumes that if multiple independent variant callers identify the same mutation, it is more likely to be a real biological variant rather than a technical error from a single pipeline. Only variants found by at least the minimum number of callers specified in your threshold are kept as the "truth" for the final benchmark.

If the $--ensemble/_truth$ threshold is set higher than 0, the pipeline performs the following steps:

  • Merge small (SNVs and INDELs) using (bcftools merge)
  • Merge Structual Variants using (SURVIVOR merge)
  • Consensus filtering the variants according to $--ensemble/_truth$.

Filtering options:

Applying filtering on the process of benchmarking itself might makes it impossible to compare different benchmarking strategies. Therefore, for whom like to compare benchmarking methods this subworkflow aims to provide filtering options for variants.

Liftover of vcfs:

This sub-workflow provides option to convert genome coordinates of truth VCF and test VCFs and high confidence BED file to a new assembly. Golden standard truth files are build upon specific reference genomes which makes the necessity of lifting over depending on the test VCF in query. Lifting over one or more test VCFs is also possible.

Statistical inference of input test and truth variants:

This step provides insights into the distribution of variants before benchmarking by extracting variant statistics:.

Benchmarking of variants:

Actual benchmarking of variants are split between SVs and small variants:

Available methods for germline and somatic structural variant (SV) benchmarking are:

Note

Please note that there is no somatic specific tool for SV benchmarking in this pipeline.

Available methods for germline and somatic CNVs (copy number variations) are:

Note

Please note that there is no somatic specific tool for CNV benchmarking in this pipeline.

Note

Wittyer does not support BND type of variants. It is recommended to either exclude (filter) them out or convert them to other types before analysis.

Available methods for small variants: SNVs and INDELs:

Note

Please note that using happ.py and som.py with rtgtools as comparison engine is also possible. Check conf/tests/test_ga4gh.config as an example.

Intersection of benchmark regions:

Intersecting test and truth BED regions produces benchmark metrics. Intersection analysis is especially recommended for CNV benchmarking where result reports may variate per tool.

  • Convert SV or CNV VCF file to BED file, if no regions file is provided for test case using (SVTK vcf2bed)
  • Convert VCF file to BED file, if no regions file is provided for test case using (