Entering edit mode
8.6 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
I desperately need to use this. Please help.
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])
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.
That I'm not sure unfortunately. I don't typically use bcftools. Is it pulling AC values from just one file versus summing them?
That is right. What do you use to merge two vcf files?
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.