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

Ability to add fallback / default values for fields where annotation source is missing #139

Open ssadedin opened 3 years ago

ssadedin commented 3 years ago

It would be really useful if we could have vcfanno put a value into a field when it is observed to be missing from an annotation source.

I tried to achieve this by using custom lua in the annotation and post annotation sections, but I couldn't work out in both cases how to formulate something that would work. It could be as simple as "op" that lets you set a fixed default value when the annotation source is missing, but the ideal thing would be if you could set it in post annotation.