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

Feature request - specify annotation file paths at runtime #76

Closed jdidion closed 6 years ago

jdidion commented 6 years ago

Rather than hardcode the annotation file paths in the config file, I'd like to be able to put a placeholder in the config file and pass the actual paths on the command line. The use case is when vcfanno is used in a fully reproducible pipeline in which the annotation file may be downloaded to a temporary location, and thus the file paths are not known ahead of time. I'm envisioning something like this:

[[annotation]]
file="[EXAC]"
...
vcfanno -f EXAC=/path/to/ExAC.vcf ...
brentp commented 6 years ago

I see the utility of this in theory, but I won't implement. The main reason is to avoid adding more complexity to the user.

You can always just use -base-path and then symlink whatever files are needed into that base-path. That's just as easy for the user with less chance of being confusing.

In addition, since the conf is a simple text file, you can choose to make that a template and fill it with e.g. python and then send the resulting file to vcfanno.