Answers.Body: <p>Find the location of the gene of interest and then filter the vcf for that location using vcftools, bcftools, plink, or some other software. There is a lot of good documentation available online for these tools.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-27T18:04:24.883Z
Answers.LastActivityDate: 2024-03-27T18:04:24.883Z
Answers.UserDisplayName: Sarah
Answers.Body: <p>As mentioned, there are many options to go (eg. vcftools and bcftools). The Broad Institute provides a valuable toolset (GATK) for this very purpose and extended procedures for various variant selection tasks.</p>
  <p>SelectVariants function can be good for this purpose, though the location of a gene of interest should be addressed:
  <a href="https://gatk.broadinstitute.org/hc/en-us/articles/13832694334235-SelectVariants" rel="nofollow noreferrer">https://gatk.broadinstitute.org/hc/en-us/articles/13832694334235-SelectVariants</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-28T21:55:01.117Z
Answers.LastActivityDate: 2024-03-28T21:55:01.117Z
Answers.UserDisplayName: 44Pasha
Body: <p><a href="https://www.biostars.org/p/9589317/" rel="nofollow noreferrer">Also posted on biostars</a></p>
  <p>I would like to extract all the mutations in a single gene of interest from the VCF file. For example I would like to extract all the mutations in the NFKB1 gene from the whole genome VCF file.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-03-06T22:24:19.120Z
Comments.Text: What have you tried? `bcftools view` has an option to extract by coordinates or by annotation if your VCF had the gene annotation. If you used custom annotation tools, they may have their own filtering utilities.
Comments.UserDisplayName: Ram RS
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-03-06T23:52:59.220Z
Comments.Text: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Comments.UserDisplayName: Community
Tags: <vcf>
Title: How to extract mutations in a particular gene from the VCF file of whole genome
ThreadText: # How to extract mutations in a particular gene from the VCF file of whole genome
  
  (Asked by: username_0 on 2024-03-06)
  
  [Also posted on biostars](https://www.biostars.org/p/9589317/)
  
  I would like to extract all the mutations in a single gene of interest from the VCF file. For example I would like to extract all the mutations in the NFKB1 gene from the whole genome VCF file.
  
  **Tags:** vcf
  
  > **Comments:**
  > **username_1**: What have you tried? `bcftools view` has an option to extract by coordinates or by annotation if your VCF had the gene annotation. If you used custom annotation tools, they may have their own filtering utilities.  
  > **username_2**: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2024-03-27. Score: 2
  
  Find the location of the gene of interest and then filter the vcf for that location using vcftools, bcftools, plink, or some other software. There is a lot of good documentation available online for these tools.
  
  
  ---
  
  ### Answer by username_4 on 2024-03-28. Score: 1
  
  As mentioned, there are many options to go (eg. vcftools and bcftools). The Broad Institute provides a valuable toolset (GATK) for this very purpose and extended procedures for various variant selection tasks.
  
  SelectVariants function can be good for this purpose, though the location of a gene of interest should be addressed:
  <https://gatk.broadinstitute.org/hc/en-us/articles/13832694334235-SelectVariants>
  
  
  ---
  
  