EBIvariation / vcf-validator

Validation suite for Variant Call Format (VCF) files, implemented using C++11
Apache License 2.0
129 stars 39 forks source link

EVA-720 Detect VCF version automatically #65

Closed jmmut closed 7 years ago

jmmut commented 7 years ago

Basically, remove the -v / --version parameter.

To achieve this (even reading from stdin) we have to read the first line, choose a parser version, and send the first line to the parser to be processed again.

A better design would be a further refactor that joins the 3 ragel machines (one per VCF version) in a single machine, that branches into 3 sub-machines after the first line. To keep the version grammars independent (and extract common actions and basic machines) we can use the "include" feature from ragel, following the structure in this example repo