Answers.Body: <p>If you want to filter a VCF file, you might want to give <strong>VCFtools</strong> a try.</p>
  
  <p>Here is the documentation : <a href="http://vcftools.sourceforge.net/man_latest.html" rel="nofollow noreferrer">VCFtools Manual</a></p>
  
  <p>I am not a specialist of this tool but you could do as the following. First build a bedfile with the chromosome names and positions of your genes (start and stop) such as this :</p>
  
  <pre><code>chr   start   stop   (name)   (score)   (strand)
  </code></pre>
  
  <p>Then it should work with this command line :</p>
  
  <pre><code>vcftools --vcf file.vcf --bed positions.bed --out filtered.vcf
  </code></pre>
  
  <p>The output will be a VCF filtered on the provided regions</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-06T16:08:21.030Z
Answers.Text: thanks, I will try that!
Answers.UserDisplayName: user6720
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-06T09:59:52.677Z
Answers.LastActivityDate: 2020-01-06T09:59:52.677Z
Answers.UserDisplayName: Paul Endymion
Body: <p>I have a <code>.vcf</code> file generated using <code>samtools</code>. I want to know mutations in specific genes by comparing <code>.vcf</code> files with a reference genome. I cannot use the Ensembl VEP tool as my reference genome is not listed there. Can you please help?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-06T09:58:52.010Z
Comments.Text: Using SnpEff (http://snpeff.sourceforge.net/SnpEff_manual.html#databases) you can build custom annotation databases using the gff or gtf file. VEP also offers similar functionality https://asia.ensembl.org/info/docs/tools/vep/script/vep_custom.html.
Comments.UserDisplayName: arup
Tags: <vcf>
Title: bedtool intersect to compare .vcf file to reference genome
ThreadText: # bedtool intersect to compare .vcf file to reference genome
  
  (Asked by: username_0 on 2020-01-06)
  
  I have a `.vcf` file generated using `samtools`. I want to know mutations in specific genes by comparing `.vcf` files with a reference genome. I cannot use the Ensembl VEP tool as my reference genome is not listed there. Can you please help?
  
  **Tags:** vcf
  
  > **Comments:**
  > **username_1**: Using SnpEff (http://snpeff.sourceforge.net/SnpEff_manual.html#databases) you can build custom annotation databases using the gff or gtf file. VEP also offers similar functionality https://asia.ensembl.org/info/docs/tools/vep/script/vep_custom.html.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-01-06. Score: 1
  
  If you want to filter a VCF file, you might want to give **VCFtools** a try.
  
  Here is the documentation : [VCFtools Manual](http://vcftools.sourceforge.net/man_latest.html)
  
  I am not a specialist of this tool but you could do as the following. First build a bedfile with the chromosome names and positions of your genes (start and stop) such as this :
  
  ```
  chr   start   stop   (name)   (score)   (strand)
  
  ```
  
  Then it should work with this command line :
  
  ```
  vcftools --vcf file.vcf --bed positions.bed --out filtered.vcf
  
  ```
  
  The output will be a VCF filtered on the provided regions
  
  > **Comments:**
  > **username_0**: thanks, I will try that!  
  
  ---
  
  