This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to subset the mutations that occur just in my interest genes within the vcf file?

Hi all,

I have a vcf file that I perform the BED file by vcftools to subset the mutations in my interest genes. I have downloaded the BED file from the UCSC (selecting the BED file for the whole gene of my gene list). However, after performing the vcftools, I have found some mutations in genes that weren't in my gene list. How to subset the mutations that occur just in my interest genes?

Thanks for any help.

vcf vcftools bed

1 answer

Extract Sub-Set Of Regions From Vcf File

Use tabix, http://www.htslib.org/doc/tabix.html, and see its -R option to only retrieve VCF entries that overlap the BED file you provide for that argument. That would need to be a BED file with the coordinates you are interested in, e.g. the entire gene interval, or its exons. You could get the coordinates directly from a reference GTF file.

Log in to answer this question.