vcf: Clarify the representation of a Flag INFO field
My understanding is that a Flag INFO value is based on its presence and does not have an explicit right-hand value. This comes from The Variant Call Format Specification: VCFv4.3 and BCFv2.2 (2022-08-22) § 1.4.2 "Information field format", which states
The 'Flag' type indicates that the INFO field does not contain a Value entry, and hence the Number must be 0 in this case.
However, test/vcf/4.3/passed/passed_body_format.vcf shows Flag INFO fields with explicit values (0 and 1). Is this valid?
For reference,
-
test/vcf/4.3/failed/failed_body_info_012.vcffails an integer value of 2. -
test/vcf/4.3/failed/failed_body_info_020.vcffails a string value of "SOMETHING". -
test/vcf/4.3/failed/failed_body_info_029.vcfis stated to fail because there is an explicit value, and this contradictspassed_body_format.vcf. Note that a value of 9 is also invalid, according tofailed_body_info_012.vcf.
However, test/vcf/4.3/passed/passed_body_format.vcf shows Flag INFO fields with explicit values (0 and 1). Is this valid?
The example is incorrect and they should fail validation. There's no exception to Number=0 in VCF.
The only time any value for a FLAG field is mentioned is in the BCF specifications (section 6.6.3 Flags values) which recommended encoding a placeholder 1(INT8) to indicate presence. There's nothing to say this value should be included in VCF. This does mean that the VCF value for a FLAG field won't survive a round-trip through VCF but that's not a problem as the actual value isn't meaningful.
See also #384.