This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Combine several VCF files

I've performed variant calling with two callers. One calls haplotypes and other calls mutations as single variants. As a result I have two VCF files where sometimes identical variants are written in different forms. For example: One file:

chr1    61987   .       AAG     GAC

Another file:

chr1    61987   .       A       G
chr1    61989   .       G       C

Obviously, mutations in the second file are from single haplotype and in the final VCF file i need only single record as in the first file. I've tried to use bcftools merge to combine VCF files, but I get the following:

chr1    61987   .       AAG     GAC,GAG

Which will lead to wrong annotation. So is there any software to combine these two VCF files into single one, so all single variants would disappear?

vcf bcftools

1 answer

A solution with the GATK (pre-4.0): LeftAlignAndTrimVariants. You can split or combine multiallelic records with bcftools norm.

I'd actually recommend vt-norm/vt-decompose over bcftools norm, because vt leaves a trail so the changes it makes are trackable (it preserves old variant info [chr:pos:ref:alt] in an INFO attribute).

Log in to answer this question.