-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding a custom value for missing annotation #116
Comments
hmm, that reminds me of a question I always forget asking: |
Hi, I think you can do this with a |
I will try with the post annotation as you suggested. Thanks! |
@wm75 so variants were discovered in the cohort, but then filtered/QC-ed somehow so they have an AF of 0. there is no rounding. |
@brentp Thanks for the clarification! |
Hi brent, I'm performing annotation with some exome AF. When a variant in my VCF is not present in the cohort_exome.vcf I want to set -1 for exome_af. So I have configured annotations as follows
Then I've prepared a custom.lua file as follows
However, vcfanno gives me warning that the exome_af field do not exist in INFO and the -1 value is not inserted. |
well, that should have worked, but it didn't. I just pushed a fix for this and added something like your example as a test-case. thanks for the clear example. |
Hi brent, Thanks for the quick fix! It works perfectly now.
So to obtain the desired result the lua script I've used is:
|
you can also use table.concat if you want to join the values into a string. |
handle missing value in postannotation. closes brentp#116
Hi bred!
I have a suggestion for your already amazing vcfanno.
When annotating AF from an external file (gnomAD for example) it would be more convenient to have the annotation field set to zero for variants not found in gnomAD VCF.
In this way, one can simply filter for rare variant doing gnomAD_AF < 0.01 for example
In general, it would be great to have the possibility to specify in the toml configuration file how to annotate variants when they are not found in the annotation source, so one can decide to leave them un-annotated (as it is right now) or adding a value (like zero for AF annotation or some custom value for other kinds of annotations).
The text was updated successfully, but these errors were encountered: