Question: Meaning of "%" in expressions for bcftools filter
gravatar for Timothée Flutre
4.9 years ago by
Timothée Flutre20 wrote:

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 • 2.4k views
ADD COMMENTlink modified 4.0 years ago by lstbl40 • written 4.9 years ago by Timothée Flutre20

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.

ADD REPLYlink written 4.9 years ago by skbrimer620
gravatar for lstbl
4.0 years ago by
lstbl40 wrote:

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

See this post:

ADD COMMENTlink written 4.0 years ago by lstbl40
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: 1164 users visited in the last hour