Find gene at position from gff or gbk file I have a VCF file with SNPs from a bacterial genome and want to find if the SNPs are located inside genes, is there some CLI-tool where you can pass a VCF file and a gff or gbk file and it returns the name of the genes?
Via BEDOPS:

$ gff2bed &lt; annotations.gff &gt; annotations.bed
$ vcf2bed &lt; snps.vcf &gt; snps.bed
$ bedmap --echo --echo-map-id-uniq snps.bed annotations.bed &gt; answer.bed


This can be reduced to a one-liner if you're using bash:

$ bedmap --echo --echo-map-id-uniq &lt;(vcf2bed &lt; snps.vcf) &lt;(gff2bed &lt; annotations.gff) &gt; answer.bed