Answers.Body: <p>The tool that you want to use for this task is <code>bedtools window</code>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-25T17:23:19.423Z
Answers.LastActivityDate: 2018-11-25T17:23:19.423Z
Answers.UserDisplayName: RosieF
Body: <p>I know that I can use <code>bcftools isec</code> to compare two VCF files containing single nucleotide variants (SNVs); it will generate four possible output files: one with all of the unique called SNVs in file 1, one with all of the unique called SNVs in file 2, one with all of the SNVs from file 1 that were also found in file 2, and finally one with all of the SNVs from file 2 that were also found in file 1.  </p>
  
  <p>Is there a similar type of tool that will allow one to compare structural variants (SVs) between two VCF files?  I am about to tweak one of my Perl scripts (that currently uses the VCF.pm Perl module to parse VCF files) to perform this calculation (because thus far I have not found any tools designed for SVs) but I thought I would ask in this forum in case anyone else has already invented this wheel.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-25T14:11:28.840Z
Comments.Text: It looks like no one has answered yet.  Maybe others would find it easier to help you out if you provided a minimal example of the VCF files that you are trying to compare?
Comments.UserDisplayName: winni2k
Tags: <vcf><ngs><software-recommendation>
Title: Best practices for deciding if two structural variants are actually the same variant?
ThreadText: # Best practices for deciding if two structural variants are actually the same variant?
  
  (Asked by: username_0 on 2018-07-29)
  
  I know that I can use `bcftools isec` to compare two VCF files containing single nucleotide variants (SNVs); it will generate four possible output files: one with all of the unique called SNVs in file 1, one with all of the unique called SNVs in file 2, one with all of the SNVs from file 1 that were also found in file 2, and finally one with all of the SNVs from file 2 that were also found in file 1.
  
  Is there a similar type of tool that will allow one to compare structural variants (SVs) between two VCF files? I am about to tweak one of my Perl scripts (that currently uses the VCF.pm Perl module to parse VCF files) to perform this calculation (because thus far I have not found any tools designed for SVs) but I thought I would ask in this forum in case anyone else has already invented this wheel.
  
  **Tags:** vcf, ngs, software-recommendation
  
  > **Comments:**
  > **username_1**: It looks like no one has answered yet.  Maybe others would find it easier to help you out if you provided a minimal example of the VCF files that you are trying to compare?  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-11-25. Score: 1 | Accepted answer
  
  The tool that you want to use for this task is `bedtools window`.
  
  
  ---
  
  