bcftools merge doesn't recalculate AF
1
0
Entering edit mode
2.2 years ago
gernophil ▴ 90

Hey everyone,

I am trying to combine two VCFs I created with a GATK pipeline (https://github.com/snakemake-workflows/dna-seq-gatk-variant-calling). I used bcftools merge (with and without -g genome.fasta with identical results). The resulting genotypes are correct, but it seems like bcftools merge does not recalculate allele frequency. Is there a better too for combining or cann I just recalculate the AF later? Here are exemplary results of a merge:

                                sample1  sample2
VCF1:    C,CAA   AF=0.023,0.031   0/2
VCF2:    CAA,C   AF=0.279,0.074            0/1
merged:  C,CAA   AF=0.074,0.279   0/2      0/2

It looks like the AF was just taken from the second VCF. Any ideas how to get the correct AF?

I also tried gatk CombineGVCFs, but this tells me The list of input alleles must contain <NON_REF> as an allele but that is not the case at position 98999; please use the Haplotype Caller with gVCF output to generate appropriate records. However, the VCFs were generated with HaplotypeCaller.

Thanks :)

bcftools • 1.1k views
ADD COMMENT
0
Entering edit mode

gatk CombineGVCFs is for GVCF files, not VCF.

ADD REPLY
1
Entering edit mode
2.2 years ago
raphael.B ▴ 520

to recalculate the allele frequency you can use bcftools +fill-tags <your merged VCF>

ADD COMMENT
0
Entering edit mode

Or pipe merge into fill-tags

ADD REPLY

Login before adding your answer.

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