brentp / slivar

genetic variant expressions, annotation, and filtering for great good.
MIT License
247 stars 23 forks source link

make-gnotate, gnomAD filter field. #135

Open Elliott77 opened 2 years ago

Elliott77 commented 2 years ago

Can I use slivar make-gnotate to get the gnomAD (v3.1) FILTER field e.g. "##FILTER=<ID=PASS" Description="All filters passed"? Thanks!

brentp commented 2 years ago

Hi Elliot, the FILTER field is automatically encoded into the variant, but only as a PASS or not. So if you create a gnotate file (or use the ones provided) you will get a flag that indicates if the variant was PASS or not. If you need the actual flag that's a lot more difficult with slivar.

Elliott77 commented 2 years ago

Thanks Brent!

Elliott77 commented 2 years ago

In my "slivar expr" command I include: --info (variant.FILTER == 'PASS') Does that refer to the PASS field in my VCF of the the one in the gnomad.zip file? Thanks!

brentp commented 2 years ago

If you annotate, you'll see an extra slivar field for every field in that gnotate file, so e.g. gnomad_popmax_af_filter. (This is wasteful because you get a _filter field for every field in the gnotate file, but that's how it is for now).

You can use that as:

--info '("gnomad_popmax_af_filter" in INFO) && otherstuff'
brentp commented 2 years ago

... and variant.FILTER always refers to the FILTER in your VCF.

Elliott77 commented 2 years ago

Thanks Brent. So, in making the gnotate file with make-gnotate, can I only include INFO fields? Can I not get the "##FILTER=<ID=PASS" Description="All filters passed" field from the gnomAD VCF? Thanks!

brentp commented 2 years ago

not explicitly. only via the mechanism I described that stored a boolean for the variant indicating PASS or not. If you want the filter, you'd have to do something to get the filter into the INFO as an integer field (presumably a lookup into the possible FILTER fields).

Elliott77 commented 2 years ago

Thanks Brent, It's still not clear to me how to make use of the 'PASS' field from the gnomAD VCF (v3.1) with make-gnotate and then in a subsequent Slivar search. How do I store a boolean indicating gnomAD PASS or not and how will I access that boolean from the gnomad.zip file in a Slivar search?

brentp commented 2 years ago

Hi Elliot, you don't need to do anything, it will be encoded (and annotated) automatically.