Seqanswers Leaderboard Ad

Collapse

Announcement

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

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

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


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


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


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

          Comment


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

            • seqadmin
              Addressing Off-Target Effects in CRISPR Technologies
              by seqadmin






              The first FDA-approved CRISPR-based therapy marked the transition of therapeutic gene editing from a dream to reality1. CRISPR technologies have streamlined gene editing, and CRISPR screens have become an important approach for identifying genes involved in disease processes2. This technique introduces targeted mutations across numerous genes, enabling large-scale identification of gene functions, interactions, and pathways3. Identifying the full range...
              08-27-2024, 04:44 AM
            • seqadmin
              Selecting and Optimizing mRNA Library Preparations
              by seqadmin



              Sequencing mRNA provides a snapshot of cellular activity, allowing researchers to study the dynamics of cellular processes, compare gene expression across different tissue types, and gain insights into the mechanisms of complex diseases. “mRNA’s central role in the dogma of molecular biology makes it a logical and relevant focus for transcriptomic studies,” stated Sebastian Aguilar Pierlé, Ph.D., Application Development Lead at Inorevia. “One of the major hurdles for...
              08-07-2024, 12:11 PM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by seqadmin, 08-27-2024, 04:40 AM
            0 responses
            16 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 08-22-2024, 05:00 AM
            0 responses
            293 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 08-21-2024, 10:49 AM
            0 responses
            135 views
            0 likes
            Last Post seqadmin  
            Started by seqadmin, 08-19-2024, 05:12 AM
            0 responses
            124 views
            0 likes
            Last Post seqadmin  
            Working...
            X