text: user12351: I need to mask all sites in a vcf file flagged by the 1000 Genomes Project as being unfit for population genetic analyses. The sites for all chromosomes are available at:
  1000Genomes masked sites
  From above mentioned link you can get both bed files and Fasta files.
  I wanted to mask all sites using VCFtools but VCFtools is not longer being updated and therefore, can't me used on the my vcf file because you can only VCFtools upto VCF file format v.2. And file format for my file is v.3. Can someone suggest another tool that I can use. Insights will be appreciated.
  
  user12502: If you are familiar with Python, check out the pyvcf.VcfFrame.filter_bed() method I wrote:
  from fuc import pyvcf
  vf = pyvcf.VcfFrame.from_file('your_vcf.vcf')
  filtered_vf = vf.filter_bed('your_bed.bed', opposite=True)
  filtered_vf.to_file('filtered.vcf')
  
  
  user1152: I've tried many ways to do this with bcftools but don't think it's possible to exclude a bed file. What you want is
  bedtools intersect -v -a sample.vcf -b mask.bed -wa -header
  The -v option gives you only the parts of file a that are not in file b. -wa only keeps entries from file a, and -header preserves the header from file a.
  
original_text: 12351: <p>I need to mask all sites in a vcf file flagged by the 1000 Genomes Project as being unfit for population genetic analyses. The sites for all chromosomes are available at:</p>
  <p><a href="http://ftp.1000genomes.ebi.ac.uk/vol1/ftp/data_collections/1000_genomes_project/working/20160622_genome_mask_GRCh38/PilotMask/" rel="nofollow noreferrer">1000Genomes masked sites</a></p>
  <p>From above mentioned link you can get both bed files and Fasta files.</p>
  <p>I wanted to mask all sites using VCFtools but VCFtools is not longer being updated and therefore, can't me used on the my vcf file because you can only VCFtools upto VCF file format v.2. And file format for my file is v.3. Can someone suggest another tool that I can use. Insights will be appreciated.</p>
   12502: <p>If you are familiar with Python, check out the <code>pyvcf.VcfFrame.filter_bed()</code> <a href="https://sbslee-fuc.readthedocs.io/en/latest/api.html#fuc.api.pyvcf.VcfFrame.filter_bed" rel="nofollow noreferrer">method</a> I wrote:</p>
  <pre><code>from fuc import pyvcf
  vf = pyvcf.VcfFrame.from_file('your_vcf.vcf')
  filtered_vf = vf.filter_bed('your_bed.bed', opposite=True)
  filtered_vf.to_file('filtered.vcf')
  </code></pre>
   1152: <p>I've tried many ways to do this with bcftools but don't think it's possible to exclude a bed file. What you want is</p>
  <p><code>bedtools intersect -v -a sample.vcf -b mask.bed -wa -header</code></p>
  <p>The <code>-v</code> option gives you only the parts of file a that are <em>not</em> in file b. <code>-wa</code> only keeps entries from file a, and <code>-header</code> preserves the header from file a.</p>
  