Seqanswers Leaderboard Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • MurielGB
    Member
    • Oct 2013
    • 51

    Filtering out SNPs based on Genotype Quality (GQ)

    Hello,

    I used GATK to call variants.

    I want to filter the vcf file based on genotype quality.
    If a genotype has a GQ<20, I would like the corresponding genotype to be replaced by missing data (./.).

    I used GATK to filter :
    Code:
    java  -Xmx20g -jar GenomeAnalysisTK.jar \
    	-T VariantFiltration \
    	-R ../ref.fasta \
    	-V vcf_snp_f1.vcf \
    	-o vcf_snp_f11.vcf \
    	--genotypeFilterExpression "GQ <= 20" \
    	--genotypeFilterName "LowGQ" \
    And I obtain a vcf where the genotypes fields look like that :
    If GQ>20, then :
    Code:
    0/1:2,3:5:PASS:44:95,0,44
    The "PASS" appears.

    But if GQ<20, then :
    Code:
    0/0:2,0:2:LowGQ:6:0,6,68
    It's written LowGQ.

    The thing is that for almost all SNPs, I have a LowGQ in one or more individuals so I can't filter out the SNP using "grep -v LowGQ".

    I would prefer the corresponding genotype to be replaced by "./." (missing).

    Is there a tool to do that or I have to write a bash script ?

    Thanks a lot for your help,

    Muriel
    Last edited by MurielGB; 02-06-2014, 02:22 AM.
  • TiborNagy
    Senior Member
    • Mar 2010
    • 329

    #2
    You need to write a script.

    Comment

    • Jeremy
      Senior Member
      • Nov 2009
      • 190

      #3
      vcffilter from vcflib will replace with "./."

      Comment

      Latest Articles

      Collapse

      • seqadmin
        Pathogen Surveillance with Advanced Genomic Tools
        by seqadmin




        The COVID-19 pandemic highlighted the need for proactive pathogen surveillance systems. As ongoing threats like avian influenza and newly emerging infections continue to pose risks, researchers are working to improve how quickly and accurately pathogens can be identified and tracked. In a recent SEQanswers webinar, two experts discussed how next-generation sequencing (NGS) and machine learning are shaping efforts to monitor viral variation and trace the origins of infectious...
        Yesterday, 11:48 AM
      • seqadmin
        New Genomics Tools and Methods Shared at AGBT 2025
        by seqadmin


        This year’s Advances in Genome Biology and Technology (AGBT) General Meeting commemorated the 25th anniversary of the event at its original venue on Marco Island, Florida. While this year’s event didn’t include high-profile musical performances, the industry announcements and cutting-edge research still drew the attention of leading scientists.

        The Headliner
        The biggest announcement was Roche stepping back into the sequencing platform market. In the years since...
        03-03-2025, 01:39 PM
      • seqadmin
        Investigating the Gut Microbiome Through Diet and Spatial Biology
        by seqadmin




        The human gut contains trillions of microorganisms that impact digestion, immune functions, and overall health1. Despite major breakthroughs, we’re only beginning to understand the full extent of the microbiome’s influence on health and disease. Advances in next-generation sequencing and spatial biology have opened new windows into this complex environment, yet many questions remain. This article highlights two recent studies exploring how diet influences microbial...
        02-24-2025, 06:31 AM

      ad_right_rmr

      Collapse

      News

      Collapse

      Topics Statistics Last Post
      Started by seqadmin, 03-20-2025, 05:03 AM
      0 responses
      26 views
      0 reactions
      Last Post seqadmin  
      Started by seqadmin, 03-19-2025, 07:27 AM
      0 responses
      33 views
      0 reactions
      Last Post seqadmin  
      Started by seqadmin, 03-18-2025, 12:50 PM
      0 responses
      25 views
      0 reactions
      Last Post seqadmin  
      Started by seqadmin, 03-03-2025, 01:15 PM
      0 responses
      190 views
      0 reactions
      Last Post seqadmin  
      Working...