Hello everyone,
I'm currently working on a Python script that performs a specific annotation on VCF files and also modifies the FILTER flags. My script has three different options that can replace the PASS flag, and to simplify the code, I add all three FILTER fields to the metadata in the VCF header. However, it’s possible that not all of these flags will be used in the body of the VCF file for a given run.
My main concern is: If a FILTER field is included in the metadata but not present in the body, could this cause issues later on? I want to ensure that my VCF files remain valid and compatible with downstream tools.
Additionally, I’ve noticed something curious: when I validate the VCF, if a FILTER flag appears in the body but is missing from the metadata, the validation still passes. This seems counterintuitive to me, as I would expect the validation to fail in this scenario. I validate the VCF file with ValidateVariants - GATK.