Merging VCF files with updated INFO tags
0
1
Entering edit mode
8.0 years ago
MAPK ★ 2.1k

I have multiple vcf files with different samples. I want to merge them with updated INFO tags, especially AC fields. I have tried the following command below, but it does not work. Please suggest how I can execute the command.

bcftools merge -i AC:sum fileA.vcf.gz fileB.vcf.gz  -O v -o merged.vcf
vcf • 3.2k views
ADD COMMENT
0
Entering edit mode

I desperately need to use this. Please help.

ADD REPLY
0
Entering edit mode

What sort of error or unexpected output are you getting? I believe you need to move the -O and -o flags to before fileA.vcf.gz and fileB.vcf.gz for one thing, in order to fit with the proper execution of the program (bcftools merge [options] [files])

ADD REPLY
0
Entering edit mode

Hi Dan, I was able to merge the files, but the values in AC tag were not updated in the merged files. I could not use the -i option to get the updated AC values.

ADD REPLY
0
Entering edit mode

That I'm not sure unfortunately. I don't typically use bcftools. Is it pulling AC values from just one file versus summing them?

ADD REPLY
0
Entering edit mode

That is right. What do you use to merge two vcf files?

ADD REPLY
0
Entering edit mode

For merging multiple samples into the same VCF file I've typically used GATK's CombineVariants in the past, but usually now I do multi-sample calling. For my current workflows I usually just need to merge VCF's that are from the same sample. I've been using a mix of bcbio-ensemble's merge method and some custom scripts.

ADD REPLY

Login before adding your answer.

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