Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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

    • seqadmin
      Strategies for Sequencing Challenging Samples
      by seqadmin


      Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
      03-22-2024, 06:39 AM
    • seqadmin
      Techniques and Challenges in Conservation Genomics
      by seqadmin



      The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

      Avian Conservation
      Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
      03-08-2024, 10:41 AM

    ad_right_rmr

    Collapse

    News

    Collapse

    Topics Statistics Last Post
    Started by seqadmin, Yesterday, 06:37 PM
    0 responses
    8 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, Yesterday, 06:07 PM
    0 responses
    8 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 03-22-2024, 10:03 AM
    0 responses
    49 views
    0 likes
    Last Post seqadmin  
    Started by seqadmin, 03-21-2024, 07:32 AM
    0 responses
    66 views
    0 likes
    Last Post seqadmin  
    Working...
    X