text: user10386: Is there a way to generate a BED file of a list of gene symbols for a given genome?
  
  user776: Via Gencode and BEDOPS convert2bed:
  $ 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 gene with exon.
  BEDOPS: https://github.com/bedops/bedops
  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
  
  
  user4413: You could also get your genes from UCSC. Here's how:
  
  
original_text: 10386: <p>Is there a way to generate a BED file of a list of gene symbols for a given genome?</p>
   776: <p>Via Gencode and BEDOPS <code>convert2bed</code>:</p>
  <pre><code><span class="math-container">$ wget -qO- ftp://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_28/gencode.v28.annotation.gff3.gz \
      | gunzip --stdout - \
      | awk '$</span>3 == &quot;gene&quot;' - \
      | convert2bed -i gff - \
      &gt; genes.bed
  </code></pre>
  <p>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.</p>
  <p>You can modify the <code>awk</code> statement to get exons, by replacing <code>gene</code> with <code>exon</code>.</p>
  <p>BEDOPS: <a href="https://github.com/bedops/bedops" rel="nofollow noreferrer">https://github.com/bedops/bedops</a></p>
  <p>Once you have the genes in BED format, you can <code>grep</code> the file for them, using a text file of matches:</p>
  <pre><code>$ grep -Fwf genes_of_interest.txt genes.bed &gt; genes_of_interest.bed
  </code></pre>
   4413: <p>You could also get your genes from <a href="https://genome-euro.ucsc.edu/cgi-bin/hgTables" rel="nofollow noreferrer">UCSC</a>. Here's how:</p>
  <p><a href="https://i.stack.imgur.com/hxe6O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hxe6O.png" alt="enter image description here" /></a></p>
  