Fail to apply --filterExpression of VariantFiltration

Hi all,
I tried to apply the following command to my raw vcf file to filter it with the command:
java -Xmx30g -jar ../GATK/GenomeAnalysisTK.jar -R ../ref.fa -T VariantFiltration --filterExpression " QD < 20.0 || ReadPosRankSum < -8.0 || FS > 10.0 || QUAL < $MEANQUAL || MQ <30.0 || DP< 10.0 " --filterName LowQualFilter --missingValuesInExpressionsShouldEvaluateAsFailing --variant ../s1.raw.vcf --logging_level ERROR -o ../s1.makered.raw.vcf

grep -v "Filter" s1.makered.raw.vcf >s1.flt.vcf

After that, I checked the result file s1.flt.vcf and found the following makered "PASS" .Obviously, the command doesn't work as ‘DP=8“ should be makered "LowQualFiter".

Chr01 231575 . A G 241.78 PASS AC=2;AF=1.00;AN=2;DP=8;FS=0.000;MLEAC=2;MLEAF=1.00;MQ=29.00;MQ0=0;QD=30.22 GT:AD:DP:GQ:PL
1/1:0,8:8:24:270,24,0
Chr01 237476 . T C 238.78 PASS AC=2;AF=1.00;AN=2;DP=8;FS=0.000;MLEAC=2;MLEAF=1.00;MQ=29.00;MQ0=0;QD=29.85 GT:AD:DP:GQ:PL
1/1:0,8:8:24:267,24,0

There is no error reported.Any suggestion will be appreciated.

Best Answer

Answers

  • xiayanokxiayanok chinaMember

    thanks,I will try your suggestion and feedback.> @pdexheimer said:

    Since the variant in question is missing some annotations in your filter (ReadPosRankSum, FS), the filter expression fails and so is not applied. You should break the expression into multiple parts (--filterExpression "QD<20.0" --filterName lowQD --filterExpression "ReadPosRankSum < -8.0" --filterName LowReadPos....). That will prevent this issue from occurring, because the ReadPosRankSum filter will fail but the DP filter will still be applied

Sign In or Register to comment.