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

-base-path duplicates the string #82

Closed sergiigladchuk closed 6 years ago

sergiigladchuk commented 6 years ago

Error is simple, I want to pre-append my paths in .toml file, if i use option -base-path, vcfanno double it and creates incorrect path. vcfanno used - v0.2.8 (just installed from bioconda)

command: vcfanno -base-path anno_db anno_db/allDbs.toml ../test_vcf/S000014_l_r_m_c_lib_g-vardict.vcf.gz > test.vcf

Error message: vcfanno.go:112: [Flatten] unable to open file: anno_db/anno_db/cosmic/CosmicCodingMuts_v83_add.vcf.gz in anno_db

As you see "anno_db" (the dir where I keep other directories with databases) is duplicated in path called by routine. I have attached screens of my terminal commands and .toml file as well: Terminal: terminal

Toml: toml

sergiigladchuk commented 6 years ago

Actually there is no issue. It works fine (I had bug in my previous step of pipeline) - the error message confused me and that is why I posted this issue. Would be nice to correct error message though.

brentp commented 6 years ago

thanks for following up. can you let me know how/when the bad error message manifests so I can try to improve it?

sergiigladchuk commented 6 years ago

So this incorrect error message appeared then I did not have my annotation file e.g. dbsnp.vcf in one directory and .toml file one directory up, but incorrect path on file= line, so when using flag -base-path I got that duplicated path, and thought there is bug in program. In order to reproduce this 'incorrect' error message just have misleading path on file= line in .toml and -base-path flag in vcfanno command.