Compare vcf files using RTG Tools

Yuwei BaoMay 5, 2023

RTG Tools [1]

It provides utilities for accurate VCF comparison and manipulation

Installation

Prerequisites for building from source

Java 1.8 or later apache ant 1.9 or later

git clone https://github.com/RealTimeGenomics/rtg-tools.git
cd rtg-tools
ant runalltests
ant zip-nojre

unzip PATH_TO/rtg-tools/dist/rtg-tools-3.12.1-32d4c2d2-nojre.zip

cd PATH_TO/rtg-tools/dist/rtg-tools-3.12.1-32d4c2d2
./scripts/demo-tools.sh $PWD/rtg

Example

Assume there are two vcf files storing SNVs called by different software Strelka2 and Mutect2, then:

bcftools isec Strelka2_vcf.gz MuTect2_vcf.gz -p isec_Streka2_MuTet2 --collapse all
# Build SDF for reference genome
rtg format -o referece.SDF reference.fa

rtg vcfeval --baseline 0000.vcf.gz --calls 0001.vcf.gz --template referece.SDF --output rtg_results --sample TUMOR,NORMAL --vcf-score-field INFO.TLOD --squash-ploidy

  1. https://github.com/RealTimeGenomics/rtg-toolsopen in new window ↩︎