Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Seqql
    Junior Member
    • Sep 2014
    • 4

    #1

    Filtering homozygous variants in vcf file with vcftools

    Hi everybody,

    I'm trying to modify a vcf file to keep only homozygous variants.
    I've tried using vcftools, but i can't get the syntax right.

    I thought using the "keep-filtered" option of vcftools should be the right approach. Also I'm trying to find homozygous variants by the "GT 1/1" tag.

    I've tried
    vcftools --keep-filtered GT:1/1 --vcf in.vcf --out out.vcf
    but it kept none.

    edit:
    vcf file looks like this:
    c130956_g1_i1 50 . A C 5.49 . DP=2;RPB=-9.668049e-01;AF1=0.5049;AC1=1;DP4=1,0,1,0;MQ=33;FQ=-10.5;PV4=1,1,1,1 GT:PL: DP:GQ 0/1:34,0,17:2:22
    c130956_g1_i1 62 . T A 49 . DP=3;VDB=5.867524e-02;AF1=1;AC1=2;DP4=0,0,2,1;MQ=30;FQ=-36 GT:PL: DP:GQ 1/1:81,9,0:3:16




    What is the right syntax here?
    Last edited by Seqql; 06-03-2015, 06:08 AM.
  • lindenb
    Senior Member
    • Apr 2010
    • 143

    #2
    --keep-filtered is for the FILTER column

    to answer this, I would use my tool https://github.com/lindenb/jvarkit/wiki/VCFFilterJS


    java -jar dist/vcffilterjs.jar -e 'variant.getGenotype(0).isHomVar()' file.vcf

    Comment

    • Seqql
      Junior Member
      • Sep 2014
      • 4

      #3
      Thank you, this is looknig very promising.

      I got the filtered vcf file, but i've run into a problem.
      I can't load the file into IGV because of the FILTER field, values like "11,30" aren't accepted. Looks like IGV only accepts one number with/out dots ("11.30" is ok).

      Is there any quick fix for this I could apply to the code? If not i may just delete the whole column.

      Comment

      • lindenb
        Senior Member
        • Apr 2010
        • 143

        #4
        11,30 is generated by my program (?) If yes, this is a locale problem:
        try to set the LANG variable


        $ export LANG=en_US.UTF-8
        $ echo $LANG
        en_US.UTF-8




        or/and (?) specify it on the command line:

        java -Duser.language=en -Duser.country=US (...)
        Last edited by lindenb; 06-03-2015, 08:16 AM.

        Comment

        • Seqql
          Junior Member
          • Sep 2014
          • 4

          #5
          Good thought, it worked.
          Thanks for the help

          Comment

          • werno
            Junior Member
            • Sep 2020
            • 1

            #6
            Heterozygous filtering

            Hello everybody,

            can you help me how to filter heterozygous variants in vcf file?

            thank in advance for answer

            with best regards

            werno

            Comment

            Latest Articles

            Collapse

            • SEQadmin2
              Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
              by SEQadmin2



              CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

              Despite this, “CRISPR helped turn genome editing from a specialized technique into
              ...
              Yesterday, 11:01 AM
            • SEQadmin2
              Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
              by SEQadmin2


              Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

              The systematic characterization of the human proteome has
              ...
              07-20-2026, 11:48 AM
            • SEQadmin2
              Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
              by SEQadmin2



              Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
              ...
              07-09-2026, 11:10 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, Yesterday, 02:55 AM
            0 responses
            8 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-24-2026, 12:17 PM
            0 responses
            12 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-23-2026, 11:41 AM
            0 responses
            12 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-20-2026, 11:10 AM
            0 responses
            24 views
            0 reactions
            Last Post SEQadmin2  
            Working...