problem using VCF filter tool

Hello everyone,
I used bctools mpileup and bcftools call on my bam file and I used VCFfilter tool to filter for QUAL and it worked.
Now I want to filter for RPBZ in a range between -5 and +5.
I tried to set the filtering value like this RPBZ > -5 & RPBZ < 5 but I got an error. I also tried to set just RPBZ > -5 but again it turned into an error. Could the problem be the minus simbol?
Can someone help me?

Welcome, @giuliag89

Yes, probably.

Would you please copy/paste back a line from the VCF file that contains an example value you want to remove that is a negative value? Or even better, would you share the file itself in a history along with a failed query run? I’d like to see if there is a workaround, or maybe some other logical solution e.g. alternative tool. Sharing your History

Hi Jennaj,
this is the link of the history with the failed query runs:
url: https://usegalaxy.eu/u/giuliag89/h/run-sample-2-error

Thanks

Hi @giuliag89

The history isn’t shared anymore, or wasn’t fully shared originally.

You can just post back a few lines of the data. I’m more curious about how those are structured in the VCF text itself, but I guess you can also share the history if it shows how/where those values were introduced (which specific tool, which specific options).

Hi,
I made the history shared again if you want have a look: url: https://usegalaxy.eu/u/giuliag89/h/run-sample-2-error

Here few lines of the vcf file:

chr13 32906574 . T A 3.38992 . DP=3107;ADF=4,1516;ADR=1399,4;AD=1403,1520;DPR=1403,1520;VDB=0;SGB=-0.693147;RPBZ=-47.9879;MQBZ=0;MQSBZ=0;BQBZ=-47.5208;SCBZ=-1.58678;FS=0;MQ0F=0;AC=1;AN=2;DP4=4,1399,1528,5;MQ=59;PV4=0,0,1,0

chr13 32911888 . A G 222.411 . DP=3356;ADF=406,451;ADR=427,395;AD=833,846;DPR=833,846;VDB=0.370697;SGB=-0.693147;RPBZ=1.83679;MQBZ=0;MQSBZ=0;BQBZ=-1.47865;SCBZ=0.0797271;FS=0;MQ0F=0;AC=1;AN=2;DP4=406,427,453,395;MQ=60;PV4=0.0571422,0.00183936,1,0.0309689

chr13 32912299 . T C 222.404 . DP=3098;ADF=384,385;ADR=427,389;AD=811,774;DPR=811,774;VDB=0.426724;SGB=-0.693147;RPBZ=1.27188;MQBZ=-0.0428285;MQSBZ=-0.0406173;BQBZ=0.00843397;SCBZ=0.0198499;FS=0;MQ0F=0;AC=1;AN=2;DP4=384,427,385,389;MQ=59;PV4=0.365528,1,0.165837,1

chr13 32929387 . T C 228.425 . DP=1162;ADF=0,0;ADR=3,1156;AD=3,1156;DPR=3,1156;VDB=0;SGB=-0.693147;RPBZ=0.331772;MQBZ=0;BQBZ=1.63548;SCBZ=0.246328;FS=0;MQ0F=0;AC=2;AN=2;DP4=0,3,0,1159;MQ=60;PV4=1,1,1,1

Thank you

Hi @giuliag89

Great, thanks for sharing. The tool seems to be working correctly, and negative values are accepted.

Try removing the space between the - and 5.

So this: TERM > -5
instead of TERM > - 5

The two filters might need to be in separate filter blocks. I didn’t get any data passing through when combined on the same line. All filters in any single run are combined with a logical “AND” by default. Meaning, all need to be true for data to pass through. There is a toggle for an “OR” on the form too should you need that.

That should be enough so you can try different queries to see what filters for your purposes, without running into an error with the syntax adjusted a bit. I wasn’t sure if the compressed format was causing some random issue or not – but I didn’t find that to be actual (yea!). So using the current compressed format should be fine. I can see that you were testing that as well, or were converting to tabular format for another reason… You could output plain text VCF instead from BCFTools Call if you want to try using other tools to directly filter/query for any reason. BCFTools understands the compression, other tools may not.

Hope that helps!