text: user96: I am using bedtools to test whether a set of variant calls produced by a new method is missing any variants from a set of known validated variants.
  bedtools intersect -v -a newcalls.vcf -b goldstandard.vcf
  
  It's working as intended for SNV calls, but it occasionally misses indels due to a single base pair discrepancy. It's usually an alignment artifact that doesn't affect the interpretation of the variant.
  My first thought was to make a BED file with intervals that extend a few bp beyond each variant call, and comparing this BED file to the known variants. However, I was wondering whether approximate matching is possible with bedtools intersect?
  
  user964: You can use bedtools intersect but first use bcftools norm.  bcftools norm will left-align and normalize indels to get both vcf files consistent with each other.  This should resolve the matching if they are truly matching variants.
  
original_text: 96: <p>I am using <code>bedtools</code> to test whether a set of variant calls produced by a new method is missing any variants from a set of known validated variants.</p>
  
  <pre><code>bedtools intersect -v -a newcalls.vcf -b goldstandard.vcf
  </code></pre>
  
  <p>It's working as intended for SNV calls, but it occasionally misses indels due to a single base pair discrepancy. It's usually an alignment artifact that doesn't affect the interpretation of the variant.</p>
  
  <p>My first thought was to make a BED file with intervals that extend a few bp beyond each variant call, and comparing <em>this</em> BED file to the known variants. However, I was wondering whether approximate matching is possible with <code>bedtools intersect</code>?</p>
   964: <p>You can use <code>bedtools intersect</code> but first use <code>bcftools norm</code>.  <a href="http://www.htslib.org/doc/bcftools.html#norm" rel="nofollow noreferrer">bcftools norm</a> will left-align and normalize indels to get both vcf files consistent with each other.  This should resolve the matching if they are truly matching variants.</p>
  