text: user12351: I have a 1000 genomes vcf file for chromosome 14. And I want to remove variants in repetitive regions flagged by repeatMasker. I have a bed file for those repeats. I downloaded that file from UCSC. How can I eliminate/remove those sites in vcf file using repeat masker's bed file? Insights will be appreciated.
  
  user776: A couple fast alternatives:
  $ bedops --chrom chr14 -n 1 <(vcf2bed < variants.vcf) <(sort-bed repeats.bed) > answer.bed
  $ bedops --chrom chr14 -n 1 <(vcf2bed < variants.vcf) <(rmsk2bed < repeats.rmsk) > answer.bed
  
  Using --chrom chr14 focuses set operations on that chromosome.
  
original_text: 12351: <p>I have a 1000 genomes vcf file for chromosome 14. And I want to remove variants in repetitive regions flagged by repeatMasker. I have a bed file for those repeats. I downloaded that file from UCSC. How can I eliminate/remove those sites in vcf file using repeat masker's bed file? Insights will be appreciated.</p>
   776: <p>A couple fast alternatives:</p>
  <pre><code><span class="math-container">$ bedops --chrom chr14 -n 1 &lt;(vcf2bed &lt; variants.vcf) &lt;(sort-bed repeats.bed) &gt; answer.bed
  $</span> bedops --chrom chr14 -n 1 &lt;(vcf2bed &lt; variants.vcf) &lt;(rmsk2bed &lt; repeats.rmsk) &gt; answer.bed
  </code></pre>
  <p>Using <code>--chrom chr14</code> focuses set operations on that chromosome.</p>
  