How to subtract variants from one VCF file to another?
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.
• 1,270 views
•
link
1 answer
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.
• 0 views
•
link
Log in to answer this question.