Is there a way to generate a BED file of a list of gene symbols for a given genome?
Via Gencode and BEDOPS
$ wget -qO- ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_28/gencode.v28.annotation.gff3.gz \ | gunzip --stdout - \ | awk '$3 == "gene"' - \ | convert2bed -i gff - \ > genes.bed
Replace the FTP path with that needed for your genome of interest. Feel free to edit your question if you need help with that, by specifying your given genome.
You can modify the
awk statement to get exons, by replacing
Once you have the genes in BED format, you can
grep the file for them, using a text file of matches:
$ grep -Fwf genes_of_interest.txt genes.bed > genes_of_interest.bed
You could also get your genes from UCSC. Here's how: