EBIvariation / vcf-validator

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

vcf-validator allows negative value in QUAL column #232

Closed opplatek closed 5 months ago

opplatek commented 5 months ago

QUAL can only have positive values based on QUAL definition QUAL=−10log10 prob(call in ALT is wrong) in The Variant Call Format (VCF) Specification.

Calling vcf-validator on negative_qual.vcf test VCF:

##fileformat=VCFv4.2
##INFO=<ID=AGID,Number=1,Type=String,Description="Associated Gene ID">
##contig=<ID=NC_000001.11,length=248956422>
#CHROM  POS ID  REF ALT QUAL    FILTER  INFO
NC_000001.11    1   1   A   T   -1  .   AGID=3633

reports

$ vcf-validator --input negative_qual.vcf --level error
[info] Reading from input file...
[info] Summary report written to : /tests/test_vcf_validating/invalid_separator.vcf.errors_summary.1705503592412.txt
[info] According to the VCF specification, the input file is valid

with error code 0 (passing).

I believe the vcf-validator should report an error instead.

vcf-validator version:

$ vcf-validator --version                                                             
vcf_validator version 0.9.4
opplatek commented 5 months ago

This was my mistake. With the default warning settings it correctly reports negative values as invalid.