Combine several VCF files
1
1
Entering edit mode
5.2 years ago
Max Ivon ▴ 140

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.2k views
ADD COMMENT
0
Entering edit mode
5.2 years ago
Brice Sarver ★ 3.8k

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

ADD COMMENT
0
Entering edit mode

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).

ADD REPLY

Login before adding your answer.

Traffic: 2512 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