Question: gatk v4.14.0 does not recognize matematical operators
gravatar for dago
16 months ago by
dago2.6k wrote:

Dear all I have problem with filtering the SNPs called with gatk v4.1.4.0. I have a vcf file that looks like this:

    contig00001     8227    .       A       G       40.68   .       AC=1;AF=0.100;AN=10;BaseQRankSum=-0.861;ClippingRankSum=0.000;DP=88;FS=13.035;MLEAC=1;MLEAF=0.100;MQ=60.00;MQRankSum=0.000;QD=0.46;ReadPosRankSum=-0.300;SOR=2.792      GT:AD:DP:GQ:PL  0/0/0/0/0/0/0/0/0/1:85,3:88:34:66,0,34,78,132,196,276,380,528,782,6199
    contig00001     8244    .       T       C       43.68   .       AC=1;AF=0.100;AN=10;BaseQRankSum=-0.838;ClippingRankSum=0.000;DP=80;FS=15.529;MLEAC=1;MLEAF=0.100;MQ=60.00;MQRankSum=0.000;QD=0.55;ReadPosRankSum=-1.716;SOR=2.783      GT:AD:DP:GQ:PL  0/0/0/0/0/0/0/0/0/1:77,3:80:31:69,0,31,71,119,178,251,347,482,716,5872
    contig00001     8846    .       C       T       72.68   .       AC=1;AF=0.100;AN=10;BaseQRankSum=0.659;ClippingRankSum=0.000;DP=88;FS=2.385;MLEAC=1;MLEAF=0.100;MQ=59.93;MQRankSum=0.273;QD=0.83;ReadPosRankSum=-4.696;SOR=1.102        GT:AD:DP:GQ:PL  0/0/0/0/0/0/0/0/0/1:84,4:88:31:98,0,31,72,124,186,264,366,510,759,3392
    contig00001     9854    .       A       G       42.69   .       AC=1;AF=0.100;AN=10;BaseQRankSum=0.463;ClippingRankSum=0.000;DP=79;FS=11.687;MLEAC=1;MLEAF=0.100;MQ=60.00;MQRankSum=0.000;QD=0.55;ReadPosRankSum=1.267;SOR=2.799        GT:AD:DP:GQ:PL  0/0/0/0/0/0/0/0/0/1:74,3:77:29:68,0,29,66,111,166,235,324,450,665,2970
    contig00001     19796   .       A       G       34.70   .       AC=1;AF=0.100;AN=10;BaseQRankSum=-2.543;ClippingRankSum=0.000;DP=66;FS=10.825;MLEAC=1;MLEAF=0.100;MQ=60.00;MQRankSum=0.000;QD=0.53;ReadPosRankSum=-0.600;SOR=0.829      GT:AD:DP:GQ:PL  0/0/0/0/0/0/0/0/0/1:63,3:66:23:60,0,23,54,93,140,199,275,384,572,2745
    contig00001     20699   .       T       C       47.70   .       AC=1;AF=0.100;AN=10;BaseQRankSum=0.326;ClippingRankSum=0.000;DP=66;FS=2.442;MLEAC=1;MLEAF=0.1

I would like to filter the SNPs now, e.g. gatk VariantFiltration -V GenomeA.rawSNPs.vcf -filter "QD < 2" --filter-name "snp_def" -O test.vcf


gatk VariantFiltration -R ../GenomeA_contigs.fa -V GenomeA.rawSNPs.vcf -O test.vcf --filter-name "snp" --filter-expression "MQ < 60.0"

However, I keep getting the following error:

A USER ERROR has occurred: Invalid argument '<'.

I believe there is a problem in recognizing the mathematical operators or with "/' I tried various combionation with or without "/' but I am still getting the same error. I cannto quite figure out where the problem is. Can you guys spot the problem?

Thank you

snp java • 314 views
ADD COMMENTlink modified 16 months ago • written 16 months ago by dago2.6k

I also posted this issue on the gatk github, sorry for the double posting

ADD REPLYlink written 16 months ago by dago2.6k
gravatar for Mark
16 months ago by
Mark890 wrote:

I think the syntax is --filter-name then -filter. You specify filter first then the filter name.

See the documentation here:

ADD COMMENTlink written 16 months ago by Mark890

Thanks for your comment. I jsut tried and it gives me the same error.

ADD REPLYlink written 16 months ago by dago2.6k

Oh! you're missing the reference sequence so include -R seq.fa at the start. Follow the manual precisely. I think the order of flag input is very important (and spaces too).

ADD REPLYlink written 16 months ago by Mark890

Sorry, I did that as well, but I still get the same error. I edit my post now

ADD REPLYlink written 16 months ago by dago2.6k

Okay this is the last thing I can think of. Try matching exactly the type of values. In the first example you gave QD is a float so make sure its "QD < 2.0" and in the second MQ is two decimals (shoudn't make a diff but try) MQ < 60.00. I didn't think MQ was a float I thought it was an int so its weird to see it as a float in your file. Not sure whats happening

See the caveats mentioned here:

ADD REPLYlink modified 16 months ago • written 16 months ago by Mark890

Thank you @Amar, I appreciate your suggestions. I tried what you said as well 20.0, 20, 20.00. Always the same. I personally believe that there is an issue with Java.

ADD REPLYlink written 16 months ago by dago2.6k

Hello, dago! If you finally solve this problem could you share how you fix it?

ADD REPLYlink written 13 months ago by fireprophet.io10
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1156 users visited in the last hour