Returns the VCF header lines that correspond to a variant schema.
Returns the VCF header lines that correspond to a variant schema. Each flattened info field (those fields whose names start with "INFO_") will be converted to an info header line, and fields from the "genotype" struct will be converted to format header lines.
If the count type is available in the schema metadata (which is always the case if the original
schema was generated by inferSchema
), that will be the returned count type. If not, we
provide a best guess count type according to the following schema possibilities:
- If it's a boolean field, return count = 0, as is the convention for flags
- If it's a non-array field, return count = 1
- If it's an array field, return count = UNBOUNDED
The schema of the variant DataFrame
VCF header lines that can be inferred from the input schema
If true, a sampleId column will be added to the genotype fields
If true, each INFO field will be promoted to a column. If false, they will instead be stored in a string -> string map
A StructType describing the schema
Infers the schema of a VCF file from its headers.