brentp / slivar

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

filtering on INFO field #159

Closed equinne5 closed 8 months ago

equinne5 commented 8 months ago

Hi Brent, I'm using SLIVAR on a trio VCF that has been annotated using VEP firstly and then passed to vcfanno (thank you!) for clinvar annotations.

My info field looks something like this:

chr3 124055231 chr3_124055231_T_G T G 59.0 . AF=0.333333;AQ=59;CSQ=|NM_001388419.1|intron_variant|MODIFIER|KALRN||1/59|NM_001388419.1:c.73+21418T>G||rs9289231|0.298|AFR||0.142|ENST00000682506.1|;clinvar_id=5458;clinsig=Pathogenic;clinsig_conf=NA;am_pathogenicity=NA;am_class=NA;REVEL=NA GT:DP:AD:GQ:PL:RNC 0/1:31:12,19:59:59,0,69:.. 0/1:37:22,15:47:46,0,65:.. 0/0:16:16,0:48:0,48,479:..

& I wan't to use slivar to filter for AF but also would like to retain anything that's pathogenic regardless of AF. This is my code but doesn't seem to be working & I'm wondering if its something to do with the structure of the INFO field. I have no issues using SLIVAR tsv to pull this field out using " -i clinsig " its just the filtering part that's giving me trouble so any help would be much appreciated!

--info '(INFO.clinsig=="Pathogenic" | INFO.clinsig=="Likely_pathogenic" | INFO.gnomad_popmax_af < 0.01 )'

brentp commented 8 months ago

Hi, | is a bitwis or, you can use || for the logical or and it should behave as you expect.

equinne5 commented 8 months ago

Ahh! thanks so much! & last stupid question....Is there a way to pull these variants out via slivar tsv -if they meet a particular inheritance pattern that will happen via '-s" but if not is there another way to pull them out or do I just need to write something to do this & append them to the tsv ?

brentp commented 8 months ago

you're welcome. you'll probably need to write something. slivar tsv has limited functionality, but should mostly work for trios.

equinne5 commented 8 months ago

Super thanks again- ill close this now