Inspect the VCF header (via SeqArray::seqVCF_Header()) to:
fix known FORMAT/INFO inconsistencies (Stacks, samtools/freebayes-style),
detect the variant caller / pipeline (Stacks, freebayes, bcftools, GATK, etc.),
flag whether the VCF comes from Stacks,
suggest reasonable INFO/FORMAT subsets for import,
return a cleaned header object for safe import into GDS.
The function preserves the original ##source= line (if present)
and returns it as vcf.source.raw.
Classification into a standardised descriptor is returned as data.source.
Arguments
- vcf
(character) Path to a VCF file (optionally bgzipped).
- markers.info
(optional, character) Names of INFO fields to import. If
NULL, caller-specific defaults are used when available; if those are alsoNULL, all INFO fields are imported. Any values not present in the header are silently dropped.Default:
markers.info = NULL.- vcf.metadata
(optional) Controls which FORMAT fields are imported:
NULL: use caller-specific defaults (if any), otherwise import all FORMAT fields;logical:
TRUE= import all FORMAT fields,FALSE= import onlyGT;character: explicit list of FORMAT field IDs to import;
GTis always added if missing. Any fields not present in the header are silently dropped.
Default:
vcf.metadata = NULL.
Value
A list with:
data.source– inferred caller (e.g. "bcftools", "freebayes", …);vcf.source.raw– exact raw##source=string orNA;stacks.check– whether this is a Stacks VCF (TRUE/FALSE);check.header– cleanedSeqArray::seqVCF_Header()object;markers.info– final INFO fields to import (orNULL= all);overwrite.metadata– final FORMAT fields to import (orNULL= all).
