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

Field: FILTER not being added for gnomad annotations #104

Closed cvlvxi closed 5 years ago

cvlvxi commented 5 years ago

I'm noticing that when using the special FILTER keyword in the fields of my config that the filters are not being added but the special ID keyword is being added.

vcfanno.config

[[annotation]]
file="gnomad.genomes.r2.1.sites.vcf.gz"
fields = ["AF_popmax", "ID", "FILTER"]
ops = ["first", "self", "self"]
names = ["GNOMAD_AF_POPMAX", "GNOMAD_ID", "GNOMAD_FILTER"]

It produces this when I run it:

vcfanno.go:114: found 3 sources from 1 files
vcfanno.go:166: Info Error: FILTER not found in header >> this error/warning may occur many times. reporting once here...
vcfanno.go:220: annotated 32 variants in 0.06 seconds (546.2 / second)

The gnomad vcf headers do contain FILTER headers but not sure why they would be relevant for copying the annotation

##FILTER=<ID=AC0,Description="Allele count is zero after filtering out low-confidence genotypes (GQ < 20; DP < 10; and AB < 0.2 for het calls)">
##FILTER=<ID=InbreedingCoeff,Description="InbreedingCoeff < -0.3">
##FILTER=<ID=PASS,Description="Passed all variant filters">
##FILTER=<ID=RF,Description="Failed random forest filtering thresholds of 0.2634762834546574, 0.22213813189901457 (probabilities of being a true positive variant) for SNPs, indels">
brentp commented 5 years ago

and you're using the latest release of vcfanno?

cvlvxi commented 5 years ago

Ah no I wasn't. Thanks for that. 👍

brentp commented 5 years ago

good. thanks for checking.

ww2272 commented 4 years ago

Hi I am having the same issue and I am using the latest version of vcfanno.

ww2272 commented 4 years ago

I tried the ID column and it works... I don't know why it's not working for FILTER...

brentp commented 4 years ago

can you provide a small vcf and annotation set to reproduce?

ww2272 commented 4 years ago

combined.vcf.gz

Here's is the vcf file I am trying to annotate. I am just trying to annotate with the gnomAD 2.1.1 release exome and genome files. Thanks a lot!

ww2272 commented 4 years ago

vcfanno.txt

Here is the annotation configuration file I used.

brentp commented 4 years ago

vcfanno will not annotate the FILTER with variants that are PASS (or '.') in gnomAD; you'll only see the filter field for variants that are something other than PASS. does this match what you are seeing?

ww2272 commented 4 years ago

Oh, I didn't know that. I will check! Thanks!