<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>

CC BY-SA 4.0
2024-03-27T18:04:24.883Z
2024-03-27T18:04:24.883Z
Sarah
<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>

CC BY-SA 4.0
2024-03-28T21:55:01.117Z
2024-03-28T21:55:01.117Z
44Pasha
<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>

CC BY-SA 4.0
2024-03-06T22:24:19.120Z
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.
Ram RS
CC BY-SA 4.0
2024-03-06T23:52:59.220Z
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.
Community
<vcf>
How to extract mutations in a particular gene from the VCF file of whole genome
# 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>


---

