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

Does not fail when output folder does not have write permission #142

Closed j-coll closed 5 years ago

j-coll commented 6 years ago

I have executed the validator without specifying the -o, so as default uses the location of the input file, where I don't have write permissions. The program has not failed at any point.

jcoll@node-01:~$ ./vcf_validator_linux -i /data/my_vcf.vcf.gz
[info] Reading from input file...
[warning] Detected .gz compression
Lines read: 10000
Lines read: 20000
Lines read: 30000
....
....
Lines read: 130610000
Lines read: 130620000
Lines read: 130630000
[info] Summary report written to : /data/my_vcf.vcf.gz.errors_summary.1529575578873.txt
[info] According to the VCF specification, the input file is not valid
jcoll@node-01:~$ less /data/my_vcf.vcf.gz.errors_summary.1529575578873.txt
/data/my_vcf.vcf.gz.errors_summary.1529575578873.txt: No such file or directory
jmmut commented 6 years ago

This is merged in develop, but we will close when it's in a release and the requestor confirms it's fixed.

jmmut commented 5 years ago

I tested this with the latest release and it works as expected.

However, we can improve this message in the case of ODB report:

./vcf_validator_linux -i no_write_permissions/a.vcf -r database [error] The validation could not be completed: ODB report: Can't initialize database: 14: unable to open database file

should say the path of the "database file"