This site is now read-only. You can find our new documentation site and support forum for posting questions here.
Be sure to read our welcome blog!
Why VariantFiltration did not filter my SNPs following the JEXL expression I gave.
Hi GATK team again !
I have been trying to do the hard filter on my SNPs. What I want to do is to filter out all snps with depth less than 300 and more than 2000, and also all the SNPs with the following features: QD < 10, MQ < 20, FS >20, SOR > 4, MQRankSum < -5 and ReadPosRankSum < -5.
Here is my command:
java -Xmx4g -jar ~/path/to/GenomeAnalysisTK.jar \
-T VariantFiltration \
-R ~/path/to/reference \
-V NK_jointSNP.vcf \
--filterExpression "DP < 300 || DP > 2000 || QD < 10 || MQ < 20 || FS < 20 || MQRankSum < -5 || ReadPosRankSum < -5 || SOR > 4" \
--filterName "snp_filter_1st_round" \
-o filtered_snp.vcf &
Beside the error messages "undefined variable QD", SNPs which should not pass my filter seem to pass the filter as they were tagged "PASS" on the FILTER field....
As you can see, SNPs with uncorresponding values are there....it seems also that, when this happens, SNPs pass the filter for MQ, they do not pass for QD and vice-versa.... The other annotations do not seem to be affected...
Am I making any mistake with my JEXL expression? I used "&&" as I do want my SNPs to correspond to all the criterial not just at least one and I used "||" between the two expressions on DP as a snp cannot have in the same time <300 and >2000 of depth...
I would like to have your input.
Thank you very much in advance. You guys are doing great job in supporting our community !