Menu

#46 Filtering a VCF with a BED file

v1.0_(example)
closed
1
2013-12-16
2013-12-12
No

Hello,

A well formet bed file is in format +0 and +1 for the start and the end.
It seems that VCFtools considers a bed file to be in +1 and +0 format.
This is wrong and should be corrected...

Example
VCF have position (format +1)
chr 1 pos 10
chr 1 pos 21
BED have position (format +0, +1)
1 10 20
1 22 30

When using VCFtools to remove all variations not in the regions, VCFtools keep the 2 variations.

Discussion

  • Anthony Marcketta

    Hello Yannick,

    I cannot replicate your error. Are you using the latest release of vcftools, version 0.1.11? Another possible issue could be that the sites in your vcf file are indels. If your sites span multiple bases, vcftools will include all possible positions of that site and check if they are within the BED file ranges. Could you produce sample files for me that this error occurs on?

     

    Last edit: Anthony Marcketta 2013-12-13
    • Yannick Renaud

      Yannick Renaud - 2013-12-13

      You seem to be right.
      It is because of indels...
      I am just used to tools like GATK or bedtools that only looks at the first
      position.

      Sorry for the inconvinience.

      Yannick

      On Fri, Dec 13, 2013 at 10:42 AM, Anthony Marcketta
      amarcket@users.sf.netwrote:

      Hello Yannick,

      I cannot seem to replicate your error. Are you using the latest release of
      vcftools, version 0.1.11? Another possible issue could be that the sites in
      your vcf file are indels. If your sites span multiple bases, vcftools will
      include all possible positions of that site and check if they are within
      the BED file ranges. Could you produce sample files for me that this error
      occurs on?


      Status: open
      Labels: BED filtering
      Created: Thu Dec 12, 2013 10:44 PM UTC by Yannick Renaud
      Last Updated: Thu Dec 12, 2013 10:44 PM UTC
      Owner: Adam Auton

      Hello,

      A well formet bed file is in format +0 and +1 for the start and the end.
      It seems that VCFtools considers a bed file to be in +1 and +0 format.
      This is wrong and should be corrected...

      Example
      VCF have position (format +1)
      chr 1 pos 10
      chr 1 pos 21
      BED have position (format +0, +1)
      1 10 20
      1 22 30

      When using VCFtools to remove all variations not in the regions, VCFtools
      keep the 2 variations.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/vcftools/bugs/46/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Adam Auton

    Adam Auton - 2013-12-16
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB