Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RobinC
    Junior Member
    • Aug 2014
    • 2

    #1

    BCFtools will not filter fixed sites

    Hello all,

    I'm encountering a surprising problem while filtering a vcf file in bcftools (v1.1-52-ga2e5b56). It doesn't look like a proper bug but leaves be bewildered enough.

    I'm trying to filter out all variant sites, and retain only fixed sites. So, logically enough, I apply a filter to discard sites where minor allele count is above zero, with :

    bcftools view --max-ac 0:minor

    It mostly works, but only mostly : at some sites, the odd heterozygous individual is retained (0/1:2,1:3:30:30,0,65 for ex in a mostly 0/0 line). This is not a problem of a deadlock between two alleles with equal frequency (thus no minor), since this odd "1" is the only one with 100+ "0"s.

    So, I believe there must be some kind of hidden tolerance threshold somewhere, but, does any one have a workaround..?

    Thanks a lot for insight !

    Robin
  • RobinC
    Junior Member
    • Aug 2014
    • 2

    #2
    With a quick edit precision: this also applies to VCFtools..! here's an example :

    First, just scanning the VCF file manually:

    bash-4.1$ gunzip -c data.vcf.gz | grep '0/0' | grep '0/1' -v | grep '1/1' -v | grep '0/0' -c
    2408 ##these are ref:ref homozygous

    bash-4.1$ gunzip -c data.vcf.gz | grep '1/1' | grep '0/1' -v | grep '0/0' -v | grep '1/1' -c
    46180 ##these are alt:alt homozygous

    bash-4.1$ vcftools --gzvcf data.vcf.gz --max-mac 0 --recode --stdout | grep -c '0/1'
    0 #that's what I want, but then:

    bash-4.1$ vcftools --gzvcf data.vcf.gz --max-mac 0 --recode --stdout | grep -c '0/0'
    0 ##none of my 2408 ref:ref homozygotes has been retained !

    bash-4.1$ vcftools --gzvcf data.vcf.gz --max-mac 0 --recode --stdout | grep -c '1/1'
    46122 ##and some of the ref:ref have been dropped too.

    This is surprising, as both BCFtools and VCFtools explicity distinguish the notions of "minor allele" and "non-reference allele". So this should NOT be an issue.

    All ideas very much welcome !!

    Best

    Robin

    Comment

    Latest Articles

    Collapse

    • kinpict.com
      Reply to 16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
      by kinpict.com
      The part about this topic feels surprisingly grounded, and the details on the page is the bit that made me slow down. I’d keep <a href="https://kinpict.com/">ai family photo generator</a> bookmarked for later.
      Today, 06:37 PM
    • SEQadmin2
      16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
      by SEQadmin2





      NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification,...
      10-30-2026, 06:46 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by SEQadmin2, 11-12-2026, 07:59 AM
    0 responses
    27 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 11-05-2026, 09:25 AM
    0 responses
    35 views
    0 reactions
    Last Post SEQadmin2  
    Started by SEQadmin2, 11-03-2026, 11:54 AM
    2 responses
    56 views
    0 reactions
    Last Post kinpict.com  
    Started by SEQadmin2, 10-28-2026, 09:57 AM
    0 responses
    175 views
    0 reactions
    Last Post SEQadmin2  
    Working...