Question:
What is the simplest/fastest/safest way to rename a few INFO tags in a VCF file (especially if the file is already bgzipped)?
Background:
I'm trying to merge multiple VCF files, but some of them have conflicting INFO tag names (e.g. AC, AN, AF, etc.). I want to rename some of the INFO tags in the original (unmerged) files so they don't conflict with each other once they're merged.
What I've tried:
BCFtools is nice in that it's safe, flexible and works very quickly with bgzipped VCF files. I figured this simple task would be builtin, but I couldn't find it anywhere. I tried using bcftools reheader
to rename some tags, but this only modifies the VCF header. The tags in the data remain the same. I'm open to using other tools (VCFtools, awk, sed, etc.), but I would prefer a method that is compatible with bgzipped files (if possible).