brentp / vcfanno

annotate a VCF with other VCFs/BEDs/tabixed files
https://genomebiology.biomedcentral.com/articles/10.1186/s13059-016-0973-5
MIT License
357 stars 55 forks source link

Misleading error message in Flatten #118

Closed tsnowlan closed 4 years ago

tsnowlan commented 4 years ago

Related to: #82

Config and files used are arbitrary, just make a typo in the path for file in config toml and -base-path.

When attempting to open a Source file, the basepath is prepended twice. The first time in Sources, the next time in Flatten. This causes the error string to be [Flatten] unable to open file: basepath/basepath/filename in basepath. which implies that the basepath string was doubled somewhere rather than basepath/filename also not existing.

PR incoming with proposed fix.


If you have encountered an error, please include:

tsnowlan commented 4 years ago

For the sake of completeness, from example/conf.toml: using bad_conf.txt (github doesn't like .toml extension)

~/vcfanno$ vcfanno -base-path example -lua custom.lua example/bad_conf.txt example/query.vcf.gz

=============================================
vcfanno version 0.3.2 [built with go1.13.1]

see: https://github.com/brentp/vcfanno
=============================================

ERROR: can't find query file: example/example/query.vcf.gz
brentp commented 4 years ago

closed in #119