Entering edit mode
                    5.1 years ago
        BAGeno
        
    
        ▴
    
    190
    Hi,
I am using bcftools filter. I run bcftools filter command in two different ways. It gave me different results.
Command #1
 bcftools filter --e "GQ<20" miss.GT.vcf.gz>test1.vcf
This gave me 49336 variants.
while when I run command 2
 bcftools filter -i "GQ>20" miss.GT.vcf.gz>test2.vcf
It gave me 80858 variants.
There are 80858 variants in original file. 
Why there is such variation? Which command results should I consider for further analysis?
This may be the recently fixed bcftools issue #1266.
what is the version of bcftools ? how is defined GQ in the header ? It's a FORMAT annotation ? with a multi-sample VCF ? show us a few lines with '-i' and '-e'
Yes it is multi-sample vcf and GQ field is in FORMAT column.
Here are lines of -e option.
Here are lines of
-ioptionsee John Marshall 's answer. Check your version of bcftools.