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

Annotation header Ex. SnpEffVersion #140

Open raonyguimaraes opened 3 years ago

raonyguimaraes commented 3 years ago

Hi Brent,

I am wondering how I could keep certain vcf header values after using vcfanno for example:

SnpEffVersion and ##SnpEffCmd

After using vcfanno to merge this vcf with a VEP(ed) vcf I don't see these fields anymore.

Is there a way to include these headers in the output?

Here is my config.toml

[[annotation]]
file="/home/raony/dev/pynnotator/pynnotator/tests/ann_sample.100.hg38/snpeff/snpeff.output.vcf.gz"
fields = ["ANN"]
names = ["snpeff_eff"]
ops=["first"]

[[annotation]]
file="/home/raony/dev/pynnotator/pynnotator/tests/ann_sample.100.hg38/vep/vep.output.sorted.vcf.gz"
fields = ["CSQ"]
names = ["vep_csq"]
ops=["first"]
brentp commented 3 years ago

I see the utility in this. I might accept a PR for this. But you can see how it could get unwieldy to handle everything. If you just allow headers like this, it could be something like:

[[annotation]]
file="/home/raony/dev/pynnotator/pynnotator/tests/ann_sample.100.hg38/vep/vep.output.sorted.vcf.gz"
fields = ["CSQ"]
names = ["vep_csq"]
ops=["first"]
headers=["SnpEffVersion", "SnpEffCmd"]
C-Gouveia commented 2 years ago

Hi Brent,

Regarding this, is there anyway of adding a new line to the header of the annotated file where the vcfanno version is specified?

Thank you

brentp commented 2 years ago

@C-Gouveia this is now implemented and in release v0.3.3

C-Gouveia commented 2 years ago

Awesome! Thank you

raonyguimaraes commented 2 years ago

thank you!