This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to filter .vcf based on .gbk file to remove SNP calls in non-CDS regions?

I have a VCF file with multiple individuals mapped to a reference. What I would like to do is filter the VCF file so it only includes SNPs from CDS regions. I have a genbank (.gbk) from NCBI for the reference which includes CDS regions. Is there a simple way to do this? I can't seem to find any resources related to this type of filtering.

Additionally, once this filtering is complete I would like to filter synonymous SNPs from the vcf, so I am left with only non-synonymous SNPs in coding regions for my final VCF file.

snp genome

1 answer

convert genbank to to a snpEff database: http://snpeff.sourceforge.net/SnpEff_manual.html#databases

annotate the vcf with snpEff

filter with snpSift

Log in to answer this question.