diff --git a/README.md b/README.md index bdaf6be57..315133904 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,8 @@ Different types of validation reports can be written with the `-r` / `--report` Each report is written into its own file and it is named after the input file, followed by a timestamp. The default output directory is the same as the input file's if provided using `-i`, or the current directory if using the standard input; it can be changed with the `-o` / `--outdir` option. +A flag for validating evidence can be passed with `--require-evidence`. This will validate whether the VCF includes either Genotypes or Allele Frequencies. This flag will be **false** by default. + ### Debugulator There are some simple errors that can be automatically fixed. The most common error is the presence of duplicate variants. The needed parameters are the original VCF and the report generated by a previous run of the validator with the option `-r database`. diff --git a/inc/vcf/parsing_state.hpp b/inc/vcf/parsing_state.hpp index 85d4c0eb1..6e2e2201d 100644 --- a/inc/vcf/parsing_state.hpp +++ b/inc/vcf/parsing_state.hpp @@ -30,7 +30,10 @@ namespace ebi { namespace vcf { - + struct AdditionalChecks { + bool checkEvidence; + }; + struct ParsingState { size_t n_lines; @@ -46,8 +49,9 @@ namespace ebi std::vector> warnings; std::multimap defined_metadata; + AdditionalChecks additionalChecks; - ParsingState(std::shared_ptr source); + ParsingState(std::shared_ptr source, AdditionalChecks additionalChecks); virtual ~ParsingState() = default; void set_version(Version version); @@ -66,6 +70,14 @@ namespace ebi bool is_well_defined_meta(std::string const & meta_type, std::string const & id) const; void add_well_defined_meta(std::string const & meta_type, std::string const & id); + + void validate_additional_checks(); + + bool genotypes_present(); + + bool allele_frequencies_present(); + + bool allele_count_present(); }; } } diff --git a/inc/vcf/string_constants.hpp b/inc/vcf/string_constants.hpp index 675c878d4..8894cc1fd 100644 --- a/inc/vcf/string_constants.hpp +++ b/inc/vcf/string_constants.hpp @@ -23,7 +23,6 @@ namespace ebi { namespace vcf { - // VCF versions const std::string VCF_V41 = "VCFv4.1"; const std::string VCF_V42 = "VCFv4.2"; @@ -63,6 +62,7 @@ namespace ebi const char REPORT_OPTION[] = "report,r"; const char OUTDIR_OPTION[] = "outdir,o"; const char OUTPUT_OPTION[] = "output,o"; + const char CHECK_EVIDENCE[] = "require-evidence"; // fields const std::string ID = "ID"; diff --git a/inc/vcf/validator.hpp b/inc/vcf/validator.hpp index a40b34efd..b78feefbb 100644 --- a/inc/vcf/validator.hpp +++ b/inc/vcf/validator.hpp @@ -96,7 +96,7 @@ namespace ebi public ParsingState { public: - ParserImpl(std::shared_ptr source); + ParserImpl(std::shared_ptr source, AdditionalChecks additionalChecks); virtual ~ParserImpl() = default; void parse(std::string const & text) override; @@ -130,7 +130,7 @@ namespace ebi using ErrorPolicy = typename Configuration::ErrorPolicy; using OptionalPolicy = typename Configuration::OptionalPolicy; - ParserImpl_v41(std::shared_ptr source); + ParserImpl_v41(std::shared_ptr source, AdditionalChecks additionalChecks); private: void parse_buffer(char const * p, char const * pe, char const * eof); @@ -148,7 +148,7 @@ namespace ebi using ErrorPolicy = typename Configuration::ErrorPolicy; using OptionalPolicy = typename Configuration::OptionalPolicy; - ParserImpl_v42(std::shared_ptr source); + ParserImpl_v42(std::shared_ptr source, AdditionalChecks additionalChecks); private: void parse_buffer(char const * p, char const * pe, char const * eof); @@ -166,7 +166,7 @@ namespace ebi using ErrorPolicy = typename Configuration::ErrorPolicy; using OptionalPolicy = typename Configuration::OptionalPolicy; - ParserImpl_v43(std::shared_ptr source); + ParserImpl_v43(std::shared_ptr source, AdditionalChecks additionalChecks); private: void parse_buffer(char const * p, char const * pe, char const * eof); @@ -185,15 +185,16 @@ namespace ebi using FullValidator_v43 = ParserImpl_v43; using Reader_v43 = ParserImpl_v43; - bool is_valid_vcf_file(std::istream &input, - const std::string &sourceName, + bool is_valid_vcf_file(std::istream &input, const std::string &sourceName, ValidationLevel validationLevel, - std::vector> &outputs); + std::vector> &outputs, + AdditionalChecks checks); bool process_vcf_stream(std::istream &input, - const std::string &sourceName, - ValidationLevel validationLevel, - std::vector> &outputs); + const std::string &sourceName, + ValidationLevel validationLevel, + std::vector> &outputs, + AdditionalChecks additionalChecks); std::string get_compression_from_extension(std::string const & source); diff --git a/inc/vcf/validator_detail_v41.hpp b/inc/vcf/validator_detail_v41.hpp index 6fb303300..25b230a0b 100644 --- a/inc/vcf/validator_detail_v41.hpp +++ b/inc/vcf/validator_detail_v41.hpp @@ -45,8 +45,8 @@ namespace ebi { template - ParserImpl_v41::ParserImpl_v41(std::shared_ptr source) - : ParserImpl{source} + ParserImpl_v41::ParserImpl_v41(std::shared_ptr source, AdditionalChecks additionalChecks) + : ParserImpl{source, additionalChecks} { #line 53 "inc/vcf/validator_detail_v41.hpp" @@ -103,7 +103,7 @@ case 1: ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); p--; {goto st519;} } -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -137,7 +137,7 @@ case 1: ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); p--; {goto st519;} } -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -166,47 +166,47 @@ case 1: } goto st0; tr29: -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st519;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st519;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st519;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st519;} } -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); p--; {goto st519;} } -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); p--; {goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st519;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); p--; {goto st519;} } -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); p--; {goto st519;} @@ -225,7 +225,7 @@ case 1: } goto st0; tr125: -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st519;} @@ -237,13 +237,13 @@ case 1: } goto st0; tr133: -#line 263 "src/vcf/vcf.ragel" +#line 264 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "ALT metadata ID is not prefixed by DEL/INS/DUP/INV/CNV/BND and suffixed by ':' and a text sequence"}); p--; {goto st519;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st519;} @@ -255,12 +255,12 @@ case 1: } goto st0; tr152: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st519;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st519;} @@ -272,12 +272,12 @@ case 1: } goto st0; tr162: -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st519;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st519;} @@ -289,7 +289,7 @@ case 1: } goto st0; tr165: -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st519;} @@ -301,12 +301,12 @@ case 1: } goto st0; tr175: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st519;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st519;} @@ -318,12 +318,12 @@ case 1: } goto st0; tr194: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st519;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st519;} @@ -335,7 +335,7 @@ case 1: } goto st0; tr204: -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st519;} @@ -347,12 +347,12 @@ case 1: } goto st0; tr214: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st519;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st519;} @@ -369,7 +369,7 @@ case 1: ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "FORMAT metadata Number is not a number, A, G or dot"}); p--; {goto st519;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st519;} @@ -381,12 +381,12 @@ case 1: } goto st0; tr236: -#line 304 "src/vcf/vcf.ragel" +#line 305 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Type is not Integer, Float, Flag, Character or String"}); p--; {goto st519;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st519;} @@ -398,12 +398,12 @@ case 1: } goto st0; tr253: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st519;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st519;} @@ -415,7 +415,7 @@ case 1: } goto st0; tr264: -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st519;} @@ -427,12 +427,12 @@ case 1: } goto st0; tr273: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st519;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st519;} @@ -449,7 +449,7 @@ case 1: ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Number is not a number, A, G or dot"}); p--; {goto st519;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st519;} @@ -461,12 +461,12 @@ case 1: } goto st0; tr295: -#line 304 "src/vcf/vcf.ragel" +#line 305 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Type is not Integer, Float, Flag, Character or String"}); p--; {goto st519;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st519;} @@ -478,12 +478,12 @@ case 1: } goto st0; tr312: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st519;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st519;} @@ -495,7 +495,7 @@ case 1: } goto st0; tr323: -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); p--; {goto st519;} @@ -507,12 +507,12 @@ case 1: } goto st0; tr333: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st519;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); p--; {goto st519;} @@ -524,7 +524,7 @@ case 1: } goto st0; tr345: -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st519;} @@ -536,12 +536,12 @@ case 1: } goto st0; tr356: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st519;} @@ -553,17 +553,17 @@ case 1: } goto st0; tr361: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st519;} } -#line 363 "src/vcf/vcf.ragel" +#line 364 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Genomes is not a valid string (maybe it contains quotes?)"}); p--; {goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st519;} @@ -575,12 +575,12 @@ case 1: } goto st0; tr363: -#line 363 "src/vcf/vcf.ragel" +#line 364 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Genomes is not a valid string (maybe it contains quotes?)"}); p--; {goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st519;} @@ -592,17 +592,17 @@ case 1: } goto st0; tr373: -#line 363 "src/vcf/vcf.ragel" +#line 364 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Genomes is not a valid string (maybe it contains quotes?)"}); p--; {goto st519;} } -#line 368 "src/vcf/vcf.ragel" +#line 369 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Mixture is not a valid string (maybe it contains quotes?)"}); p--; {goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st519;} @@ -614,12 +614,12 @@ case 1: } goto st0; tr376: -#line 368 "src/vcf/vcf.ragel" +#line 369 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Mixture is not a valid string (maybe it contains quotes?)"}); p--; {goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st519;} @@ -631,17 +631,17 @@ case 1: } goto st0; tr386: -#line 368 "src/vcf/vcf.ragel" +#line 369 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Mixture is not a valid string (maybe it contains quotes?)"}); p--; {goto st519;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st519;} @@ -653,12 +653,12 @@ case 1: } goto st0; tr389: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st519;} @@ -670,7 +670,7 @@ case 1: } goto st0; tr412: -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); p--; {goto st519;} @@ -682,12 +682,12 @@ case 1: } goto st0; tr421: -#line 384 "src/vcf/vcf.ragel" +#line 385 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata URL is not valid"}); p--; {goto st519;} } -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); p--; {goto st519;} @@ -699,7 +699,7 @@ case 1: } goto st0; tr442: -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); p--; {goto st519;} @@ -711,12 +711,12 @@ case 1: } goto st0; tr453: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st519;} } -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); p--; {goto st519;} @@ -728,7 +728,7 @@ case 1: } goto st0; tr491: -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); p--; {goto st519;} @@ -740,12 +740,12 @@ case 1: } goto st0; tr503: -#line 384 "src/vcf/vcf.ragel" +#line 385 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata URL is not valid"}); p--; {goto st519;} } -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); p--; {goto st519;} @@ -757,7 +757,7 @@ case 1: } goto st0; tr526: -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -801,7 +801,7 @@ case 1: } goto st0; tr581: -#line 407 "src/vcf/vcf.ragel" +#line 408 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ChromosomeBodyError{n_lines}); p--; {goto st520;} @@ -813,7 +813,7 @@ case 1: } goto st0; tr584: -#line 413 "src/vcf/vcf.ragel" +#line 414 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new PositionBodyError{n_lines}); p--; {goto st520;} @@ -825,7 +825,7 @@ case 1: } goto st0; tr588: -#line 419 "src/vcf/vcf.ragel" +#line 420 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new IdBodyError{n_lines}); p--; {goto st520;} @@ -837,7 +837,7 @@ case 1: } goto st0; tr593: -#line 425 "src/vcf/vcf.ragel" +#line 426 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ReferenceAlleleBodyError{n_lines}); p--; {goto st520;} @@ -849,7 +849,7 @@ case 1: } goto st0; tr597: -#line 431 "src/vcf/vcf.ragel" +#line 432 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new AlternateAllelesBodyError{n_lines}); p--; {goto st520;} @@ -861,7 +861,7 @@ case 1: } goto st0; tr606: -#line 437 "src/vcf/vcf.ragel" +#line 438 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new QualityBodyError{n_lines}); p--; {goto st520;} @@ -873,7 +873,7 @@ case 1: } goto st0; tr617: -#line 443 "src/vcf/vcf.ragel" +#line 444 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FilterBodyError{n_lines}); p--; {goto st520;} @@ -885,12 +885,12 @@ case 1: } goto st0; tr625: -#line 454 "src/vcf/vcf.ragel" +#line 455 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info key is not a sequence of alphanumeric and/or punctuation characters"}); p--; {goto st520;} } -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); p--; {goto st520;} @@ -914,14 +914,14 @@ case 1: } goto st0; tr634: -#line 472 "src/vcf/vcf.ragel" +#line 473 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " does not start with a valid genotype"; ErrorPolicy::handle_error(*this, new SamplesFieldBodyError{n_lines, message_stream.str(), "", "GT"}); p--; {goto st520;} } -#line 465 "src/vcf/vcf.ragel" +#line 466 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " is not a valid string"; @@ -942,7 +942,7 @@ case 1: } goto st0; tr644: -#line 465 "src/vcf/vcf.ragel" +#line 466 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " is not a valid string"; @@ -956,12 +956,12 @@ case 1: } goto st0; tr650: -#line 459 "src/vcf/vcf.ragel" +#line 460 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info field value is not a comma-separated list of valid strings (maybe it contains whitespaces?)"}); p--; {goto st520;} } -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); p--; {goto st520;} @@ -986,7 +986,7 @@ case 1: p--; {goto st520;} } -#line 407 "src/vcf/vcf.ragel" +#line 408 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ChromosomeBodyError{n_lines}); p--; {goto st520;} @@ -998,7 +998,7 @@ case 1: } goto st0; tr706: -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); p--; {goto st520;} @@ -8829,6 +8829,7 @@ case 524: for(auto &error_ptr : symbolic_duplicates) { ErrorPolicy::handle_warning(*this, error_ptr.release()); } + validate_additional_checks(); } try { @@ -8858,7 +8859,7 @@ case 524: if ( ++p == pe ) goto _test_eof525; case 525: -#line 8862 "inc/vcf/validator_detail_v41.hpp" +#line 8863 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 10: goto tr704; case 13: goto tr705; @@ -8887,7 +8888,7 @@ case 525: if ( ++p == pe ) goto _test_eof459; case 459: -#line 8891 "inc/vcf/validator_detail_v41.hpp" +#line 8892 "inc/vcf/validator_detail_v41.hpp" if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) goto tr638; @@ -8917,7 +8918,7 @@ case 459: if ( ++p == pe ) goto _test_eof460; case 460: -#line 8921 "inc/vcf/validator_detail_v41.hpp" +#line 8922 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 59: goto tr639; case 62: goto tr640; @@ -8941,7 +8942,7 @@ case 460: if ( ++p == pe ) goto _test_eof461; case 461: -#line 8945 "inc/vcf/validator_detail_v41.hpp" +#line 8946 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 9 ) goto tr641; goto tr581; @@ -8972,6 +8973,7 @@ case 461: for(auto &error_ptr : symbolic_duplicates) { ErrorPolicy::handle_warning(*this, error_ptr.release()); } + validate_additional_checks(); } try { @@ -9001,7 +9003,7 @@ case 461: if ( ++p == pe ) goto _test_eof462; case 462: -#line 9005 "inc/vcf/validator_detail_v41.hpp" +#line 9007 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 10 ) goto st525; goto tr642; @@ -9015,7 +9017,7 @@ case 462: if ( ++p == pe ) goto _test_eof463; case 463: -#line 9019 "inc/vcf/validator_detail_v41.hpp" +#line 9021 "inc/vcf/validator_detail_v41.hpp" if ( (*p) > 57 ) { if ( 59 <= (*p) && (*p) <= 126 ) goto tr645; @@ -9042,7 +9044,7 @@ case 463: if ( ++p == pe ) goto _test_eof526; case 526: -#line 9046 "inc/vcf/validator_detail_v41.hpp" +#line 9048 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 9: goto tr631; case 10: goto tr708; @@ -9064,7 +9066,7 @@ case 526: if ( ++p == pe ) goto _test_eof527; case 527: -#line 9068 "inc/vcf/validator_detail_v41.hpp" +#line 9070 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 9: goto tr631; case 10: goto tr708; @@ -9101,7 +9103,7 @@ case 527: if ( ++p == pe ) goto _test_eof528; case 528: -#line 9105 "inc/vcf/validator_detail_v41.hpp" +#line 9107 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 9: goto tr631; case 10: goto tr708; @@ -9133,7 +9135,7 @@ case 528: if ( ++p == pe ) goto _test_eof464; case 464: -#line 9137 "inc/vcf/validator_detail_v41.hpp" +#line 9139 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 48 ) goto tr646; goto tr625; @@ -9147,7 +9149,7 @@ case 464: if ( ++p == pe ) goto _test_eof465; case 465: -#line 9151 "inc/vcf/validator_detail_v41.hpp" +#line 9153 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 48 ) goto tr647; goto tr625; @@ -9161,7 +9163,7 @@ case 465: if ( ++p == pe ) goto _test_eof466; case 466: -#line 9165 "inc/vcf/validator_detail_v41.hpp" +#line 9167 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 48 ) goto tr648; goto tr625; @@ -9175,7 +9177,7 @@ case 466: if ( ++p == pe ) goto _test_eof467; case 467: -#line 9179 "inc/vcf/validator_detail_v41.hpp" +#line 9181 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 71 ) goto tr649; goto tr625; @@ -9189,7 +9191,7 @@ case 467: if ( ++p == pe ) goto _test_eof529; case 529: -#line 9193 "inc/vcf/validator_detail_v41.hpp" +#line 9195 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 9: goto tr707; case 10: goto tr708; @@ -9208,7 +9210,7 @@ case 529: if ( ++p == pe ) goto _test_eof468; case 468: -#line 9212 "inc/vcf/validator_detail_v41.hpp" +#line 9214 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 49: goto tr627; case 95: goto tr628; @@ -9239,7 +9241,7 @@ case 468: if ( ++p == pe ) goto _test_eof530; case 530: -#line 9243 "inc/vcf/validator_detail_v41.hpp" +#line 9245 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 9: goto tr707; case 10: goto tr708; @@ -9268,7 +9270,7 @@ case 530: if ( ++p == pe ) goto _test_eof469; case 469: -#line 9272 "inc/vcf/validator_detail_v41.hpp" +#line 9274 "inc/vcf/validator_detail_v41.hpp" if ( (*p) > 58 ) { if ( 60 <= (*p) && (*p) <= 126 ) goto tr651; @@ -9285,7 +9287,7 @@ case 469: if ( ++p == pe ) goto _test_eof531; case 531: -#line 9289 "inc/vcf/validator_detail_v41.hpp" +#line 9291 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 9: goto tr707; case 10: goto tr708; @@ -9305,7 +9307,7 @@ case 531: if ( ++p == pe ) goto _test_eof470; case 470: -#line 9309 "inc/vcf/validator_detail_v41.hpp" +#line 9311 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 58 ) goto tr618; if ( (*p) < 65 ) { @@ -9343,7 +9345,7 @@ case 470: if ( ++p == pe ) goto _test_eof471; case 471: -#line 9347 "inc/vcf/validator_detail_v41.hpp" +#line 9349 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 9: goto tr623; case 58: goto st453; @@ -9379,7 +9381,7 @@ case 471: if ( ++p == pe ) goto _test_eof472; case 472: -#line 9383 "inc/vcf/validator_detail_v41.hpp" +#line 9385 "inc/vcf/validator_detail_v41.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr652; goto tr606; @@ -9393,7 +9395,7 @@ case 472: if ( ++p == pe ) goto _test_eof473; case 473: -#line 9397 "inc/vcf/validator_detail_v41.hpp" +#line 9399 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 9: goto tr614; case 69: goto tr616; @@ -9412,7 +9414,7 @@ case 473: if ( ++p == pe ) goto _test_eof474; case 474: -#line 9416 "inc/vcf/validator_detail_v41.hpp" +#line 9418 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 43: goto tr653; case 45: goto tr653; @@ -9430,7 +9432,7 @@ case 474: if ( ++p == pe ) goto _test_eof475; case 475: -#line 9434 "inc/vcf/validator_detail_v41.hpp" +#line 9436 "inc/vcf/validator_detail_v41.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr654; goto tr606; @@ -9444,7 +9446,7 @@ case 475: if ( ++p == pe ) goto _test_eof476; case 476: -#line 9448 "inc/vcf/validator_detail_v41.hpp" +#line 9450 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 9 ) goto tr614; if ( 48 <= (*p) && (*p) <= 57 ) @@ -9470,7 +9472,7 @@ case 476: if ( ++p == pe ) goto _test_eof477; case 477: -#line 9474 "inc/vcf/validator_detail_v41.hpp" +#line 9476 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 110 ) goto tr655; goto tr606; @@ -9484,7 +9486,7 @@ case 477: if ( ++p == pe ) goto _test_eof478; case 478: -#line 9488 "inc/vcf/validator_detail_v41.hpp" +#line 9490 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 102 ) goto tr656; goto tr606; @@ -9508,7 +9510,7 @@ case 478: if ( ++p == pe ) goto _test_eof479; case 479: -#line 9512 "inc/vcf/validator_detail_v41.hpp" +#line 9514 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 9 ) goto tr614; goto tr606; @@ -9526,7 +9528,7 @@ case 479: if ( ++p == pe ) goto _test_eof480; case 480: -#line 9530 "inc/vcf/validator_detail_v41.hpp" +#line 9532 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 97 ) goto tr657; goto tr606; @@ -9540,7 +9542,7 @@ case 480: if ( ++p == pe ) goto _test_eof481; case 481: -#line 9544 "inc/vcf/validator_detail_v41.hpp" +#line 9546 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 78 ) goto tr656; goto tr606; @@ -9554,7 +9556,7 @@ case 481: if ( ++p == pe ) goto _test_eof482; case 482: -#line 9558 "inc/vcf/validator_detail_v41.hpp" +#line 9560 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 42: goto tr598; case 46: goto tr658; @@ -9593,7 +9595,7 @@ case 482: if ( ++p == pe ) goto _test_eof483; case 483: -#line 9597 "inc/vcf/validator_detail_v41.hpp" +#line 9599 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 65: goto tr659; case 67: goto tr659; @@ -9617,7 +9619,7 @@ case 483: if ( ++p == pe ) goto _test_eof484; case 484: -#line 9621 "inc/vcf/validator_detail_v41.hpp" +#line 9623 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 9: goto tr604; case 44: goto tr605; @@ -9653,7 +9655,7 @@ case 484: if ( ++p == pe ) goto _test_eof485; case 485: -#line 9657 "inc/vcf/validator_detail_v41.hpp" +#line 9659 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 61 ) goto tr660; if ( (*p) < 63 ) { @@ -9693,7 +9695,7 @@ case 485: if ( ++p == pe ) goto _test_eof486; case 486: -#line 9697 "inc/vcf/validator_detail_v41.hpp" +#line 9699 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 62 ) goto tr662; if ( (*p) < 45 ) { @@ -9725,7 +9727,7 @@ case 486: if ( ++p == pe ) goto _test_eof487; case 487: -#line 9729 "inc/vcf/validator_detail_v41.hpp" +#line 9731 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 9: goto tr604; case 44: goto tr605; @@ -9754,7 +9756,7 @@ case 487: if ( ++p == pe ) goto _test_eof488; case 488: -#line 9758 "inc/vcf/validator_detail_v41.hpp" +#line 9760 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 60 ) goto tr667; if ( (*p) < 65 ) { @@ -9776,7 +9778,7 @@ case 488: if ( ++p == pe ) goto _test_eof489; case 489: -#line 9780 "inc/vcf/validator_detail_v41.hpp" +#line 9782 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 58: goto tr668; case 61: goto tr666; @@ -9800,7 +9802,7 @@ case 489: if ( ++p == pe ) goto _test_eof490; case 490: -#line 9804 "inc/vcf/validator_detail_v41.hpp" +#line 9806 "inc/vcf/validator_detail_v41.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr669; goto tr597; @@ -9814,7 +9816,7 @@ case 490: if ( ++p == pe ) goto _test_eof491; case 491: -#line 9818 "inc/vcf/validator_detail_v41.hpp" +#line 9820 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 91 ) goto tr662; if ( 48 <= (*p) && (*p) <= 57 ) @@ -9830,7 +9832,7 @@ case 491: if ( ++p == pe ) goto _test_eof492; case 492: -#line 9834 "inc/vcf/validator_detail_v41.hpp" +#line 9836 "inc/vcf/validator_detail_v41.hpp" if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) goto tr670; @@ -9850,7 +9852,7 @@ case 492: if ( ++p == pe ) goto _test_eof493; case 493: -#line 9854 "inc/vcf/validator_detail_v41.hpp" +#line 9856 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 59: goto tr670; case 62: goto tr671; @@ -9874,7 +9876,7 @@ case 493: if ( ++p == pe ) goto _test_eof494; case 494: -#line 9878 "inc/vcf/validator_detail_v41.hpp" +#line 9880 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 58 ) goto tr668; goto tr597; @@ -9888,7 +9890,7 @@ case 494: if ( ++p == pe ) goto _test_eof495; case 495: -#line 9892 "inc/vcf/validator_detail_v41.hpp" +#line 9894 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 60 ) goto tr673; if ( (*p) < 65 ) { @@ -9910,7 +9912,7 @@ case 495: if ( ++p == pe ) goto _test_eof496; case 496: -#line 9914 "inc/vcf/validator_detail_v41.hpp" +#line 9916 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 58: goto tr674; case 61: goto tr672; @@ -9934,7 +9936,7 @@ case 496: if ( ++p == pe ) goto _test_eof497; case 497: -#line 9938 "inc/vcf/validator_detail_v41.hpp" +#line 9940 "inc/vcf/validator_detail_v41.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr675; goto tr597; @@ -9948,7 +9950,7 @@ case 497: if ( ++p == pe ) goto _test_eof498; case 498: -#line 9952 "inc/vcf/validator_detail_v41.hpp" +#line 9954 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 93 ) goto tr662; if ( 48 <= (*p) && (*p) <= 57 ) @@ -9964,7 +9966,7 @@ case 498: if ( ++p == pe ) goto _test_eof499; case 499: -#line 9968 "inc/vcf/validator_detail_v41.hpp" +#line 9970 "inc/vcf/validator_detail_v41.hpp" if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) goto tr676; @@ -9984,7 +9986,7 @@ case 499: if ( ++p == pe ) goto _test_eof500; case 500: -#line 9988 "inc/vcf/validator_detail_v41.hpp" +#line 9990 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 59: goto tr676; case 62: goto tr677; @@ -10008,7 +10010,7 @@ case 500: if ( ++p == pe ) goto _test_eof501; case 501: -#line 10012 "inc/vcf/validator_detail_v41.hpp" +#line 10014 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 58 ) goto tr674; goto tr597; @@ -10026,7 +10028,7 @@ case 501: if ( ++p == pe ) goto _test_eof502; case 502: -#line 10030 "inc/vcf/validator_detail_v41.hpp" +#line 10032 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 60 ) goto tr679; if ( (*p) < 65 ) { @@ -10048,7 +10050,7 @@ case 502: if ( ++p == pe ) goto _test_eof503; case 503: -#line 10052 "inc/vcf/validator_detail_v41.hpp" +#line 10054 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 58: goto tr680; case 61: goto tr678; @@ -10072,7 +10074,7 @@ case 503: if ( ++p == pe ) goto _test_eof504; case 504: -#line 10076 "inc/vcf/validator_detail_v41.hpp" +#line 10078 "inc/vcf/validator_detail_v41.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr681; goto tr597; @@ -10086,7 +10088,7 @@ case 504: if ( ++p == pe ) goto _test_eof505; case 505: -#line 10090 "inc/vcf/validator_detail_v41.hpp" +#line 10092 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 91 ) goto tr682; if ( 48 <= (*p) && (*p) <= 57 ) @@ -10102,7 +10104,7 @@ case 505: if ( ++p == pe ) goto _test_eof506; case 506: -#line 10106 "inc/vcf/validator_detail_v41.hpp" +#line 10108 "inc/vcf/validator_detail_v41.hpp" if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) goto tr683; @@ -10122,7 +10124,7 @@ case 506: if ( ++p == pe ) goto _test_eof507; case 507: -#line 10126 "inc/vcf/validator_detail_v41.hpp" +#line 10128 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 59: goto tr683; case 62: goto tr684; @@ -10146,7 +10148,7 @@ case 507: if ( ++p == pe ) goto _test_eof508; case 508: -#line 10150 "inc/vcf/validator_detail_v41.hpp" +#line 10152 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 58 ) goto tr680; goto tr597; @@ -10164,7 +10166,7 @@ case 508: if ( ++p == pe ) goto _test_eof509; case 509: -#line 10168 "inc/vcf/validator_detail_v41.hpp" +#line 10170 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 60 ) goto tr686; if ( (*p) < 65 ) { @@ -10186,7 +10188,7 @@ case 509: if ( ++p == pe ) goto _test_eof510; case 510: -#line 10190 "inc/vcf/validator_detail_v41.hpp" +#line 10192 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 58: goto tr687; case 61: goto tr685; @@ -10210,7 +10212,7 @@ case 510: if ( ++p == pe ) goto _test_eof511; case 511: -#line 10214 "inc/vcf/validator_detail_v41.hpp" +#line 10216 "inc/vcf/validator_detail_v41.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr688; goto tr597; @@ -10224,7 +10226,7 @@ case 511: if ( ++p == pe ) goto _test_eof512; case 512: -#line 10228 "inc/vcf/validator_detail_v41.hpp" +#line 10230 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 93 ) goto tr682; if ( 48 <= (*p) && (*p) <= 57 ) @@ -10240,7 +10242,7 @@ case 512: if ( ++p == pe ) goto _test_eof513; case 513: -#line 10244 "inc/vcf/validator_detail_v41.hpp" +#line 10246 "inc/vcf/validator_detail_v41.hpp" if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) goto tr689; @@ -10260,7 +10262,7 @@ case 513: if ( ++p == pe ) goto _test_eof514; case 514: -#line 10264 "inc/vcf/validator_detail_v41.hpp" +#line 10266 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 59: goto tr689; case 62: goto tr690; @@ -10284,7 +10286,7 @@ case 514: if ( ++p == pe ) goto _test_eof515; case 515: -#line 10288 "inc/vcf/validator_detail_v41.hpp" +#line 10290 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 58 ) goto tr687; goto tr597; @@ -10302,7 +10304,7 @@ case 515: if ( ++p == pe ) goto _test_eof516; case 516: -#line 10306 "inc/vcf/validator_detail_v41.hpp" +#line 10308 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 9: goto tr604; case 65: goto tr659; @@ -10365,7 +10367,7 @@ case 516: if ( ++p == pe ) goto _test_eof517; case 517: -#line 10369 "inc/vcf/validator_detail_v41.hpp" +#line 10371 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 10 ) goto st521; goto tr566; @@ -10394,7 +10396,7 @@ case 517: if ( ++p == pe ) goto _test_eof518; case 518: -#line 10398 "inc/vcf/validator_detail_v41.hpp" +#line 10400 "inc/vcf/validator_detail_v41.hpp" if ( (*p) == 10 ) goto st22; goto tr0; @@ -10414,7 +10416,7 @@ case 518: if ( ++p == pe ) goto _test_eof519; case 519: -#line 10418 "inc/vcf/validator_detail_v41.hpp" +#line 10420 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 10: goto tr694; case 13: goto tr695; @@ -10438,7 +10440,7 @@ case 519: if ( ++p == pe ) goto _test_eof532; case 532: -#line 10442 "inc/vcf/validator_detail_v41.hpp" +#line 10444 "inc/vcf/validator_detail_v41.hpp" goto st0; tr698: #line 43 "src/vcf/vcf.ragel" @@ -10456,7 +10458,7 @@ case 532: if ( ++p == pe ) goto _test_eof520; case 520: -#line 10460 "inc/vcf/validator_detail_v41.hpp" +#line 10462 "inc/vcf/validator_detail_v41.hpp" switch( (*p) ) { case 10: goto tr697; case 13: goto tr698; @@ -10480,7 +10482,7 @@ case 520: if ( ++p == pe ) goto _test_eof533; case 533: -#line 10484 "inc/vcf/validator_detail_v41.hpp" +#line 10486 "inc/vcf/validator_detail_v41.hpp" goto st0; } _test_eof2: cs = 2; goto _test_eof; @@ -11037,7 +11039,9 @@ case 533: #line 60 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FileformatError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 25: @@ -11091,7 +11095,9 @@ case 533: #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 521: @@ -11125,14 +11131,18 @@ case 533: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 462: #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 74: @@ -11156,15 +11166,19 @@ case 533: case 95: case 96: case 100: -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 303: @@ -11175,15 +11189,19 @@ case 533: case 308: case 309: case 310: -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 330: @@ -11215,15 +11233,19 @@ case 533: case 358: case 359: case 360: -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 105: @@ -11249,15 +11271,19 @@ case 533: case 128: case 129: case 133: -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 137: @@ -11295,15 +11321,19 @@ case 533: case 176: case 177: case 181: -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 186: @@ -11340,15 +11370,19 @@ case 533: case 224: case 225: case 229: -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 234: @@ -11361,15 +11395,19 @@ case 533: case 241: case 242: case 249: -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 361: @@ -11383,15 +11421,19 @@ case 533: case 369: case 370: case 371: -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 250: @@ -11405,15 +11447,19 @@ case 533: case 258: case 259: case 299: -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 393: @@ -11453,7 +11499,7 @@ case 533: case 427: case 428: case 429: -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -11465,7 +11511,9 @@ case 533: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 78 "src/vcf/vcf.ragel" { @@ -11478,61 +11526,79 @@ case 533: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 440: case 459: case 460: case 461: -#line 407 "src/vcf/vcf.ragel" +#line 408 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ChromosomeBodyError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 441: case 442: -#line 413 "src/vcf/vcf.ragel" +#line 414 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new PositionBodyError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 443: case 444: -#line 419 "src/vcf/vcf.ragel" +#line 420 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new IdBodyError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 445: case 446: -#line 425 "src/vcf/vcf.ragel" +#line 426 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ReferenceAlleleBodyError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 447: @@ -11572,15 +11638,19 @@ case 533: case 514: case 515: case 516: -#line 431 "src/vcf/vcf.ragel" +#line 432 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new AlternateAllelesBodyError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 449: @@ -11596,15 +11666,19 @@ case 533: case 479: case 480: case 481: -#line 437 "src/vcf/vcf.ragel" +#line 438 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new QualityBodyError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 452: @@ -11612,29 +11686,37 @@ case 533: case 454: case 470: case 471: -#line 443 "src/vcf/vcf.ragel" +#line 444 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FilterBodyError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 463: -#line 465 "src/vcf/vcf.ragel" +#line 466 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " is not a valid string"; ErrorPolicy::handle_error(*this, new SamplesBodyError{n_lines, message_stream.str()}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 14: @@ -11649,12 +11731,16 @@ case 533: { ErrorPolicy::handle_error(*this, new FileformatError{n_lines, "The fileformat declaration is not 'fileformat=VCFv4.1'"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 60 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FileformatError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 456: @@ -11662,12 +11748,16 @@ case 533: #line 50 "src/vcf/vcf_v41.ragel" { ErrorPolicy::handle_error(*this, new FormatBodyError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 523: @@ -11704,6 +11794,7 @@ case 533: for(auto &error_ptr : symbolic_duplicates) { ErrorPolicy::handle_warning(*this, error_ptr.release()); } + validate_additional_checks(); } try { @@ -11724,9 +11815,11 @@ case 533: #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -11738,7 +11831,9 @@ case 533: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 78 "src/vcf/vcf.ragel" { @@ -11751,80 +11846,106 @@ case 533: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 81: case 82: case 83: -#line 263 "src/vcf/vcf.ragel" +#line 264 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "ALT metadata ID is not prefixed by DEL/INS/DUP/INV/CNV/BND and suffixed by ':' and a text sequence"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 104: -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 163: case 164: -#line 304 "src/vcf/vcf.ragel" +#line 305 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Type is not Integer, Float, Flag, Character or String"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 211: case 212: -#line 304 "src/vcf/vcf.ragel" +#line 305 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Type is not Integer, Float, Flag, Character or String"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 263: @@ -11836,20 +11957,26 @@ case 533: case 269: case 270: case 271: -#line 363 "src/vcf/vcf.ragel" +#line 364 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Genomes is not a valid string (maybe it contains quotes?)"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 273: @@ -11861,95 +11988,125 @@ case 533: case 279: case 280: case 281: -#line 368 "src/vcf/vcf.ragel" +#line 369 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Mixture is not a valid string (maybe it contains quotes?)"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 340: case 341: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 114: case 115: case 116: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 146: case 147: case 148: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 194: case 195: case 196: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 243: @@ -11958,38 +12115,50 @@ case 533: case 246: case 247: case 248: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 260: case 261: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 97: @@ -11998,20 +12167,26 @@ case 533: case 101: case 102: case 103: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 130: @@ -12020,20 +12195,26 @@ case 533: case 134: case 135: case 136: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 178: @@ -12042,20 +12223,26 @@ case 533: case 182: case 183: case 184: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 226: @@ -12064,20 +12251,26 @@ case 533: case 230: case 231: case 232: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 283: @@ -12099,20 +12292,26 @@ case 533: case 300: case 301: case 302: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 311: @@ -12134,20 +12333,26 @@ case 533: case 327: case 328: case 329: -#line 384 "src/vcf/vcf.ragel" +#line 385 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata URL is not valid"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 372: @@ -12171,20 +12376,26 @@ case 533: case 390: case 391: case 392: -#line 384 "src/vcf/vcf.ragel" +#line 385 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata URL is not valid"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 455: @@ -12193,58 +12404,76 @@ case 533: case 466: case 467: case 468: -#line 454 "src/vcf/vcf.ragel" +#line 455 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info key is not a sequence of alphanumeric and/or punctuation characters"}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 469: -#line 459 "src/vcf/vcf.ragel" +#line 460 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info field value is not a comma-separated list of valid strings (maybe it contains whitespaces?)"}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 458: -#line 472 "src/vcf/vcf.ragel" +#line 473 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " does not start with a valid genotype"; ErrorPolicy::handle_error(*this, new SamplesFieldBodyError{n_lines, message_stream.str(), "", "GT"}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } -#line 465 "src/vcf/vcf.ragel" +#line 466 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " is not a valid string"; ErrorPolicy::handle_error(*this, new SamplesBodyError{n_lines, message_stream.str()}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 156: @@ -12253,17 +12482,23 @@ case 533: #line 36 "src/vcf/vcf_v41.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "FORMAT metadata Number is not a number, A, G or dot"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 204: @@ -12272,31 +12507,41 @@ case 533: #line 42 "src/vcf/vcf_v41.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Number is not a number, A, G or dot"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 22: #line 60 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FileformatError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -12308,7 +12553,9 @@ case 533: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } #line 78 "src/vcf/vcf.ragel" { @@ -12321,128 +12568,174 @@ case 533: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st520;} + p--; { if ( p == pe ) + goto _test_eof520; +goto st520;} } break; case 272: -#line 363 "src/vcf/vcf.ragel" +#line 364 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Genomes is not a valid string (maybe it contains quotes?)"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 368 "src/vcf/vcf.ragel" +#line 369 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Mixture is not a valid string (maybe it contains quotes?)"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 282: -#line 368 "src/vcf/vcf.ragel" +#line 369 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Mixture is not a valid string (maybe it contains quotes?)"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 262: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 363 "src/vcf/vcf.ragel" +#line 364 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Genomes is not a valid string (maybe it contains quotes?)"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; case 24: -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st519;} + p--; { if ( p == pe ) + goto _test_eof519; +goto st519;} } break; -#line 12446 "inc/vcf/validator_detail_v41.hpp" +#line 12739 "inc/vcf/validator_detail_v41.hpp" } } diff --git a/inc/vcf/validator_detail_v42.hpp b/inc/vcf/validator_detail_v42.hpp index eb5c252ca..e5e9c3d29 100644 --- a/inc/vcf/validator_detail_v42.hpp +++ b/inc/vcf/validator_detail_v42.hpp @@ -45,8 +45,8 @@ namespace ebi { template - ParserImpl_v42::ParserImpl_v42(std::shared_ptr source) - : ParserImpl{source} + ParserImpl_v42::ParserImpl_v42(std::shared_ptr source, AdditionalChecks additionalChecks) + : ParserImpl{source, additionalChecks} { #line 53 "inc/vcf/validator_detail_v42.hpp" @@ -103,7 +103,7 @@ case 1: ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); p--; {goto st591;} } -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -137,7 +137,7 @@ case 1: ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); p--; {goto st591;} } -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -166,47 +166,47 @@ case 1: } goto st0; tr29: -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st591;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st591;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st591;} } -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); p--; {goto st591;} } -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); p--; {goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st591;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); p--; {goto st591;} } -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); p--; {goto st591;} @@ -225,7 +225,7 @@ case 1: } goto st0; tr125: -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st591;} @@ -237,13 +237,13 @@ case 1: } goto st0; tr133: -#line 263 "src/vcf/vcf.ragel" +#line 264 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "ALT metadata ID is not prefixed by DEL/INS/DUP/INV/CNV/BND and suffixed by ':' and a text sequence"}); p--; {goto st591;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st591;} @@ -255,12 +255,12 @@ case 1: } goto st0; tr152: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st591;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st591;} @@ -272,12 +272,12 @@ case 1: } goto st0; tr161: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st591;} @@ -289,17 +289,17 @@ case 1: } goto st0; tr175: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st591;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st591;} @@ -311,17 +311,17 @@ case 1: } goto st0; tr187: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st591;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st591;} @@ -333,12 +333,12 @@ case 1: } goto st0; tr193: -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st591;} @@ -350,7 +350,7 @@ case 1: } goto st0; tr196: -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st591;} @@ -362,12 +362,12 @@ case 1: } goto st0; tr206: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st591;} @@ -379,12 +379,12 @@ case 1: } goto st0; tr225: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st591;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st591;} @@ -396,17 +396,17 @@ case 1: } goto st0; tr247: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st591;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st591;} @@ -418,17 +418,17 @@ case 1: } goto st0; tr259: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st591;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st591;} @@ -440,7 +440,7 @@ case 1: } goto st0; tr265: -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st591;} @@ -452,12 +452,12 @@ case 1: } goto st0; tr275: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st591;} @@ -474,7 +474,7 @@ case 1: ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "FORMAT metadata Number is not a number, A, R, G or dot"}); p--; {goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st591;} @@ -486,12 +486,12 @@ case 1: } goto st0; tr297: -#line 304 "src/vcf/vcf.ragel" +#line 305 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Type is not Integer, Float, Flag, Character or String"}); p--; {goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st591;} @@ -503,12 +503,12 @@ case 1: } goto st0; tr314: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st591;} @@ -520,17 +520,17 @@ case 1: } goto st0; tr336: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st591;} @@ -542,17 +542,17 @@ case 1: } goto st0; tr348: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st591;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st591;} @@ -564,7 +564,7 @@ case 1: } goto st0; tr355: -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st591;} @@ -576,12 +576,12 @@ case 1: } goto st0; tr364: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st591;} @@ -598,7 +598,7 @@ case 1: ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Number is not a number, A, R, G or dot"}); p--; {goto st591;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st591;} @@ -610,12 +610,12 @@ case 1: } goto st0; tr386: -#line 304 "src/vcf/vcf.ragel" +#line 305 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Type is not Integer, Float, Flag, Character or String"}); p--; {goto st591;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st591;} @@ -627,12 +627,12 @@ case 1: } goto st0; tr403: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st591;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st591;} @@ -644,17 +644,17 @@ case 1: } goto st0; tr425: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st591;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st591;} @@ -666,17 +666,17 @@ case 1: } goto st0; tr437: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st591;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st591;} @@ -688,7 +688,7 @@ case 1: } goto st0; tr444: -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); p--; {goto st591;} @@ -700,12 +700,12 @@ case 1: } goto st0; tr454: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); p--; {goto st591;} @@ -717,7 +717,7 @@ case 1: } goto st0; tr466: -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st591;} @@ -729,12 +729,12 @@ case 1: } goto st0; tr477: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st591;} @@ -746,17 +746,17 @@ case 1: } goto st0; tr482: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 363 "src/vcf/vcf.ragel" +#line 364 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Genomes is not a valid string (maybe it contains quotes?)"}); p--; {goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st591;} @@ -768,12 +768,12 @@ case 1: } goto st0; tr484: -#line 363 "src/vcf/vcf.ragel" +#line 364 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Genomes is not a valid string (maybe it contains quotes?)"}); p--; {goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st591;} @@ -785,17 +785,17 @@ case 1: } goto st0; tr494: -#line 363 "src/vcf/vcf.ragel" +#line 364 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Genomes is not a valid string (maybe it contains quotes?)"}); p--; {goto st591;} } -#line 368 "src/vcf/vcf.ragel" +#line 369 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Mixture is not a valid string (maybe it contains quotes?)"}); p--; {goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st591;} @@ -807,12 +807,12 @@ case 1: } goto st0; tr497: -#line 368 "src/vcf/vcf.ragel" +#line 369 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Mixture is not a valid string (maybe it contains quotes?)"}); p--; {goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st591;} @@ -824,17 +824,17 @@ case 1: } goto st0; tr507: -#line 368 "src/vcf/vcf.ragel" +#line 369 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Mixture is not a valid string (maybe it contains quotes?)"}); p--; {goto st591;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st591;} @@ -846,12 +846,12 @@ case 1: } goto st0; tr510: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st591;} @@ -863,7 +863,7 @@ case 1: } goto st0; tr533: -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); p--; {goto st591;} @@ -875,12 +875,12 @@ case 1: } goto st0; tr542: -#line 384 "src/vcf/vcf.ragel" +#line 385 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata URL is not valid"}); p--; {goto st591;} } -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); p--; {goto st591;} @@ -892,7 +892,7 @@ case 1: } goto st0; tr563: -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); p--; {goto st591;} @@ -904,12 +904,12 @@ case 1: } goto st0; tr574: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st591;} } -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); p--; {goto st591;} @@ -921,7 +921,7 @@ case 1: } goto st0; tr612: -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); p--; {goto st591;} @@ -933,12 +933,12 @@ case 1: } goto st0; tr624: -#line 384 "src/vcf/vcf.ragel" +#line 385 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata URL is not valid"}); p--; {goto st591;} } -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); p--; {goto st591;} @@ -950,7 +950,7 @@ case 1: } goto st0; tr647: -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -994,7 +994,7 @@ case 1: } goto st0; tr702: -#line 407 "src/vcf/vcf.ragel" +#line 408 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ChromosomeBodyError{n_lines}); p--; {goto st592;} @@ -1006,7 +1006,7 @@ case 1: } goto st0; tr705: -#line 413 "src/vcf/vcf.ragel" +#line 414 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new PositionBodyError{n_lines}); p--; {goto st592;} @@ -1018,7 +1018,7 @@ case 1: } goto st0; tr709: -#line 419 "src/vcf/vcf.ragel" +#line 420 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new IdBodyError{n_lines}); p--; {goto st592;} @@ -1030,7 +1030,7 @@ case 1: } goto st0; tr714: -#line 425 "src/vcf/vcf.ragel" +#line 426 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ReferenceAlleleBodyError{n_lines}); p--; {goto st592;} @@ -1042,7 +1042,7 @@ case 1: } goto st0; tr718: -#line 431 "src/vcf/vcf.ragel" +#line 432 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new AlternateAllelesBodyError{n_lines}); p--; {goto st592;} @@ -1054,7 +1054,7 @@ case 1: } goto st0; tr727: -#line 437 "src/vcf/vcf.ragel" +#line 438 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new QualityBodyError{n_lines}); p--; {goto st592;} @@ -1066,7 +1066,7 @@ case 1: } goto st0; tr738: -#line 443 "src/vcf/vcf.ragel" +#line 444 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FilterBodyError{n_lines}); p--; {goto st592;} @@ -1078,12 +1078,12 @@ case 1: } goto st0; tr746: -#line 454 "src/vcf/vcf.ragel" +#line 455 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info key is not a sequence of alphanumeric and/or punctuation characters"}); p--; {goto st592;} } -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); p--; {goto st592;} @@ -1107,14 +1107,14 @@ case 1: } goto st0; tr755: -#line 472 "src/vcf/vcf.ragel" +#line 473 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " does not start with a valid genotype"; ErrorPolicy::handle_error(*this, new SamplesFieldBodyError{n_lines, message_stream.str(), "", "GT"}); p--; {goto st592;} } -#line 465 "src/vcf/vcf.ragel" +#line 466 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " is not a valid string"; @@ -1135,7 +1135,7 @@ case 1: } goto st0; tr765: -#line 465 "src/vcf/vcf.ragel" +#line 466 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " is not a valid string"; @@ -1149,12 +1149,12 @@ case 1: } goto st0; tr771: -#line 459 "src/vcf/vcf.ragel" +#line 460 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info field value is not a comma-separated list of valid strings (maybe it contains whitespaces?)"}); p--; {goto st592;} } -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); p--; {goto st592;} @@ -1179,7 +1179,7 @@ case 1: p--; {goto st592;} } -#line 407 "src/vcf/vcf.ragel" +#line 408 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ChromosomeBodyError{n_lines}); p--; {goto st592;} @@ -1191,7 +1191,7 @@ case 1: } goto st0; tr827: -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); p--; {goto st592;} @@ -11320,6 +11320,7 @@ case 596: for(auto &error_ptr : symbolic_duplicates) { ErrorPolicy::handle_warning(*this, error_ptr.release()); } + validate_additional_checks(); } try { @@ -11349,7 +11350,7 @@ case 596: if ( ++p == pe ) goto _test_eof597; case 597: -#line 11353 "inc/vcf/validator_detail_v42.hpp" +#line 11354 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 10: goto tr825; case 13: goto tr826; @@ -11378,7 +11379,7 @@ case 597: if ( ++p == pe ) goto _test_eof531; case 531: -#line 11382 "inc/vcf/validator_detail_v42.hpp" +#line 11383 "inc/vcf/validator_detail_v42.hpp" if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) goto tr759; @@ -11408,7 +11409,7 @@ case 531: if ( ++p == pe ) goto _test_eof532; case 532: -#line 11412 "inc/vcf/validator_detail_v42.hpp" +#line 11413 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 59: goto tr760; case 62: goto tr761; @@ -11432,7 +11433,7 @@ case 532: if ( ++p == pe ) goto _test_eof533; case 533: -#line 11436 "inc/vcf/validator_detail_v42.hpp" +#line 11437 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 9 ) goto tr762; goto tr702; @@ -11463,6 +11464,7 @@ case 533: for(auto &error_ptr : symbolic_duplicates) { ErrorPolicy::handle_warning(*this, error_ptr.release()); } + validate_additional_checks(); } try { @@ -11492,7 +11494,7 @@ case 533: if ( ++p == pe ) goto _test_eof534; case 534: -#line 11496 "inc/vcf/validator_detail_v42.hpp" +#line 11498 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 10 ) goto st597; goto tr763; @@ -11506,7 +11508,7 @@ case 534: if ( ++p == pe ) goto _test_eof535; case 535: -#line 11510 "inc/vcf/validator_detail_v42.hpp" +#line 11512 "inc/vcf/validator_detail_v42.hpp" if ( (*p) > 57 ) { if ( 59 <= (*p) && (*p) <= 126 ) goto tr766; @@ -11533,7 +11535,7 @@ case 535: if ( ++p == pe ) goto _test_eof598; case 598: -#line 11537 "inc/vcf/validator_detail_v42.hpp" +#line 11539 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 9: goto tr752; case 10: goto tr829; @@ -11555,7 +11557,7 @@ case 598: if ( ++p == pe ) goto _test_eof599; case 599: -#line 11559 "inc/vcf/validator_detail_v42.hpp" +#line 11561 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 9: goto tr752; case 10: goto tr829; @@ -11592,7 +11594,7 @@ case 599: if ( ++p == pe ) goto _test_eof600; case 600: -#line 11596 "inc/vcf/validator_detail_v42.hpp" +#line 11598 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 9: goto tr752; case 10: goto tr829; @@ -11624,7 +11626,7 @@ case 600: if ( ++p == pe ) goto _test_eof536; case 536: -#line 11628 "inc/vcf/validator_detail_v42.hpp" +#line 11630 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 48 ) goto tr767; goto tr746; @@ -11638,7 +11640,7 @@ case 536: if ( ++p == pe ) goto _test_eof537; case 537: -#line 11642 "inc/vcf/validator_detail_v42.hpp" +#line 11644 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 48 ) goto tr768; goto tr746; @@ -11652,7 +11654,7 @@ case 537: if ( ++p == pe ) goto _test_eof538; case 538: -#line 11656 "inc/vcf/validator_detail_v42.hpp" +#line 11658 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 48 ) goto tr769; goto tr746; @@ -11666,7 +11668,7 @@ case 538: if ( ++p == pe ) goto _test_eof539; case 539: -#line 11670 "inc/vcf/validator_detail_v42.hpp" +#line 11672 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 71 ) goto tr770; goto tr746; @@ -11680,7 +11682,7 @@ case 539: if ( ++p == pe ) goto _test_eof601; case 601: -#line 11684 "inc/vcf/validator_detail_v42.hpp" +#line 11686 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 9: goto tr828; case 10: goto tr829; @@ -11699,7 +11701,7 @@ case 601: if ( ++p == pe ) goto _test_eof540; case 540: -#line 11703 "inc/vcf/validator_detail_v42.hpp" +#line 11705 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 49: goto tr748; case 95: goto tr749; @@ -11730,7 +11732,7 @@ case 540: if ( ++p == pe ) goto _test_eof602; case 602: -#line 11734 "inc/vcf/validator_detail_v42.hpp" +#line 11736 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 9: goto tr828; case 10: goto tr829; @@ -11759,7 +11761,7 @@ case 602: if ( ++p == pe ) goto _test_eof541; case 541: -#line 11763 "inc/vcf/validator_detail_v42.hpp" +#line 11765 "inc/vcf/validator_detail_v42.hpp" if ( (*p) > 58 ) { if ( 60 <= (*p) && (*p) <= 126 ) goto tr772; @@ -11776,7 +11778,7 @@ case 541: if ( ++p == pe ) goto _test_eof603; case 603: -#line 11780 "inc/vcf/validator_detail_v42.hpp" +#line 11782 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 9: goto tr828; case 10: goto tr829; @@ -11796,7 +11798,7 @@ case 603: if ( ++p == pe ) goto _test_eof542; case 542: -#line 11800 "inc/vcf/validator_detail_v42.hpp" +#line 11802 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 58 ) goto tr739; if ( (*p) < 65 ) { @@ -11834,7 +11836,7 @@ case 542: if ( ++p == pe ) goto _test_eof543; case 543: -#line 11838 "inc/vcf/validator_detail_v42.hpp" +#line 11840 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 9: goto tr744; case 58: goto st525; @@ -11870,7 +11872,7 @@ case 543: if ( ++p == pe ) goto _test_eof544; case 544: -#line 11874 "inc/vcf/validator_detail_v42.hpp" +#line 11876 "inc/vcf/validator_detail_v42.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr773; goto tr727; @@ -11884,7 +11886,7 @@ case 544: if ( ++p == pe ) goto _test_eof545; case 545: -#line 11888 "inc/vcf/validator_detail_v42.hpp" +#line 11890 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 9: goto tr735; case 69: goto tr737; @@ -11903,7 +11905,7 @@ case 545: if ( ++p == pe ) goto _test_eof546; case 546: -#line 11907 "inc/vcf/validator_detail_v42.hpp" +#line 11909 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 43: goto tr774; case 45: goto tr774; @@ -11921,7 +11923,7 @@ case 546: if ( ++p == pe ) goto _test_eof547; case 547: -#line 11925 "inc/vcf/validator_detail_v42.hpp" +#line 11927 "inc/vcf/validator_detail_v42.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr775; goto tr727; @@ -11935,7 +11937,7 @@ case 547: if ( ++p == pe ) goto _test_eof548; case 548: -#line 11939 "inc/vcf/validator_detail_v42.hpp" +#line 11941 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 9 ) goto tr735; if ( 48 <= (*p) && (*p) <= 57 ) @@ -11961,7 +11963,7 @@ case 548: if ( ++p == pe ) goto _test_eof549; case 549: -#line 11965 "inc/vcf/validator_detail_v42.hpp" +#line 11967 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 110 ) goto tr776; goto tr727; @@ -11975,7 +11977,7 @@ case 549: if ( ++p == pe ) goto _test_eof550; case 550: -#line 11979 "inc/vcf/validator_detail_v42.hpp" +#line 11981 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 102 ) goto tr777; goto tr727; @@ -11999,7 +12001,7 @@ case 550: if ( ++p == pe ) goto _test_eof551; case 551: -#line 12003 "inc/vcf/validator_detail_v42.hpp" +#line 12005 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 9 ) goto tr735; goto tr727; @@ -12017,7 +12019,7 @@ case 551: if ( ++p == pe ) goto _test_eof552; case 552: -#line 12021 "inc/vcf/validator_detail_v42.hpp" +#line 12023 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 97 ) goto tr778; goto tr727; @@ -12031,7 +12033,7 @@ case 552: if ( ++p == pe ) goto _test_eof553; case 553: -#line 12035 "inc/vcf/validator_detail_v42.hpp" +#line 12037 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 78 ) goto tr777; goto tr727; @@ -12045,7 +12047,7 @@ case 553: if ( ++p == pe ) goto _test_eof554; case 554: -#line 12049 "inc/vcf/validator_detail_v42.hpp" +#line 12051 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 42: goto tr719; case 46: goto tr779; @@ -12084,7 +12086,7 @@ case 554: if ( ++p == pe ) goto _test_eof555; case 555: -#line 12088 "inc/vcf/validator_detail_v42.hpp" +#line 12090 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 65: goto tr780; case 67: goto tr780; @@ -12108,7 +12110,7 @@ case 555: if ( ++p == pe ) goto _test_eof556; case 556: -#line 12112 "inc/vcf/validator_detail_v42.hpp" +#line 12114 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 9: goto tr725; case 44: goto tr726; @@ -12144,7 +12146,7 @@ case 556: if ( ++p == pe ) goto _test_eof557; case 557: -#line 12148 "inc/vcf/validator_detail_v42.hpp" +#line 12150 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 61 ) goto tr781; if ( (*p) < 63 ) { @@ -12184,7 +12186,7 @@ case 557: if ( ++p == pe ) goto _test_eof558; case 558: -#line 12188 "inc/vcf/validator_detail_v42.hpp" +#line 12190 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 62 ) goto tr783; if ( (*p) < 45 ) { @@ -12216,7 +12218,7 @@ case 558: if ( ++p == pe ) goto _test_eof559; case 559: -#line 12220 "inc/vcf/validator_detail_v42.hpp" +#line 12222 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 9: goto tr725; case 44: goto tr726; @@ -12245,7 +12247,7 @@ case 559: if ( ++p == pe ) goto _test_eof560; case 560: -#line 12249 "inc/vcf/validator_detail_v42.hpp" +#line 12251 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 60 ) goto tr788; if ( (*p) < 65 ) { @@ -12267,7 +12269,7 @@ case 560: if ( ++p == pe ) goto _test_eof561; case 561: -#line 12271 "inc/vcf/validator_detail_v42.hpp" +#line 12273 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 58: goto tr789; case 61: goto tr787; @@ -12291,7 +12293,7 @@ case 561: if ( ++p == pe ) goto _test_eof562; case 562: -#line 12295 "inc/vcf/validator_detail_v42.hpp" +#line 12297 "inc/vcf/validator_detail_v42.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr790; goto tr718; @@ -12305,7 +12307,7 @@ case 562: if ( ++p == pe ) goto _test_eof563; case 563: -#line 12309 "inc/vcf/validator_detail_v42.hpp" +#line 12311 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 91 ) goto tr783; if ( 48 <= (*p) && (*p) <= 57 ) @@ -12321,7 +12323,7 @@ case 563: if ( ++p == pe ) goto _test_eof564; case 564: -#line 12325 "inc/vcf/validator_detail_v42.hpp" +#line 12327 "inc/vcf/validator_detail_v42.hpp" if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) goto tr791; @@ -12341,7 +12343,7 @@ case 564: if ( ++p == pe ) goto _test_eof565; case 565: -#line 12345 "inc/vcf/validator_detail_v42.hpp" +#line 12347 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 59: goto tr791; case 62: goto tr792; @@ -12365,7 +12367,7 @@ case 565: if ( ++p == pe ) goto _test_eof566; case 566: -#line 12369 "inc/vcf/validator_detail_v42.hpp" +#line 12371 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 58 ) goto tr789; goto tr718; @@ -12379,7 +12381,7 @@ case 566: if ( ++p == pe ) goto _test_eof567; case 567: -#line 12383 "inc/vcf/validator_detail_v42.hpp" +#line 12385 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 60 ) goto tr794; if ( (*p) < 65 ) { @@ -12401,7 +12403,7 @@ case 567: if ( ++p == pe ) goto _test_eof568; case 568: -#line 12405 "inc/vcf/validator_detail_v42.hpp" +#line 12407 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 58: goto tr795; case 61: goto tr793; @@ -12425,7 +12427,7 @@ case 568: if ( ++p == pe ) goto _test_eof569; case 569: -#line 12429 "inc/vcf/validator_detail_v42.hpp" +#line 12431 "inc/vcf/validator_detail_v42.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr796; goto tr718; @@ -12439,7 +12441,7 @@ case 569: if ( ++p == pe ) goto _test_eof570; case 570: -#line 12443 "inc/vcf/validator_detail_v42.hpp" +#line 12445 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 93 ) goto tr783; if ( 48 <= (*p) && (*p) <= 57 ) @@ -12455,7 +12457,7 @@ case 570: if ( ++p == pe ) goto _test_eof571; case 571: -#line 12459 "inc/vcf/validator_detail_v42.hpp" +#line 12461 "inc/vcf/validator_detail_v42.hpp" if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) goto tr797; @@ -12475,7 +12477,7 @@ case 571: if ( ++p == pe ) goto _test_eof572; case 572: -#line 12479 "inc/vcf/validator_detail_v42.hpp" +#line 12481 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 59: goto tr797; case 62: goto tr798; @@ -12499,7 +12501,7 @@ case 572: if ( ++p == pe ) goto _test_eof573; case 573: -#line 12503 "inc/vcf/validator_detail_v42.hpp" +#line 12505 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 58 ) goto tr795; goto tr718; @@ -12517,7 +12519,7 @@ case 573: if ( ++p == pe ) goto _test_eof574; case 574: -#line 12521 "inc/vcf/validator_detail_v42.hpp" +#line 12523 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 60 ) goto tr800; if ( (*p) < 65 ) { @@ -12539,7 +12541,7 @@ case 574: if ( ++p == pe ) goto _test_eof575; case 575: -#line 12543 "inc/vcf/validator_detail_v42.hpp" +#line 12545 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 58: goto tr801; case 61: goto tr799; @@ -12563,7 +12565,7 @@ case 575: if ( ++p == pe ) goto _test_eof576; case 576: -#line 12567 "inc/vcf/validator_detail_v42.hpp" +#line 12569 "inc/vcf/validator_detail_v42.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr802; goto tr718; @@ -12577,7 +12579,7 @@ case 576: if ( ++p == pe ) goto _test_eof577; case 577: -#line 12581 "inc/vcf/validator_detail_v42.hpp" +#line 12583 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 91 ) goto tr803; if ( 48 <= (*p) && (*p) <= 57 ) @@ -12593,7 +12595,7 @@ case 577: if ( ++p == pe ) goto _test_eof578; case 578: -#line 12597 "inc/vcf/validator_detail_v42.hpp" +#line 12599 "inc/vcf/validator_detail_v42.hpp" if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) goto tr804; @@ -12613,7 +12615,7 @@ case 578: if ( ++p == pe ) goto _test_eof579; case 579: -#line 12617 "inc/vcf/validator_detail_v42.hpp" +#line 12619 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 59: goto tr804; case 62: goto tr805; @@ -12637,7 +12639,7 @@ case 579: if ( ++p == pe ) goto _test_eof580; case 580: -#line 12641 "inc/vcf/validator_detail_v42.hpp" +#line 12643 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 58 ) goto tr801; goto tr718; @@ -12655,7 +12657,7 @@ case 580: if ( ++p == pe ) goto _test_eof581; case 581: -#line 12659 "inc/vcf/validator_detail_v42.hpp" +#line 12661 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 60 ) goto tr807; if ( (*p) < 65 ) { @@ -12677,7 +12679,7 @@ case 581: if ( ++p == pe ) goto _test_eof582; case 582: -#line 12681 "inc/vcf/validator_detail_v42.hpp" +#line 12683 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 58: goto tr808; case 61: goto tr806; @@ -12701,7 +12703,7 @@ case 582: if ( ++p == pe ) goto _test_eof583; case 583: -#line 12705 "inc/vcf/validator_detail_v42.hpp" +#line 12707 "inc/vcf/validator_detail_v42.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr809; goto tr718; @@ -12715,7 +12717,7 @@ case 583: if ( ++p == pe ) goto _test_eof584; case 584: -#line 12719 "inc/vcf/validator_detail_v42.hpp" +#line 12721 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 93 ) goto tr803; if ( 48 <= (*p) && (*p) <= 57 ) @@ -12731,7 +12733,7 @@ case 584: if ( ++p == pe ) goto _test_eof585; case 585: -#line 12735 "inc/vcf/validator_detail_v42.hpp" +#line 12737 "inc/vcf/validator_detail_v42.hpp" if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) goto tr810; @@ -12751,7 +12753,7 @@ case 585: if ( ++p == pe ) goto _test_eof586; case 586: -#line 12755 "inc/vcf/validator_detail_v42.hpp" +#line 12757 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 59: goto tr810; case 62: goto tr811; @@ -12775,7 +12777,7 @@ case 586: if ( ++p == pe ) goto _test_eof587; case 587: -#line 12779 "inc/vcf/validator_detail_v42.hpp" +#line 12781 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 58 ) goto tr808; goto tr718; @@ -12793,7 +12795,7 @@ case 587: if ( ++p == pe ) goto _test_eof588; case 588: -#line 12797 "inc/vcf/validator_detail_v42.hpp" +#line 12799 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 9: goto tr725; case 65: goto tr780; @@ -12856,7 +12858,7 @@ case 588: if ( ++p == pe ) goto _test_eof589; case 589: -#line 12860 "inc/vcf/validator_detail_v42.hpp" +#line 12862 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 10 ) goto st593; goto tr687; @@ -12885,7 +12887,7 @@ case 589: if ( ++p == pe ) goto _test_eof590; case 590: -#line 12889 "inc/vcf/validator_detail_v42.hpp" +#line 12891 "inc/vcf/validator_detail_v42.hpp" if ( (*p) == 10 ) goto st22; goto tr0; @@ -12905,7 +12907,7 @@ case 590: if ( ++p == pe ) goto _test_eof591; case 591: -#line 12909 "inc/vcf/validator_detail_v42.hpp" +#line 12911 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 10: goto tr815; case 13: goto tr816; @@ -12929,7 +12931,7 @@ case 591: if ( ++p == pe ) goto _test_eof604; case 604: -#line 12933 "inc/vcf/validator_detail_v42.hpp" +#line 12935 "inc/vcf/validator_detail_v42.hpp" goto st0; tr819: #line 43 "src/vcf/vcf.ragel" @@ -12947,7 +12949,7 @@ case 604: if ( ++p == pe ) goto _test_eof592; case 592: -#line 12951 "inc/vcf/validator_detail_v42.hpp" +#line 12953 "inc/vcf/validator_detail_v42.hpp" switch( (*p) ) { case 10: goto tr818; case 13: goto tr819; @@ -12971,7 +12973,7 @@ case 592: if ( ++p == pe ) goto _test_eof605; case 605: -#line 12975 "inc/vcf/validator_detail_v42.hpp" +#line 12977 "inc/vcf/validator_detail_v42.hpp" goto st0; } _test_eof2: cs = 2; goto _test_eof; @@ -13600,7 +13602,9 @@ case 605: #line 60 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FileformatError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 25: @@ -13654,7 +13658,9 @@ case 605: #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 593: @@ -13688,14 +13694,18 @@ case 605: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 534: #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 74: @@ -13720,15 +13730,19 @@ case 605: case 96: case 103: case 114: -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 375: @@ -13739,15 +13753,19 @@ case 605: case 380: case 381: case 382: -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 402: @@ -13779,15 +13797,19 @@ case 605: case 430: case 431: case 432: -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 123: @@ -13814,15 +13836,19 @@ case 605: case 147: case 154: case 165: -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 173: @@ -13861,15 +13887,19 @@ case 605: case 213: case 220: case 231: -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 240: @@ -13907,15 +13937,19 @@ case 605: case 279: case 286: case 297: -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 306: @@ -13928,15 +13962,19 @@ case 605: case 313: case 314: case 321: -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 433: @@ -13950,15 +13988,19 @@ case 605: case 441: case 442: case 443: -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 322: @@ -13972,15 +14014,19 @@ case 605: case 330: case 331: case 371: -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 465: @@ -14020,7 +14066,7 @@ case 605: case 499: case 500: case 501: -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -14032,7 +14078,9 @@ case 605: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 78 "src/vcf/vcf.ragel" { @@ -14045,61 +14093,79 @@ case 605: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 512: case 531: case 532: case 533: -#line 407 "src/vcf/vcf.ragel" +#line 408 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ChromosomeBodyError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 513: case 514: -#line 413 "src/vcf/vcf.ragel" +#line 414 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new PositionBodyError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 515: case 516: -#line 419 "src/vcf/vcf.ragel" +#line 420 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new IdBodyError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 517: case 518: -#line 425 "src/vcf/vcf.ragel" +#line 426 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ReferenceAlleleBodyError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 519: @@ -14139,15 +14205,19 @@ case 605: case 586: case 587: case 588: -#line 431 "src/vcf/vcf.ragel" +#line 432 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new AlternateAllelesBodyError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 521: @@ -14163,15 +14233,19 @@ case 605: case 551: case 552: case 553: -#line 437 "src/vcf/vcf.ragel" +#line 438 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new QualityBodyError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 524: @@ -14179,29 +14253,37 @@ case 605: case 526: case 542: case 543: -#line 443 "src/vcf/vcf.ragel" +#line 444 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FilterBodyError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 535: -#line 465 "src/vcf/vcf.ragel" +#line 466 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " is not a valid string"; ErrorPolicy::handle_error(*this, new SamplesBodyError{n_lines, message_stream.str()}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 14: @@ -14216,12 +14298,16 @@ case 605: { ErrorPolicy::handle_error(*this, new FileformatError{n_lines, "The fileformat declaration is not 'fileformat=VCFv4.2'"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 60 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FileformatError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 528: @@ -14229,12 +14315,16 @@ case 605: #line 50 "src/vcf/vcf_v42.ragel" { ErrorPolicy::handle_error(*this, new FormatBodyError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 595: @@ -14271,6 +14361,7 @@ case 605: for(auto &error_ptr : symbolic_duplicates) { ErrorPolicy::handle_warning(*this, error_ptr.release()); } + validate_additional_checks(); } try { @@ -14291,9 +14382,11 @@ case 605: #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -14305,7 +14398,9 @@ case 605: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 78 "src/vcf/vcf.ragel" { @@ -14318,80 +14413,106 @@ case 605: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 81: case 82: case 83: -#line 263 "src/vcf/vcf.ragel" +#line 264 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "ALT metadata ID is not prefixed by DEL/INS/DUP/INV/CNV/BND and suffixed by ':' and a text sequence"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 122: -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 199: case 200: -#line 304 "src/vcf/vcf.ragel" +#line 305 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Type is not Integer, Float, Flag, Character or String"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 265: case 266: -#line 304 "src/vcf/vcf.ragel" +#line 305 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Type is not Integer, Float, Flag, Character or String"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 335: @@ -14403,20 +14524,26 @@ case 605: case 341: case 342: case 343: -#line 363 "src/vcf/vcf.ragel" +#line 364 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Genomes is not a valid string (maybe it contains quotes?)"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 345: @@ -14428,57 +14555,75 @@ case 605: case 351: case 352: case 353: -#line 368 "src/vcf/vcf.ragel" +#line 369 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Mixture is not a valid string (maybe it contains quotes?)"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 100: case 101: case 102: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 412: case 413: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 132: @@ -14487,20 +14632,26 @@ case 605: case 151: case 152: case 153: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 182: @@ -14509,20 +14660,26 @@ case 605: case 217: case 218: case 219: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 248: @@ -14531,20 +14688,26 @@ case 605: case 283: case 284: case 285: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 315: @@ -14553,38 +14716,50 @@ case 605: case 318: case 319: case 320: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 332: case 333: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 97: @@ -14601,20 +14776,26 @@ case 605: case 116: case 120: case 121: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 148: @@ -14631,20 +14812,26 @@ case 605: case 167: case 171: case 172: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 214: @@ -14661,20 +14848,26 @@ case 605: case 233: case 237: case 238: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 280: @@ -14691,20 +14884,26 @@ case 605: case 299: case 303: case 304: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 355: @@ -14726,20 +14925,26 @@ case 605: case 372: case 373: case 374: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 383: @@ -14761,20 +14966,26 @@ case 605: case 399: case 400: case 401: -#line 384 "src/vcf/vcf.ragel" +#line 385 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata URL is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 444: @@ -14798,20 +15009,26 @@ case 605: case 462: case 463: case 464: -#line 384 "src/vcf/vcf.ragel" +#line 385 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata URL is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 527: @@ -14820,58 +15037,76 @@ case 605: case 538: case 539: case 540: -#line 454 "src/vcf/vcf.ragel" +#line 455 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info key is not a sequence of alphanumeric and/or punctuation characters"}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 541: -#line 459 "src/vcf/vcf.ragel" +#line 460 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info field value is not a comma-separated list of valid strings (maybe it contains whitespaces?)"}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 530: -#line 472 "src/vcf/vcf.ragel" +#line 473 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " does not start with a valid genotype"; ErrorPolicy::handle_error(*this, new SamplesFieldBodyError{n_lines, message_stream.str(), "", "GT"}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } -#line 465 "src/vcf/vcf.ragel" +#line 466 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " is not a valid string"; ErrorPolicy::handle_error(*this, new SamplesBodyError{n_lines, message_stream.str()}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 192: @@ -14880,17 +15115,23 @@ case 605: #line 36 "src/vcf/vcf_v42.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "FORMAT metadata Number is not a number, A, R, G or dot"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 258: @@ -14899,31 +15140,41 @@ case 605: #line 42 "src/vcf/vcf_v42.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Number is not a number, A, R, G or dot"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 22: #line 60 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FileformatError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -14935,7 +15186,9 @@ case 605: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } #line 78 "src/vcf/vcf.ragel" { @@ -14948,320 +15201,430 @@ case 605: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st592;} + p--; { if ( p == pe ) + goto _test_eof592; +goto st592;} } break; case 344: -#line 363 "src/vcf/vcf.ragel" +#line 364 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Genomes is not a valid string (maybe it contains quotes?)"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 368 "src/vcf/vcf.ragel" +#line 369 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Mixture is not a valid string (maybe it contains quotes?)"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 354: -#line 368 "src/vcf/vcf.ragel" +#line 369 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Mixture is not a valid string (maybe it contains quotes?)"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 334: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 363 "src/vcf/vcf.ragel" +#line 364 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "SAMPLE metadata Genomes is not a valid string (maybe it contains quotes?)"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 108: case 109: case 110: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 159: case 160: case 161: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 225: case 226: case 227: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 291: case 292: case 293: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 117: case 118: case 119: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 168: case 169: case 170: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 234: case 235: case 236: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 300: case 301: case 302: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; case 24: -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st591;} + p--; { if ( p == pe ) + goto _test_eof591; +goto st591;} } break; -#line 15265 "inc/vcf/validator_detail_v42.hpp" +#line 15628 "inc/vcf/validator_detail_v42.hpp" } } diff --git a/inc/vcf/validator_detail_v43.hpp b/inc/vcf/validator_detail_v43.hpp index aff565e3b..e6ef34450 100644 --- a/inc/vcf/validator_detail_v43.hpp +++ b/inc/vcf/validator_detail_v43.hpp @@ -45,8 +45,8 @@ namespace ebi { template - ParserImpl_v43::ParserImpl_v43(std::shared_ptr source) - : ParserImpl{source} + ParserImpl_v43::ParserImpl_v43(std::shared_ptr source, AdditionalChecks additionalChecks) + : ParserImpl{source, additionalChecks} { #line 53 "inc/vcf/validator_detail_v43.hpp" @@ -103,7 +103,7 @@ case 1: ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); p--; {goto st659;} } -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -137,7 +137,7 @@ case 1: ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); p--; {goto st659;} } -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -166,52 +166,52 @@ case 1: } goto st0; tr29: -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st659;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st659;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st659;} } -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); p--; {goto st659;} } -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); p--; {goto st659;} } -#line 337 "src/vcf/vcf.ragel" +#line 338 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in META metadata"}); p--; {goto st659;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st659;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); p--; {goto st659;} } -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); p--; {goto st659;} @@ -230,7 +230,7 @@ case 1: } goto st0; tr126: -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st659;} @@ -242,13 +242,13 @@ case 1: } goto st0; tr134: -#line 263 "src/vcf/vcf.ragel" +#line 264 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "ALT metadata ID is not prefixed by DEL/INS/DUP/INV/CNV/BND and suffixed by ':' and a text sequence"}); p--; {goto st659;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st659;} @@ -260,12 +260,12 @@ case 1: } goto st0; tr153: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st659;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st659;} @@ -277,12 +277,12 @@ case 1: } goto st0; tr162: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st659;} @@ -294,17 +294,17 @@ case 1: } goto st0; tr176: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st659;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st659;} @@ -316,17 +316,17 @@ case 1: } goto st0; tr188: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st659;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); p--; {goto st659;} @@ -338,12 +338,12 @@ case 1: } goto st0; tr194: -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st659;} @@ -355,7 +355,7 @@ case 1: } goto st0; tr197: -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st659;} @@ -367,12 +367,12 @@ case 1: } goto st0; tr207: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st659;} @@ -384,12 +384,12 @@ case 1: } goto st0; tr226: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st659;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st659;} @@ -401,17 +401,17 @@ case 1: } goto st0; tr248: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st659;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st659;} @@ -423,17 +423,17 @@ case 1: } goto st0; tr260: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st659;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); p--; {goto st659;} @@ -445,7 +445,7 @@ case 1: } goto st0; tr266: -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st659;} @@ -457,12 +457,12 @@ case 1: } goto st0; tr276: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st659;} @@ -479,7 +479,7 @@ case 1: ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "FORMAT metadata Number is not a number, A, R, G or dot"}); p--; {goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st659;} @@ -491,12 +491,12 @@ case 1: } goto st0; tr298: -#line 304 "src/vcf/vcf.ragel" +#line 305 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Type is not Integer, Float, Flag, Character or String"}); p--; {goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st659;} @@ -508,12 +508,12 @@ case 1: } goto st0; tr315: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st659;} @@ -525,17 +525,17 @@ case 1: } goto st0; tr337: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st659;} @@ -547,17 +547,17 @@ case 1: } goto st0; tr349: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st659;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); p--; {goto st659;} @@ -569,7 +569,7 @@ case 1: } goto st0; tr356: -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st659;} @@ -581,12 +581,12 @@ case 1: } goto st0; tr365: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st659;} @@ -603,7 +603,7 @@ case 1: ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Number is not a number, A, R, G or dot"}); p--; {goto st659;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st659;} @@ -615,12 +615,12 @@ case 1: } goto st0; tr387: -#line 304 "src/vcf/vcf.ragel" +#line 305 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Type is not Integer, Float, Flag, Character or String"}); p--; {goto st659;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st659;} @@ -632,12 +632,12 @@ case 1: } goto st0; tr404: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st659;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st659;} @@ -649,17 +649,17 @@ case 1: } goto st0; tr426: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st659;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st659;} @@ -671,17 +671,17 @@ case 1: } goto st0; tr438: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); p--; {goto st659;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); p--; {goto st659;} @@ -693,7 +693,7 @@ case 1: } goto st0; tr445: -#line 337 "src/vcf/vcf.ragel" +#line 338 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in META metadata"}); p--; {goto st659;} @@ -705,12 +705,12 @@ case 1: } goto st0; tr454: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 337 "src/vcf/vcf.ragel" +#line 338 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in META metadata"}); p--; {goto st659;} @@ -722,12 +722,12 @@ case 1: } goto st0; tr467: -#line 342 "src/vcf/vcf.ragel" +#line 343 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "META metadata Number is not a dot"}); p--; {goto st659;} } -#line 337 "src/vcf/vcf.ragel" +#line 338 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in META metadata"}); p--; {goto st659;} @@ -739,12 +739,12 @@ case 1: } goto st0; tr475: -#line 347 "src/vcf/vcf.ragel" +#line 348 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "META metadata Type is not String"}); p--; {goto st659;} } -#line 337 "src/vcf/vcf.ragel" +#line 338 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in META metadata"}); p--; {goto st659;} @@ -756,12 +756,12 @@ case 1: } goto st0; tr492: -#line 352 "src/vcf/vcf.ragel" +#line 353 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "META metadata Values is not a square-bracket delimited list of values"}); p--; {goto st659;} } -#line 337 "src/vcf/vcf.ragel" +#line 338 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in META metadata"}); p--; {goto st659;} @@ -773,7 +773,7 @@ case 1: } goto st0; tr498: -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); p--; {goto st659;} @@ -785,12 +785,12 @@ case 1: } goto st0; tr511: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); p--; {goto st659;} @@ -802,12 +802,12 @@ case 1: } goto st0; tr517: -#line 325 "src/vcf/vcf.ragel" +#line 326 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "PEDIGREE metadata sequence of Name_N is not valid"}); p--; {goto st659;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); p--; {goto st659;} @@ -819,12 +819,12 @@ case 1: } goto st0; tr527: -#line 320 "src/vcf/vcf.ragel" +#line 321 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "PEDIGREE metadata Father or Mother is not valid"}); p--; {goto st659;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); p--; {goto st659;} @@ -836,12 +836,12 @@ case 1: } goto st0; tr564: -#line 315 "src/vcf/vcf.ragel" +#line 316 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "PEDIGREE metadata Original is not valid"}); p--; {goto st659;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); p--; {goto st659;} @@ -853,7 +853,7 @@ case 1: } goto st0; tr569: -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st659;} @@ -865,12 +865,12 @@ case 1: } goto st0; tr580: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); p--; {goto st659;} @@ -882,7 +882,7 @@ case 1: } goto st0; tr620: -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); p--; {goto st659;} @@ -894,12 +894,12 @@ case 1: } goto st0; tr629: -#line 384 "src/vcf/vcf.ragel" +#line 385 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata URL is not valid"}); p--; {goto st659;} } -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); p--; {goto st659;} @@ -911,7 +911,7 @@ case 1: } goto st0; tr650: -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); p--; {goto st659;} @@ -923,12 +923,12 @@ case 1: } goto st0; tr661: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); p--; {goto st659;} } -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); p--; {goto st659;} @@ -940,7 +940,7 @@ case 1: } goto st0; tr699: -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); p--; {goto st659;} @@ -952,12 +952,12 @@ case 1: } goto st0; tr711: -#line 384 "src/vcf/vcf.ragel" +#line 385 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata URL is not valid"}); p--; {goto st659;} } -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); p--; {goto st659;} @@ -969,7 +969,7 @@ case 1: } goto st0; tr734: -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -1013,7 +1013,7 @@ case 1: } goto st0; tr789: -#line 407 "src/vcf/vcf.ragel" +#line 408 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ChromosomeBodyError{n_lines}); p--; {goto st660;} @@ -1025,7 +1025,7 @@ case 1: } goto st0; tr792: -#line 413 "src/vcf/vcf.ragel" +#line 414 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new PositionBodyError{n_lines}); p--; {goto st660;} @@ -1037,7 +1037,7 @@ case 1: } goto st0; tr796: -#line 419 "src/vcf/vcf.ragel" +#line 420 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new IdBodyError{n_lines}); p--; {goto st660;} @@ -1049,7 +1049,7 @@ case 1: } goto st0; tr801: -#line 425 "src/vcf/vcf.ragel" +#line 426 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ReferenceAlleleBodyError{n_lines}); p--; {goto st660;} @@ -1061,7 +1061,7 @@ case 1: } goto st0; tr805: -#line 431 "src/vcf/vcf.ragel" +#line 432 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new AlternateAllelesBodyError{n_lines}); p--; {goto st660;} @@ -1073,7 +1073,7 @@ case 1: } goto st0; tr814: -#line 437 "src/vcf/vcf.ragel" +#line 438 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new QualityBodyError{n_lines}); p--; {goto st660;} @@ -1085,7 +1085,7 @@ case 1: } goto st0; tr825: -#line 443 "src/vcf/vcf.ragel" +#line 444 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FilterBodyError{n_lines}); p--; {goto st660;} @@ -1097,12 +1097,12 @@ case 1: } goto st0; tr833: -#line 454 "src/vcf/vcf.ragel" +#line 455 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info key is not a sequence of alphanumeric and/or punctuation characters"}); p--; {goto st660;} } -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); p--; {goto st660;} @@ -1126,14 +1126,14 @@ case 1: } goto st0; tr842: -#line 472 "src/vcf/vcf.ragel" +#line 473 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " does not start with a valid genotype"; ErrorPolicy::handle_error(*this, new SamplesFieldBodyError{n_lines, message_stream.str(), "", "GT"}); p--; {goto st660;} } -#line 465 "src/vcf/vcf.ragel" +#line 466 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " is not a valid string"; @@ -1154,7 +1154,7 @@ case 1: } goto st0; tr852: -#line 465 "src/vcf/vcf.ragel" +#line 466 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " is not a valid string"; @@ -1168,12 +1168,12 @@ case 1: } goto st0; tr858: -#line 459 "src/vcf/vcf.ragel" +#line 460 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info field value is not a comma-separated list of valid strings (maybe it contains whitespaces?)"}); p--; {goto st660;} } -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); p--; {goto st660;} @@ -1198,7 +1198,7 @@ case 1: p--; {goto st660;} } -#line 407 "src/vcf/vcf.ragel" +#line 408 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ChromosomeBodyError{n_lines}); p--; {goto st660;} @@ -1210,7 +1210,7 @@ case 1: } goto st0; tr915: -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); p--; {goto st660;} @@ -12587,6 +12587,7 @@ case 664: for(auto &error_ptr : symbolic_duplicates) { ErrorPolicy::handle_warning(*this, error_ptr.release()); } + validate_additional_checks(); } try { @@ -12616,7 +12617,7 @@ case 664: if ( ++p == pe ) goto _test_eof665; case 665: -#line 12620 "inc/vcf/validator_detail_v43.hpp" +#line 12621 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 10: goto tr913; case 13: goto tr914; @@ -12654,7 +12655,7 @@ case 665: if ( ++p == pe ) goto _test_eof597; case 597: -#line 12658 "inc/vcf/validator_detail_v43.hpp" +#line 12659 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr846; case 59: goto tr846; @@ -12695,7 +12696,7 @@ case 597: if ( ++p == pe ) goto _test_eof598; case 598: -#line 12699 "inc/vcf/validator_detail_v43.hpp" +#line 12700 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr847; case 59: goto tr847; @@ -12724,7 +12725,7 @@ case 598: if ( ++p == pe ) goto _test_eof599; case 599: -#line 12728 "inc/vcf/validator_detail_v43.hpp" +#line 12729 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 9 ) goto tr849; goto tr789; @@ -12755,6 +12756,7 @@ case 599: for(auto &error_ptr : symbolic_duplicates) { ErrorPolicy::handle_warning(*this, error_ptr.release()); } + validate_additional_checks(); } try { @@ -12784,7 +12786,7 @@ case 599: if ( ++p == pe ) goto _test_eof600; case 600: -#line 12788 "inc/vcf/validator_detail_v43.hpp" +#line 12790 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 10 ) goto st665; goto tr850; @@ -12798,7 +12800,7 @@ case 600: if ( ++p == pe ) goto _test_eof601; case 601: -#line 12802 "inc/vcf/validator_detail_v43.hpp" +#line 12804 "inc/vcf/validator_detail_v43.hpp" if ( (*p) > 57 ) { if ( 59 <= (*p) && (*p) <= 126 ) goto tr853; @@ -12825,7 +12827,7 @@ case 601: if ( ++p == pe ) goto _test_eof666; case 666: -#line 12829 "inc/vcf/validator_detail_v43.hpp" +#line 12831 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 9: goto tr839; case 10: goto tr917; @@ -12847,7 +12849,7 @@ case 666: if ( ++p == pe ) goto _test_eof667; case 667: -#line 12851 "inc/vcf/validator_detail_v43.hpp" +#line 12853 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 9: goto tr839; case 10: goto tr917; @@ -12884,7 +12886,7 @@ case 667: if ( ++p == pe ) goto _test_eof668; case 668: -#line 12888 "inc/vcf/validator_detail_v43.hpp" +#line 12890 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 9: goto tr839; case 10: goto tr917; @@ -12916,7 +12918,7 @@ case 668: if ( ++p == pe ) goto _test_eof602; case 602: -#line 12920 "inc/vcf/validator_detail_v43.hpp" +#line 12922 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 48 ) goto tr854; goto tr833; @@ -12930,7 +12932,7 @@ case 602: if ( ++p == pe ) goto _test_eof603; case 603: -#line 12934 "inc/vcf/validator_detail_v43.hpp" +#line 12936 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 48 ) goto tr855; goto tr833; @@ -12944,7 +12946,7 @@ case 603: if ( ++p == pe ) goto _test_eof604; case 604: -#line 12948 "inc/vcf/validator_detail_v43.hpp" +#line 12950 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 48 ) goto tr856; goto tr833; @@ -12958,7 +12960,7 @@ case 604: if ( ++p == pe ) goto _test_eof605; case 605: -#line 12962 "inc/vcf/validator_detail_v43.hpp" +#line 12964 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 71 ) goto tr857; goto tr833; @@ -12972,7 +12974,7 @@ case 605: if ( ++p == pe ) goto _test_eof669; case 669: -#line 12976 "inc/vcf/validator_detail_v43.hpp" +#line 12978 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 9: goto tr916; case 10: goto tr917; @@ -12991,7 +12993,7 @@ case 669: if ( ++p == pe ) goto _test_eof606; case 606: -#line 12995 "inc/vcf/validator_detail_v43.hpp" +#line 12997 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 49: goto tr835; case 95: goto tr836; @@ -13022,7 +13024,7 @@ case 606: if ( ++p == pe ) goto _test_eof670; case 670: -#line 13026 "inc/vcf/validator_detail_v43.hpp" +#line 13028 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 9: goto tr916; case 10: goto tr917; @@ -13051,7 +13053,7 @@ case 670: if ( ++p == pe ) goto _test_eof607; case 607: -#line 13055 "inc/vcf/validator_detail_v43.hpp" +#line 13057 "inc/vcf/validator_detail_v43.hpp" if ( (*p) > 58 ) { if ( 60 <= (*p) && (*p) <= 126 ) goto tr859; @@ -13068,7 +13070,7 @@ case 607: if ( ++p == pe ) goto _test_eof671; case 671: -#line 13072 "inc/vcf/validator_detail_v43.hpp" +#line 13074 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 9: goto tr916; case 10: goto tr917; @@ -13088,7 +13090,7 @@ case 671: if ( ++p == pe ) goto _test_eof608; case 608: -#line 13092 "inc/vcf/validator_detail_v43.hpp" +#line 13094 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 58 ) goto tr826; if ( (*p) < 65 ) { @@ -13126,7 +13128,7 @@ case 608: if ( ++p == pe ) goto _test_eof609; case 609: -#line 13130 "inc/vcf/validator_detail_v43.hpp" +#line 13132 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 9: goto tr831; case 58: goto st591; @@ -13162,7 +13164,7 @@ case 609: if ( ++p == pe ) goto _test_eof610; case 610: -#line 13166 "inc/vcf/validator_detail_v43.hpp" +#line 13168 "inc/vcf/validator_detail_v43.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr860; goto tr814; @@ -13176,7 +13178,7 @@ case 610: if ( ++p == pe ) goto _test_eof611; case 611: -#line 13180 "inc/vcf/validator_detail_v43.hpp" +#line 13182 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 9: goto tr822; case 69: goto tr824; @@ -13195,7 +13197,7 @@ case 611: if ( ++p == pe ) goto _test_eof612; case 612: -#line 13199 "inc/vcf/validator_detail_v43.hpp" +#line 13201 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr861; case 45: goto tr861; @@ -13213,7 +13215,7 @@ case 612: if ( ++p == pe ) goto _test_eof613; case 613: -#line 13217 "inc/vcf/validator_detail_v43.hpp" +#line 13219 "inc/vcf/validator_detail_v43.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr862; goto tr814; @@ -13227,7 +13229,7 @@ case 613: if ( ++p == pe ) goto _test_eof614; case 614: -#line 13231 "inc/vcf/validator_detail_v43.hpp" +#line 13233 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 9 ) goto tr822; if ( 48 <= (*p) && (*p) <= 57 ) @@ -13253,7 +13255,7 @@ case 614: if ( ++p == pe ) goto _test_eof615; case 615: -#line 13257 "inc/vcf/validator_detail_v43.hpp" +#line 13259 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 110 ) goto tr863; goto tr814; @@ -13267,7 +13269,7 @@ case 615: if ( ++p == pe ) goto _test_eof616; case 616: -#line 13271 "inc/vcf/validator_detail_v43.hpp" +#line 13273 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 102 ) goto tr864; goto tr814; @@ -13291,7 +13293,7 @@ case 616: if ( ++p == pe ) goto _test_eof617; case 617: -#line 13295 "inc/vcf/validator_detail_v43.hpp" +#line 13297 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 9 ) goto tr822; goto tr814; @@ -13309,7 +13311,7 @@ case 617: if ( ++p == pe ) goto _test_eof618; case 618: -#line 13313 "inc/vcf/validator_detail_v43.hpp" +#line 13315 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 97 ) goto tr865; goto tr814; @@ -13323,7 +13325,7 @@ case 618: if ( ++p == pe ) goto _test_eof619; case 619: -#line 13327 "inc/vcf/validator_detail_v43.hpp" +#line 13329 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 78 ) goto tr864; goto tr814; @@ -13337,7 +13339,7 @@ case 619: if ( ++p == pe ) goto _test_eof620; case 620: -#line 13341 "inc/vcf/validator_detail_v43.hpp" +#line 13343 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 42: goto tr806; case 46: goto tr866; @@ -13376,7 +13378,7 @@ case 620: if ( ++p == pe ) goto _test_eof621; case 621: -#line 13380 "inc/vcf/validator_detail_v43.hpp" +#line 13382 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 65: goto tr867; case 67: goto tr867; @@ -13400,7 +13402,7 @@ case 621: if ( ++p == pe ) goto _test_eof622; case 622: -#line 13404 "inc/vcf/validator_detail_v43.hpp" +#line 13406 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 9: goto tr812; case 44: goto tr813; @@ -13430,7 +13432,7 @@ case 622: if ( ++p == pe ) goto _test_eof623; case 623: -#line 13434 "inc/vcf/validator_detail_v43.hpp" +#line 13436 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 42: goto tr869; case 61: goto tr868; @@ -13472,7 +13474,7 @@ case 623: if ( ++p == pe ) goto _test_eof624; case 624: -#line 13476 "inc/vcf/validator_detail_v43.hpp" +#line 13478 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 61 ) goto tr868; if ( (*p) < 63 ) { @@ -13512,7 +13514,7 @@ case 624: if ( ++p == pe ) goto _test_eof625; case 625: -#line 13516 "inc/vcf/validator_detail_v43.hpp" +#line 13518 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 62 ) goto tr871; if ( (*p) < 45 ) { @@ -13534,7 +13536,7 @@ case 625: if ( ++p == pe ) goto _test_eof626; case 626: -#line 13538 "inc/vcf/validator_detail_v43.hpp" +#line 13540 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 62 ) goto tr871; if ( (*p) < 61 ) { @@ -13584,7 +13586,7 @@ case 626: if ( ++p == pe ) goto _test_eof627; case 627: -#line 13588 "inc/vcf/validator_detail_v43.hpp" +#line 13590 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 9: goto tr812; case 44: goto tr813; @@ -13613,7 +13615,7 @@ case 627: if ( ++p == pe ) goto _test_eof628; case 628: -#line 13617 "inc/vcf/validator_detail_v43.hpp" +#line 13619 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr875; case 59: goto tr875; @@ -13645,7 +13647,7 @@ case 628: if ( ++p == pe ) goto _test_eof629; case 629: -#line 13649 "inc/vcf/validator_detail_v43.hpp" +#line 13651 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr875; case 58: goto tr877; @@ -13673,7 +13675,7 @@ case 629: if ( ++p == pe ) goto _test_eof630; case 630: -#line 13677 "inc/vcf/validator_detail_v43.hpp" +#line 13679 "inc/vcf/validator_detail_v43.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr878; goto tr805; @@ -13687,7 +13689,7 @@ case 630: if ( ++p == pe ) goto _test_eof631; case 631: -#line 13691 "inc/vcf/validator_detail_v43.hpp" +#line 13693 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 91 ) goto tr871; if ( 48 <= (*p) && (*p) <= 57 ) @@ -13703,7 +13705,7 @@ case 631: if ( ++p == pe ) goto _test_eof632; case 632: -#line 13707 "inc/vcf/validator_detail_v43.hpp" +#line 13709 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr879; case 59: goto tr879; @@ -13734,7 +13736,7 @@ case 632: if ( ++p == pe ) goto _test_eof633; case 633: -#line 13738 "inc/vcf/validator_detail_v43.hpp" +#line 13740 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr879; case 59: goto tr879; @@ -13763,7 +13765,7 @@ case 633: if ( ++p == pe ) goto _test_eof634; case 634: -#line 13767 "inc/vcf/validator_detail_v43.hpp" +#line 13769 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 58 ) goto tr877; goto tr805; @@ -13777,7 +13779,7 @@ case 634: if ( ++p == pe ) goto _test_eof635; case 635: -#line 13781 "inc/vcf/validator_detail_v43.hpp" +#line 13783 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr881; case 59: goto tr881; @@ -13809,7 +13811,7 @@ case 635: if ( ++p == pe ) goto _test_eof636; case 636: -#line 13813 "inc/vcf/validator_detail_v43.hpp" +#line 13815 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr881; case 58: goto tr883; @@ -13837,7 +13839,7 @@ case 636: if ( ++p == pe ) goto _test_eof637; case 637: -#line 13841 "inc/vcf/validator_detail_v43.hpp" +#line 13843 "inc/vcf/validator_detail_v43.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr884; goto tr805; @@ -13851,7 +13853,7 @@ case 637: if ( ++p == pe ) goto _test_eof638; case 638: -#line 13855 "inc/vcf/validator_detail_v43.hpp" +#line 13857 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 93 ) goto tr871; if ( 48 <= (*p) && (*p) <= 57 ) @@ -13867,7 +13869,7 @@ case 638: if ( ++p == pe ) goto _test_eof639; case 639: -#line 13871 "inc/vcf/validator_detail_v43.hpp" +#line 13873 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr885; case 59: goto tr885; @@ -13898,7 +13900,7 @@ case 639: if ( ++p == pe ) goto _test_eof640; case 640: -#line 13902 "inc/vcf/validator_detail_v43.hpp" +#line 13904 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr885; case 59: goto tr885; @@ -13927,7 +13929,7 @@ case 640: if ( ++p == pe ) goto _test_eof641; case 641: -#line 13931 "inc/vcf/validator_detail_v43.hpp" +#line 13933 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 58 ) goto tr883; goto tr805; @@ -13945,7 +13947,7 @@ case 641: if ( ++p == pe ) goto _test_eof642; case 642: -#line 13949 "inc/vcf/validator_detail_v43.hpp" +#line 13951 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr887; case 59: goto tr887; @@ -13977,7 +13979,7 @@ case 642: if ( ++p == pe ) goto _test_eof643; case 643: -#line 13981 "inc/vcf/validator_detail_v43.hpp" +#line 13983 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr887; case 58: goto tr889; @@ -14005,7 +14007,7 @@ case 643: if ( ++p == pe ) goto _test_eof644; case 644: -#line 14009 "inc/vcf/validator_detail_v43.hpp" +#line 14011 "inc/vcf/validator_detail_v43.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr890; goto tr805; @@ -14019,7 +14021,7 @@ case 644: if ( ++p == pe ) goto _test_eof645; case 645: -#line 14023 "inc/vcf/validator_detail_v43.hpp" +#line 14025 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 91 ) goto tr891; if ( 48 <= (*p) && (*p) <= 57 ) @@ -14035,7 +14037,7 @@ case 645: if ( ++p == pe ) goto _test_eof646; case 646: -#line 14039 "inc/vcf/validator_detail_v43.hpp" +#line 14041 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr892; case 59: goto tr892; @@ -14066,7 +14068,7 @@ case 646: if ( ++p == pe ) goto _test_eof647; case 647: -#line 14070 "inc/vcf/validator_detail_v43.hpp" +#line 14072 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr892; case 59: goto tr892; @@ -14095,7 +14097,7 @@ case 647: if ( ++p == pe ) goto _test_eof648; case 648: -#line 14099 "inc/vcf/validator_detail_v43.hpp" +#line 14101 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 58 ) goto tr889; goto tr805; @@ -14113,7 +14115,7 @@ case 648: if ( ++p == pe ) goto _test_eof649; case 649: -#line 14117 "inc/vcf/validator_detail_v43.hpp" +#line 14119 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr894; case 59: goto tr894; @@ -14145,7 +14147,7 @@ case 649: if ( ++p == pe ) goto _test_eof650; case 650: -#line 14149 "inc/vcf/validator_detail_v43.hpp" +#line 14151 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr894; case 58: goto tr896; @@ -14173,7 +14175,7 @@ case 650: if ( ++p == pe ) goto _test_eof651; case 651: -#line 14177 "inc/vcf/validator_detail_v43.hpp" +#line 14179 "inc/vcf/validator_detail_v43.hpp" if ( 48 <= (*p) && (*p) <= 57 ) goto tr897; goto tr805; @@ -14187,7 +14189,7 @@ case 651: if ( ++p == pe ) goto _test_eof652; case 652: -#line 14191 "inc/vcf/validator_detail_v43.hpp" +#line 14193 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 93 ) goto tr891; if ( 48 <= (*p) && (*p) <= 57 ) @@ -14203,7 +14205,7 @@ case 652: if ( ++p == pe ) goto _test_eof653; case 653: -#line 14207 "inc/vcf/validator_detail_v43.hpp" +#line 14209 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr898; case 59: goto tr898; @@ -14234,7 +14236,7 @@ case 653: if ( ++p == pe ) goto _test_eof654; case 654: -#line 14238 "inc/vcf/validator_detail_v43.hpp" +#line 14240 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 43: goto tr898; case 59: goto tr898; @@ -14263,7 +14265,7 @@ case 654: if ( ++p == pe ) goto _test_eof655; case 655: -#line 14267 "inc/vcf/validator_detail_v43.hpp" +#line 14269 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 58 ) goto tr896; goto tr805; @@ -14281,7 +14283,7 @@ case 655: if ( ++p == pe ) goto _test_eof656; case 656: -#line 14285 "inc/vcf/validator_detail_v43.hpp" +#line 14287 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 9: goto tr812; case 65: goto tr867; @@ -14344,7 +14346,7 @@ case 656: if ( ++p == pe ) goto _test_eof657; case 657: -#line 14348 "inc/vcf/validator_detail_v43.hpp" +#line 14350 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 10 ) goto st661; goto tr774; @@ -14373,7 +14375,7 @@ case 657: if ( ++p == pe ) goto _test_eof658; case 658: -#line 14377 "inc/vcf/validator_detail_v43.hpp" +#line 14379 "inc/vcf/validator_detail_v43.hpp" if ( (*p) == 10 ) goto st22; goto tr0; @@ -14393,7 +14395,7 @@ case 658: if ( ++p == pe ) goto _test_eof659; case 659: -#line 14397 "inc/vcf/validator_detail_v43.hpp" +#line 14399 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 10: goto tr903; case 13: goto tr904; @@ -14417,7 +14419,7 @@ case 659: if ( ++p == pe ) goto _test_eof672; case 672: -#line 14421 "inc/vcf/validator_detail_v43.hpp" +#line 14423 "inc/vcf/validator_detail_v43.hpp" goto st0; tr907: #line 43 "src/vcf/vcf.ragel" @@ -14435,7 +14437,7 @@ case 672: if ( ++p == pe ) goto _test_eof660; case 660: -#line 14439 "inc/vcf/validator_detail_v43.hpp" +#line 14441 "inc/vcf/validator_detail_v43.hpp" switch( (*p) ) { case 10: goto tr906; case 13: goto tr907; @@ -14459,7 +14461,7 @@ case 660: if ( ++p == pe ) goto _test_eof673; case 673: -#line 14463 "inc/vcf/validator_detail_v43.hpp" +#line 14465 "inc/vcf/validator_detail_v43.hpp" goto st0; } _test_eof2: cs = 2; goto _test_eof; @@ -15156,7 +15158,9 @@ case 673: #line 60 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FileformatError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 25: @@ -15210,7 +15214,9 @@ case 673: #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 661: @@ -15235,14 +15241,18 @@ case 673: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 600: #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 74: @@ -15267,15 +15277,19 @@ case 673: case 96: case 103: case 114: -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 441: @@ -15286,15 +15300,19 @@ case 673: case 446: case 447: case 448: -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 468: @@ -15326,15 +15344,19 @@ case 673: case 496: case 497: case 498: -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 123: @@ -15361,15 +15383,19 @@ case 673: case 147: case 154: case 165: -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 173: @@ -15408,15 +15434,19 @@ case 673: case 213: case 220: case 231: -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 240: @@ -15454,15 +15484,19 @@ case 673: case 279: case 286: case 297: -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 352: @@ -15499,15 +15533,19 @@ case 673: case 403: case 404: case 405: -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 499: @@ -15521,15 +15559,19 @@ case 673: case 507: case 508: case 509: -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 306: @@ -15564,15 +15606,19 @@ case 673: case 348: case 349: case 351: -#line 337 "src/vcf/vcf.ragel" +#line 338 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in META metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 409: @@ -15604,69 +15650,89 @@ case 673: case 438: case 439: case 440: -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 578: case 597: case 598: case 599: -#line 407 "src/vcf/vcf.ragel" +#line 408 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ChromosomeBodyError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 579: case 580: -#line 413 "src/vcf/vcf.ragel" +#line 414 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new PositionBodyError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 581: case 582: -#line 419 "src/vcf/vcf.ragel" +#line 420 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new IdBodyError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 583: case 584: -#line 425 "src/vcf/vcf.ragel" +#line 426 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new ReferenceAlleleBodyError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 585: @@ -15708,15 +15774,19 @@ case 673: case 654: case 655: case 656: -#line 431 "src/vcf/vcf.ragel" +#line 432 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new AlternateAllelesBodyError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 587: @@ -15732,15 +15802,19 @@ case 673: case 617: case 618: case 619: -#line 437 "src/vcf/vcf.ragel" +#line 438 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new QualityBodyError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 590: @@ -15748,15 +15822,19 @@ case 673: case 592: case 608: case 609: -#line 443 "src/vcf/vcf.ragel" +#line 444 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FilterBodyError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 14: @@ -15771,12 +15849,16 @@ case 673: { ErrorPolicy::handle_error(*this, new FileformatError{n_lines, "The fileformat declaration is not 'fileformat=VCFv4.3'"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 60 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FileformatError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 594: @@ -15784,12 +15866,16 @@ case 673: #line 50 "src/vcf/vcf_v43.ragel" { ErrorPolicy::handle_error(*this, new FormatBodyError{n_lines, "Format does not start with a letter/underscore followed by alphanumeric/underscore/dot characters"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 568: @@ -15804,7 +15890,9 @@ case 673: #line 55 "src/vcf/vcf_v43.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines, "There is no newline at the end of the file"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 78 "src/vcf/vcf.ragel" { @@ -15817,99 +15905,131 @@ case 673: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 81: case 82: case 83: -#line 263 "src/vcf/vcf.ragel" +#line 264 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "ALT metadata ID is not prefixed by DEL/INS/DUP/INV/CNV/BND and suffixed by ':' and a text sequence"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 122: -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 199: case 200: -#line 304 "src/vcf/vcf.ragel" +#line 305 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Type is not Integer, Float, Flag, Character or String"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 265: case 266: -#line 304 "src/vcf/vcf.ragel" +#line 305 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Type is not Integer, Float, Flag, Character or String"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 406: case 407: case 408: -#line 315 "src/vcf/vcf.ragel" +#line 316 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "PEDIGREE metadata Original is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 374: @@ -15918,20 +16038,26 @@ case 673: case 384: case 385: case 386: -#line 320 "src/vcf/vcf.ragel" +#line 321 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "PEDIGREE metadata Father or Mother is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 367: @@ -15945,38 +16071,50 @@ case 673: case 395: case 396: case 397: -#line 325 "src/vcf/vcf.ragel" +#line 326 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "PEDIGREE metadata sequence of Name_N is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 324: case 325: -#line 342 "src/vcf/vcf.ragel" +#line 343 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "META metadata Number is not a dot"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 337 "src/vcf/vcf.ragel" +#line 338 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in META metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 331: @@ -15986,75 +16124,99 @@ case 673: case 335: case 336: case 337: -#line 347 "src/vcf/vcf.ragel" +#line 348 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "META metadata Type is not String"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 337 "src/vcf/vcf.ragel" +#line 338 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in META metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 347: case 350: -#line 352 "src/vcf/vcf.ragel" +#line 353 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "META metadata Values is not a square-bracket delimited list of values"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 337 "src/vcf/vcf.ragel" +#line 338 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in META metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 100: case 101: case 102: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 478: case 479: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 132: @@ -16063,20 +16225,26 @@ case 673: case 151: case 152: case 153: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 182: @@ -16085,20 +16253,26 @@ case 673: case 217: case 218: case 219: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 248: @@ -16107,77 +16281,101 @@ case 673: case 283: case 284: case 285: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 364: case 365: case 366: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 314: case 315: case 316: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 337 "src/vcf/vcf.ragel" +#line 338 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in META metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 419: case 420: case 421: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 97: @@ -16194,20 +16392,26 @@ case 673: case 116: case 120: case 121: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 148: @@ -16224,20 +16428,26 @@ case 673: case 167: case 171: case 172: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 214: @@ -16254,20 +16464,26 @@ case 673: case 233: case 237: case 238: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 280: @@ -16284,20 +16500,26 @@ case 673: case 299: case 303: case 304: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 449: @@ -16319,20 +16541,26 @@ case 673: case 465: case 466: case 467: -#line 384 "src/vcf/vcf.ragel" +#line 385 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata URL is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 510: @@ -16356,20 +16584,26 @@ case 673: case 528: case 529: case 530: -#line 384 "src/vcf/vcf.ragel" +#line 385 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata URL is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 192: @@ -16378,17 +16612,23 @@ case 673: #line 36 "src/vcf/vcf_v43.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "FORMAT metadata Number is not a number, A, R, G or dot"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 258: @@ -16397,17 +16637,23 @@ case 673: #line 42 "src/vcf/vcf_v43.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "INFO metadata Number is not a number, A, R, G or dot"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 531: @@ -16450,9 +16696,11 @@ case 673: #line 55 "src/vcf/vcf_v43.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines, "There is no newline at the end of the file"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -16464,7 +16712,9 @@ case 673: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 78 "src/vcf/vcf.ragel" { @@ -16477,26 +16727,34 @@ case 673: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 601: #line 55 "src/vcf/vcf_v43.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines, "There is no newline at the end of the file"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } -#line 465 "src/vcf/vcf.ragel" +#line 466 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " is not a valid string"; ErrorPolicy::handle_error(*this, new SamplesBodyError{n_lines, message_stream.str()}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 663: @@ -16515,7 +16773,9 @@ case 673: #line 55 "src/vcf/vcf_v43.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines, "There is no newline at the end of the file"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 222 "src/vcf/vcf.ragel" { @@ -16535,6 +16795,7 @@ case 673: for(auto &error_ptr : symbolic_duplicates) { ErrorPolicy::handle_warning(*this, error_ptr.release()); } + validate_additional_checks(); } try { @@ -16555,14 +16816,18 @@ case 673: #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 55 "src/vcf/vcf_v43.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines, "There is no newline at the end of the file"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -16574,7 +16839,9 @@ case 673: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 78 "src/vcf/vcf.ragel" { @@ -16587,199 +16854,265 @@ case 673: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 108: case 109: case 110: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 159: case 160: case 161: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 225: case 226: case 227: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 291: case 292: case 293: -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 117: case 118: case 119: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 168: case 169: case 170: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 234: case 235: case 236: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 300: case 301: case 302: -#line 379 "src/vcf/vcf.ragel" +#line 380 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata description string is not valid"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 374 "src/vcf/vcf.ragel" +#line 375 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Metadata ID contains a character different from alphanumeric, dot, underscore and dash"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; case 593: @@ -16788,47 +17121,63 @@ case 673: case 604: case 605: case 606: -#line 454 "src/vcf/vcf.ragel" +#line 455 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info key is not a sequence of alphanumeric and/or punctuation characters"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 55 "src/vcf/vcf_v43.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines, "There is no newline at the end of the file"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 607: -#line 459 "src/vcf/vcf.ragel" +#line 460 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info field value is not a comma-separated list of valid strings (maybe it contains whitespaces?)"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 55 "src/vcf/vcf_v43.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines, "There is no newline at the end of the file"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } -#line 449 "src/vcf/vcf.ragel" +#line 450 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new InfoBodyError{n_lines, "Info is not a single dot or a semicolon-separated list of key-value pairs"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 666: @@ -16837,7 +17186,9 @@ case 673: #line 55 "src/vcf/vcf_v43.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines, "There is no newline at the end of the file"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 39 "src/vcf/vcf.ragel" { @@ -16865,6 +17216,7 @@ case 673: for(auto &error_ptr : symbolic_duplicates) { ErrorPolicy::handle_warning(*this, error_ptr.release()); } + validate_additional_checks(); } try { @@ -16884,45 +17236,59 @@ case 673: #line 55 "src/vcf/vcf_v43.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines, "There is no newline at the end of the file"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } -#line 472 "src/vcf/vcf.ragel" +#line 473 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " does not start with a valid genotype"; ErrorPolicy::handle_error(*this, new SamplesFieldBodyError{n_lines, message_stream.str(), "", "GT"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } -#line 465 "src/vcf/vcf.ragel" +#line 466 "src/vcf/vcf.ragel" { std::ostringstream message_stream; message_stream << "Sample #" << (n_columns - 9) << " is not a valid string"; ErrorPolicy::handle_error(*this, new SamplesBodyError{n_lines, message_stream.str()}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 91 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 22: #line 60 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new FileformatError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 55 "src/vcf/vcf_v43.ragel" { ErrorPolicy::handle_error(*this, new BodySectionError{n_lines, "There is no newline at the end of the file"}); - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } -#line 390 "src/vcf/vcf.ragel" +#line 391 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new HeaderSectionError{n_lines, "The header line does not start with the mandatory columns: CHROM, POS, ID, REF, ALT, QUAL, FILTER and INFO"}); @@ -16934,7 +17300,9 @@ case 673: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } #line 78 "src/vcf/vcf.ragel" { @@ -16947,67 +17315,91 @@ case 673: ErrorPolicy::handle_warning(*this, warn); } - p--; {goto st660;} + p--; { if ( p == pe ) + goto _test_eof660; +goto st660;} } break; case 24: -#line 258 "src/vcf/vcf.ragel" +#line 259 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in ALT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 282 "src/vcf/vcf.ragel" +#line 283 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FILTER metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 288 "src/vcf/vcf.ragel" +#line 289 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in FORMAT metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 299 "src/vcf/vcf.ragel" +#line 300 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in INFO metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 270 "src/vcf/vcf.ragel" +#line 271 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in assembly metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 276 "src/vcf/vcf.ragel" +#line 277 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in contig metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 337 "src/vcf/vcf.ragel" +#line 338 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in META metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 358 "src/vcf/vcf.ragel" +#line 359 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in SAMPLE metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 310 "src/vcf/vcf.ragel" +#line 311 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in PEDIGREE metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } -#line 331 "src/vcf/vcf.ragel" +#line 332 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines, "Error in pedigreeDB metadata"}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } #line 65 "src/vcf/vcf.ragel" { ErrorPolicy::handle_error(*this, new MetaSectionError{n_lines}); - p--; {goto st659;} + p--; { if ( p == pe ) + goto _test_eof659; +goto st659;} } break; -#line 17011 "inc/vcf/validator_detail_v43.hpp" +#line 17403 "inc/vcf/validator_detail_v43.hpp" } } diff --git a/install_dependencies.sh b/install_dependencies.sh index b0de803b1..2b6afe211 100755 --- a/install_dependencies.sh +++ b/install_dependencies.sh @@ -23,7 +23,7 @@ it installs the given dependencies: - bzip library bzip2-1.0.6 - zlib library zlib-1.2.11 - curl library curl-7.62.0 - - openssl library openssl-1.1.1a + - openssl library openssl-1.1.1f - c-ares library c-ares-1.15.0 - boost library boost-1.72.0 @@ -106,9 +106,9 @@ dependencies_dir_abs_path=`pwd` echo "installing openssl" mkdir openssl -wget https://www.openssl.org/source/openssl-1.1.1a.tar.gz -O ./openssl-1.1.1a.tar.gz -tar xzf ./openssl-1.1.1a.tar.gz -cd openssl-1.1.1a +wget https://www.openssl.org/source/openssl-1.1.1f.tar.gz -O ./openssl-1.1.1f.tar.gz +tar xzf ./openssl-1.1.1f.tar.gz +cd openssl-1.1.1f LIBS="-lcrypto -ldl" \ ./config -fPIC no-shared no-threads \ --prefix=$dependencies_dir_abs_path/openssl \ diff --git a/src/validator_main.cpp b/src/validator_main.cpp index b7b054c3e..a34d45063 100644 --- a/src/validator_main.cpp +++ b/src/validator_main.cpp @@ -53,6 +53,7 @@ namespace (ebi::vcf::LEVEL_OPTION, po::value()->default_value(ebi::vcf::WARNING_LEVEL), "Validation level (error, warning, stop)") (ebi::vcf::REPORT_OPTION, po::value()->default_value(ebi::vcf::SUMMARY), "Comma separated values for types of reports (summary, text, database)") (ebi::vcf::OUTDIR_OPTION, po::value()->default_value(""), "Output directory") + (ebi::vcf::CHECK_EVIDENCE, "Flag to check genotypes or allele frequencies are present") ; return description; @@ -153,17 +154,19 @@ int main(int argc, char** argv) ebi::vcf::ValidationLevel validationLevel = get_validation_level(level); auto outdir = ebi::util::get_output_path(vm[ebi::vcf::OUTDIR].as(), path); auto outputs = get_outputs(vm[ebi::vcf::REPORT].as(), outdir); + bool checkEvidence = vm.count(ebi::vcf::CHECK_EVIDENCE) >= 1; + ebi::vcf::AdditionalChecks additionalChecks { checkEvidence }; if (path == ebi::vcf::STDIN) { BOOST_LOG_TRIVIAL(info) << "Reading from standard input..."; - is_valid = ebi::vcf::is_valid_vcf_file(std::cin, path, validationLevel, outputs); + is_valid = ebi::vcf::is_valid_vcf_file(std::cin, path, validationLevel, outputs, additionalChecks); } else { BOOST_LOG_TRIVIAL(info) << "Reading from input file..."; std::ifstream input{path}; if (!input) { throw std::runtime_error{"Couldn't open file " + path}; } else { - is_valid = ebi::vcf::is_valid_vcf_file(input, path, validationLevel, outputs); + is_valid = ebi::vcf::is_valid_vcf_file(input, path, validationLevel, outputs, additionalChecks); } } diff --git a/src/vcf/parsing_state.cpp b/src/vcf/parsing_state.cpp index f2304e1a8..588edba0e 100644 --- a/src/vcf/parsing_state.cpp +++ b/src/vcf/parsing_state.cpp @@ -14,6 +14,7 @@ * limitations under the License. */ +#include #include "vcf/parsing_state.hpp" namespace ebi @@ -21,11 +22,14 @@ namespace ebi namespace vcf { - ParsingState::ParsingState(std::shared_ptr source) + void valida(); + + ParsingState::ParsingState(std::shared_ptr source, AdditionalChecks additionalChecks) : n_lines{1}, n_columns{1}, n_batches{0}, cs{0}, m_is_valid{true}, source{source}, record{}, errors{}, warnings{}, - defined_metadata{} + defined_metadata{}, + additionalChecks{additionalChecks} { } @@ -87,5 +91,55 @@ namespace ebi { defined_metadata.emplace(meta_type, id); } + + void ParsingState::validate_additional_checks() + { + if (additionalChecks.checkEvidence) { + if (genotypes_present() || allele_frequencies_present() || allele_count_present()) { + return; + } + throw new BodySectionError{record->line, "Requested evidence presence with --require-evidence. " + "Please provide genotypes (GT field in FORMAT and samples), " + "or allele frequencies (AF field in INFO), " + "or allele counts (AC and AN fields in INFO)."}; + } + } + + bool ParsingState::genotypes_present() + { + auto format = record->format; + return !format.empty() && util::contains(format, GT); + } + + bool ParsingState::allele_frequencies_present() + { + for (const auto &info_key_value : record->info) { + if (info_key_value.first == vcf::AF) { + return true; + } + } + return false; + } + + bool ParsingState::allele_count_present() + { + bool allele_count_present = false; + bool allele_total_number_present = false; + for (const auto &info_key_value : record->info) { + if (info_key_value.first == vcf::AC) { + if (allele_total_number_present) { + return true; + } + allele_count_present = true; + } + if (info_key_value.first == vcf::AN) { + if (allele_count_present) { + return true; + } + allele_total_number_present = true; + } + } + return false; + } } } diff --git a/src/vcf/validator.cpp b/src/vcf/validator.cpp index ee4ae5d7f..c126086a8 100644 --- a/src/vcf/validator.cpp +++ b/src/vcf/validator.cpp @@ -24,7 +24,8 @@ namespace ebi std::unique_ptr build_parser(std::string const &path, ValidationLevel level, - Version version); + Version version, + AdditionalChecks additionalChecks); bool validate(const std::vector &firstLine, std::istream &input, @@ -33,8 +34,8 @@ namespace ebi void write_errors(const Parser &validator, const std::vector> &outputs); - ParserImpl::ParserImpl(std::shared_ptr source) - : ParsingState{source} + ParserImpl::ParserImpl(std::shared_ptr source, AdditionalChecks additionalChecks) + : ParsingState{source, additionalChecks} { } @@ -81,7 +82,10 @@ namespace ebi return ParsingState::warnings; } - std::unique_ptr build_parser(std::string const & path, ValidationLevel level, Version version) + std::unique_ptr build_parser(const std::string &path, + ValidationLevel level, + Version version, + AdditionalChecks additionalChecks) { std::shared_ptr source = std::make_shared(path, InputFormat::VCF_FILE_VCF, version); auto records = std::vector{}; @@ -90,11 +94,11 @@ namespace ebi case ValidationLevel::error: switch (version) { case ebi::vcf::Version::v41: - return std::unique_ptr(new ebi::vcf::QuickValidator_v41(source)); + return std::unique_ptr(new ebi::vcf::QuickValidator_v41(source, additionalChecks)); case ebi::vcf::Version::v42: - return std::unique_ptr(new ebi::vcf::QuickValidator_v42(source)); + return std::unique_ptr(new ebi::vcf::QuickValidator_v42(source, additionalChecks)); case ebi::vcf::Version::v43: - return std::unique_ptr(new ebi::vcf::QuickValidator_v43(source)); + return std::unique_ptr(new ebi::vcf::QuickValidator_v43(source, additionalChecks)); default: throw std::invalid_argument{"Please choose one of the accepted VCF fileformat versions"}; } @@ -102,11 +106,11 @@ namespace ebi case ValidationLevel::warning: switch (version) { case ebi::vcf::Version::v41: - return std::unique_ptr(new ebi::vcf::FullValidator_v41(source)); + return std::unique_ptr(new ebi::vcf::FullValidator_v41(source, additionalChecks)); case ebi::vcf::Version::v42: - return std::unique_ptr(new ebi::vcf::FullValidator_v42(source)); + return std::unique_ptr(new ebi::vcf::FullValidator_v42(source, additionalChecks)); case ebi::vcf::Version::v43: - return std::unique_ptr(new ebi::vcf::FullValidator_v43(source)); + return std::unique_ptr(new ebi::vcf::FullValidator_v43(source, additionalChecks)); default: throw std::invalid_argument{"Please choose one of the accepted VCF fileformat versions"}; } @@ -114,11 +118,11 @@ namespace ebi case ValidationLevel::stop: switch (version) { case ebi::vcf::Version::v41: - return std::unique_ptr(new ebi::vcf::Reader_v41(source)); + return std::unique_ptr(new ebi::vcf::Reader_v41(source, additionalChecks)); case ebi::vcf::Version::v42: - return std::unique_ptr(new ebi::vcf::Reader_v42(source)); + return std::unique_ptr(new ebi::vcf::Reader_v42(source, additionalChecks)); case ebi::vcf::Version::v43: - return std::unique_ptr(new ebi::vcf::Reader_v43(source)); + return std::unique_ptr(new ebi::vcf::Reader_v43(source, additionalChecks)); default: throw std::invalid_argument{"Please choose one of the accepted VCF fileformat versions"}; } @@ -131,26 +135,27 @@ namespace ebi bool is_valid_vcf_file(std::istream &input, const std::string &sourceName, ValidationLevel validationLevel, - std::vector> &outputs) - { + std::vector> &outputs, + AdditionalChecks additionalChecks) { std::vector line; get_magic_num(input, line); std::string file_extension = get_compression(sourceName, line); check_readability_of_file(file_extension); if (file_extension == NO_EXT) { - return process_vcf_stream(input, sourceName, validationLevel, outputs); + return process_vcf_stream(input, sourceName, validationLevel, outputs, additionalChecks); } else { boost::iostreams::filtering_istream uncompressed_input; create_uncompressed_stream(input, file_extension, uncompressed_input); - return process_vcf_stream(uncompressed_input, sourceName, validationLevel, outputs); + return process_vcf_stream(uncompressed_input, sourceName, validationLevel, outputs, additionalChecks); } } bool process_vcf_stream(std::istream &input, - const std::string &sourceName, - ValidationLevel validationLevel, - std::vector> &outputs) + const std::string &sourceName, + ValidationLevel validationLevel, + std::vector> &outputs, + AdditionalChecks additionalChecks) { std::vector firstline; ebi::util::readline(input, firstline); @@ -165,7 +170,7 @@ namespace ebi } return false; } - std::unique_ptr validator = build_parser(sourceName, validationLevel, version); + std::unique_ptr validator = build_parser(sourceName, validationLevel, version, additionalChecks); return validate(firstline, input, *validator, outputs); } diff --git a/src/vcf/vcf.ragel b/src/vcf/vcf.ragel index 2200947eb..d1472bf5f 100644 --- a/src/vcf/vcf.ragel +++ b/src/vcf/vcf.ragel @@ -236,6 +236,7 @@ for(auto &error_ptr : symbolic_duplicates) { ErrorPolicy::handle_warning(*this, error_ptr.release()); } + validate_additional_checks(); } try { diff --git a/src/vcf/vcf_v41.ragel b/src/vcf/vcf_v41.ragel index 0e3362f8f..b4c5b8829 100644 --- a/src/vcf/vcf_v41.ragel +++ b/src/vcf/vcf_v41.ragel @@ -241,8 +241,8 @@ namespace ebi { template - ParserImpl_v41::ParserImpl_v41(std::shared_ptr source) - : ParserImpl{source} + ParserImpl_v41::ParserImpl_v41(std::shared_ptr source, AdditionalChecks additionalChecks) + : ParserImpl{source, additionalChecks} { %%{ write init; diff --git a/src/vcf/vcf_v42.ragel b/src/vcf/vcf_v42.ragel index 3a4e1dd5c..a47bf8d1e 100644 --- a/src/vcf/vcf_v42.ragel +++ b/src/vcf/vcf_v42.ragel @@ -245,8 +245,8 @@ namespace ebi { template - ParserImpl_v42::ParserImpl_v42(std::shared_ptr source) - : ParserImpl{source} + ParserImpl_v42::ParserImpl_v42(std::shared_ptr source, AdditionalChecks additionalChecks) + : ParserImpl{source, additionalChecks} { %%{ write init; diff --git a/src/vcf/vcf_v43.ragel b/src/vcf/vcf_v43.ragel index 18133bad7..a19fee009 100644 --- a/src/vcf/vcf_v43.ragel +++ b/src/vcf/vcf_v43.ragel @@ -275,8 +275,8 @@ namespace ebi { template - ParserImpl_v43::ParserImpl_v43(std::shared_ptr source) - : ParserImpl{source} + ParserImpl_v43::ParserImpl_v43(std::shared_ptr source, AdditionalChecks additionalChecks) + : ParserImpl{source, additionalChecks} { %%{ write init; diff --git a/test/input_files/v4.3/evidence/failed/failed_no_genotypes_or_frequencies.vcf b/test/input_files/v4.3/evidence/failed/failed_no_genotypes_or_frequencies.vcf new file mode 100644 index 000000000..185d4d302 --- /dev/null +++ b/test/input_files/v4.3/evidence/failed/failed_no_genotypes_or_frequencies.vcf @@ -0,0 +1,4 @@ +##fileformat=VCFv4.3 +##CauseOfFailure=No genotypes or allele frequencies +#CHROM POS ID REF ALT QUAL FILTER INFO +1 123 . TC T . . . diff --git a/test/input_files/v4.3/evidence/passed/passed_with_allele_count.vcf b/test/input_files/v4.3/evidence/passed/passed_with_allele_count.vcf new file mode 100644 index 000000000..4e0146184 --- /dev/null +++ b/test/input_files/v4.3/evidence/passed/passed_with_allele_count.vcf @@ -0,0 +1,3 @@ +##fileformat=VCFv4.3 +#CHROM POS ID REF ALT QUAL FILTER INFO +1 123 . TC T . . AC=1;AN=2 diff --git a/test/input_files/v4.3/evidence/passed/passed_with_allele_frequencies.vcf b/test/input_files/v4.3/evidence/passed/passed_with_allele_frequencies.vcf new file mode 100644 index 000000000..6be12e96c --- /dev/null +++ b/test/input_files/v4.3/evidence/passed/passed_with_allele_frequencies.vcf @@ -0,0 +1,3 @@ +##fileformat=VCFv4.3 +#CHROM POS ID REF ALT QUAL FILTER INFO +1 123 . TC T . . AF=1 diff --git a/test/input_files/v4.3/evidence/passed/passed_with_genotypes.vcf b/test/input_files/v4.3/evidence/passed/passed_with_genotypes.vcf new file mode 100644 index 000000000..46f2f31a1 --- /dev/null +++ b/test/input_files/v4.3/evidence/passed/passed_with_genotypes.vcf @@ -0,0 +1,3 @@ +##fileformat=VCFv4.3 +#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT SAMPLE1 +1 123 . TC T . . . GT 1|0 diff --git a/test/vcf/debugulator_integration_test.cpp b/test/vcf/debugulator_integration_test.cpp index c63bf7568..ea3022326 100644 --- a/test/vcf/debugulator_integration_test.cpp +++ b/test/vcf/debugulator_integration_test.cpp @@ -38,7 +38,7 @@ namespace ebi std::vector> reports; reports.emplace_back(report); - return vcf::is_valid_vcf_file(file, path.string(), vcf::ValidationLevel::warning, reports); + return vcf::is_valid_vcf_file(file, path.string(), vcf::ValidationLevel::warning, reports, vcf::AdditionalChecks()); } std::tuple, long> fix(const boost::filesystem::path &path, std::string report_tag) diff --git a/test/vcf/optional_policy_test.cpp b/test/vcf/optional_policy_test.cpp index 627778682..84c48746f 100644 --- a/test/vcf/optional_policy_test.cpp +++ b/test/vcf/optional_policy_test.cpp @@ -61,7 +61,7 @@ namespace ebi source }); - vcf::ParsingState parsing_state{source}; + vcf::ParsingState parsing_state{source, vcf::AdditionalChecks()}; vcf::ValidateOptionalPolicy optional_policy; @@ -277,9 +277,9 @@ namespace ebi }); } - vcf::ParsingState parsing_state1{sources[0]}; - vcf::ParsingState parsing_state2{sources[1]}; - vcf::ParsingState parsing_state3{sources[2]}; + vcf::ParsingState parsing_state1{sources[0], vcf::AdditionalChecks()}; + vcf::ParsingState parsing_state2{sources[1], vcf::AdditionalChecks()}; + vcf::ParsingState parsing_state3{sources[2], vcf::AdditionalChecks()}; vcf::ValidateOptionalPolicy optional_policy; diff --git a/test/vcf/parser_test_aux.hpp b/test/vcf/parser_test_aux.hpp index e35135c66..5c00d0139 100644 --- a/test/vcf/parser_test_aux.hpp +++ b/test/vcf/parser_test_aux.hpp @@ -31,13 +31,16 @@ namespace ebi { - inline bool is_valid(std::string path) - { - std::ifstream input{path}; - std::vector> outputs; + inline bool is_valid(std::string path, vcf::AdditionalChecks additionalChecks) { + std::ifstream input{path}; + std::vector> outputs; - return vcf::is_valid_vcf_file(input, path, vcf::ValidationLevel::warning, outputs); - } + return vcf::is_valid_vcf_file(input, path, vcf::ValidationLevel::warning, outputs, additionalChecks); + } + + inline bool is_valid(std::string path) { + return is_valid(path, {false}); + } } #endif // EBI_PARSER_TEST_AUX_HPP diff --git a/test/vcf/parser_v43_test.cpp b/test/vcf/parser_v43_test.cpp index 9a954109a..7799142eb 100644 --- a/test/vcf/parser_v43_test.cpp +++ b/test/vcf/parser_v43_test.cpp @@ -81,5 +81,47 @@ namespace ebi } } + TEST_CASE("Files to validate evidence flag under specification v4.3", "[evidence]") + { + SECTION("Without genotypes or frequencies") { + auto folder = boost::filesystem::path("test/input_files/v4.3/evidence/failed"); + std::vector v; + copy(boost::filesystem::directory_iterator(folder), + boost::filesystem::directory_iterator(), + back_inserter(v)); + + for (auto path : v) + { + SECTION((path.string() + " Validate evidence")) + { + CHECK_FALSE(is_valid(path.string(), {true})); + } + SECTION(path.string() + " Don't validate evidence") + { + CHECK(is_valid(path.string(), {false})); + } + } + } + + SECTION("With genotypes or frequencies") { + auto folder = boost::filesystem::path("test/input_files/v4.3/evidence/passed"); + std::vector v; + copy(boost::filesystem::directory_iterator(folder), + boost::filesystem::directory_iterator(), + back_inserter(v)); + + for (auto path : v) + { + SECTION(path.string() + " Validate evidence") + { + CHECK(is_valid(path.string(), {true})); + } + SECTION(path.string() + " Don't validate evidence") + { + CHECK(is_valid(path.string(), {false})); + } + } + } + } } diff --git a/test/vcf/report_writer_test.cpp b/test/vcf/report_writer_test.cpp index a0a98cc98..faba750cb 100644 --- a/test/vcf/report_writer_test.cpp +++ b/test/vcf/report_writer_test.cpp @@ -42,7 +42,7 @@ namespace ebi std::vector> outputs; outputs.push_back(std::move(output)); - return ebi::vcf::is_valid_vcf_file(input, path, vcf::ValidationLevel::warning, outputs); + return ebi::vcf::is_valid_vcf_file(input, path, vcf::ValidationLevel::warning, outputs, vcf::AdditionalChecks()); } TEST_CASE("Unit test: odb", "[output]") @@ -223,7 +223,8 @@ namespace ebi outputs.emplace_back(output); std::ifstream input{path.string()}; - vcf::is_valid_vcf_file(input, path.string(), vcf::ValidationLevel::warning, outputs); + vcf::is_valid_vcf_file(input, path.string(), vcf::ValidationLevel::warning, outputs, + vcf::AdditionalChecks()); input.close(); }