Attention:
The frontline support team will be unavailable to answer questions until May27th 2019. We will be back soon after. Thank you for your patience and we apologize for any inconvenience!

GATK Variant Filtration seems to ignore JEXL expressions on genotype fields (AD and DP)

Hello,

I'm using the latest GATK version (4.0.9.0) and I'm aiming to perform a sample-based filtering. I want to add filters to my variants rather than select them (SelectVariants).

When I filter by GQ, it works, and I see the filtered records:

docker run -v /home/pbarbosa/Desktop/:/media broadinstitute/gatk:latest gatk VariantFiltration --genotype-filter-expression "GQ <= 20" --genotype-filter-name "LowGQ" --set-filtered-genotype-to-no-call  -O /media/test.vcf -V /media/joint.vcf.gz

chr1    13660314        .       G       A       643.35  PASS    AC=2;AF=1.00;AN=2;DP=15;ExcessHet=3.0103;FS=0.000;MLEAC=6;MLEAF=1.00;MQ=60.00;QD=33.53;SOR=1.911        GT:AD:DP:FT:GQ:PGT:PID:PL       ./.:0,4:4:LowGQ:12:1|1:13660314_G_A:180,12,0    1/1:0,9:9:PASS:27:1|1:13660314_G_A:399,27,0  ./.:0,2:2:LowGQ:6:1|1:13660314_G_A:90,6,0

However, when I try to filter by either AD or DP (even using extreme thresholds) I do not see the records filtered:

docker run -v /home/pbarbosa/Desktop/:/media broadinstitute/gatk:latest gatk VariantFiltration -V /media/joint.vcf.gz -O /media/test.vcf --genotype-filter-expression "vc.getGenotype("dAgo1_3_6").getDP() <= 200" --genotype-filter-name "LowDP"   --genotype-filter-expression "vc.getGenotype("dAgo1_3_6").getAD().0 <= 100 && vc.getGenotype("dAgo1_3_6").getAD().1 <= 100"  --genotype-filter-name "LowAD" --set-filtered-genotype-to-no-call

When I grep for the LowAD and LowDP lines, that's what I get:

##FILTER=<ID=LowAD,Description="vc.getGenotype(dAgo1_3_6).getAD().0 <= 100 && vc.getGenotype(dAgo1_3_6).getAD().1 <= 100">
##FILTER=<ID=LowDP,Description="vc.getGenotype(dAgo1_3_6).getDP() <= 200">
##GATKCommandLine=<ID=VariantFiltration,CommandLine="VariantFiltration  --output /media/test.vcf --genotype-filter-expression vc.getGenotype(dAgo1_3_6).getDP() <= 100 --genotype-filter-expression vc.getGenotype(dAgo1_3_6).getAD().0 <= 100 && vc.getGenotype(dAgo1_3_6).getAD().1 <= 100 --genotype-filter-name LowDP --genotype-filter-name LowAD --set-filtered-genotype-to-no-call true --variant /media/joint.vcf.gz  --cluster-size 3 --cluster-window-size 0 --mask-extension 0 --mask-name Mask --filter-not-in-mask false --missing-values-evaluate-as-failing false --invalidate-previous-filters false --invert-filter-expression false --invert-genotype-filter-expression false --interval-set-rule UNION --interval-padding 0 --interval-exclusion-padding 0 --interval-merging-rule ALL --read-validation-stringency SILENT --seconds-between-progress-updates 10.0 --disable-sequence-dictionary-validation false --create-output-bam-index true --create-output-bam-md5 false --create-output-variant-index true --create-output-variant-md5 false --lenient false --add-output-sam-program-record true --add-output-vcf-command-line true --cloud-prefetch-buffer 40 --cloud-index-prefetch-buffer -1 --disable-bam-index-caching false --sites-only-vcf-output false --help false --version false --showHidden false --verbosity INFO --QUIET false --use-jdk-deflater false --use-jdk-inflater false --gcs-max-retries 20 --gcs-project-for-requester-pays  --disable-tool-default-read-filters false",Version=4.0.9.0,Date="October 1, 2018 12:54:21 AM UTC">

Any help is appreciated,
Regards,
Pedro

Best Answer

Answers

Sign In or Register to comment.