How to subtract variants from one VCF file to another?
1
0
Entering edit mode
11 months ago
cee28 ▴ 30

I have 2 VCF files from running the GATK Joint Genotyping workflow on two different groups of samples.

I would like to filter out all the variants that are common to both VCF files and output a new VCF file only containing variants that are unique to the second group of samples. Is there a gatk or other tool that can easily do this?

Thank you.

joint-genotyping vcf variant-calling gatk • 662 views
ADD COMMENT
1
Entering edit mode
11 months ago
bcftools isec

https://samtools.github.io/bcftools/bcftools.html#isec

Creates intersections, unions and complements of VCF files. Depending on the options, the program can output records from one (or more) files which have (or do not have) corresponding records with the same position in the other files.

ADD COMMENT

Login before adding your answer.

Traffic: 2610 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6