Is there a way to find and add all undefined annotations in a vcf?
For example, if I have 3 vcf files in a directory, find all undefined annotations in each vcf, write them to a header file, then add that header file to the original vcf.
I guess something like bcftools reheader, but that seems to only work on individual vcf files.
# find undefined annotations
bcftools view -h file1.vcf > file1_header.txt
# edit original vcf
bcftools reheader -h file1_header file1.vcf > file1_fixed.vcf
then loop through the directory doing the same for file2 and file3. I have been trying to figure this out for a few weeks and not able to do so, is there a better way? I would then use bgzip and tabix on the fixed.vcf to further process. Thank you :).
Thank you very much :).