This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Meaning of "%" in expressions for bcftools filter

The current bcftools HOWTO gives several examples of variant filtering, such as:

bcftools filter -i'%QUAL>20' calls.vcf.gz

What does the "%" mean? Why not simply using -i'QUAL>20' ?

I couldn't find details on this in the EXPRESSIONS section of the manual ("man bcftools").

bcftools

I'm curious about this as well. I know you have to put it in the single quotes so the shell doesn't think that you are want to to use the modulus function but I tried it both ways and got the same results. I saw earlier that the header format was %CHROM, etc. so maybe its more of a format/best practice kind of thing.

1 answer

This is because when you include a % inside of quotes, it will act as a stdin for the program.

See this post: http://serverfault.com/questions/274475/escaping-double-quotes-and-percent-signs-in-cron

Log in to answer this question.