Output Files
- VCF (
twitcher vcf): the input records, with clusters explained by template switches replaced by new records. See Genotype changes. - CSV output: details on every template switch found.
- TSIGAR format: how template switch events are encoded in the CSV and VCF output.
- Alignment statistics (
--output-alignment-stats): runtime, memory and provenance for every alignment. - Unresolvable clusters (
--output-unresolvable,twitcher vcf): clusters that could not be decomposed into haplotypes. See Unresolvable clusters.
VCF output
Genotype changes
Twitcher rewrites the genotype of a record whenever it splits a cluster per haplotype: a multi-allelic call such as 1|2 becomes two biallelic records (1|0 and 0|1), and an unphased heterozygous record that local phasing resolved gets a phase and an invented phase set.
Every output record whose GT and/or PS differs from the input VCF carries the TWITCHERPHASE INFO flag, declared in the output header. Records that pass through with their genotype and phase set untouched are never flagged. Filter on it with, for example:
bcftools view -i 'INFO/TWITCHERPHASE=1' output.vcfGT and PS are written by Twitcher itself, so the output header always declares both, whether or not the input VCF does. Fields the input does not declare are simply ignored when reading it; the input file and its header are never modified. If the input declares either field with an incompatible type (e.g. PS as String), the output header inherits that declaration and it cannot be corrected. Twitcher warns at startup and leaves the field unwritten.