Question: Meaning of "%" in expressions for bcftools filter
gravatar for Timothée Flutre
3.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.1k views
ADD COMMENTlink modified 3.0 years ago by lstbl40 • written 3.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 3.9 years ago by skbrimer530
gravatar for lstbl
3.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 3.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: 882 users visited in the last hour