text: user14882: So I know Consensus CDS has the genomic locations of exons, however, only of the exons in the CDS. Everything before or after is not included.
  NIH variation viewer has those (kinda-) radio buttons next to the gene name, and when you hover over them, you do get to see the genomic locations of the exons. But this method isn't very scalable.
  Does anyone know an easy, scalable way of retrieving the genomic locations of exon for a certain gene?
  
  user2388: I'd use biomart on ensembl.org
  
  user776: Perhaps you could use this (assuming hg38) as a lookup table:
  $ wget -qO- https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_39/gencode.v39.annotation.gff3.gz \
      | gunzip -c \
      | grep -wF exon \
      | convert2bed --input=gff --attribute-key="gene_name" - \
      > gencode.v39.exons.bed
  
  If you prefer to search for an Ensembl accession ID, you can remove the --attribute-key="gene_name" option. Otherwise, this puts the HGNC symbol into the ID column.
  The preceding step takes about 30 seconds. Once you have made this lookup file, you can search it for exons of any gene of interest. Using MYC as an example:
  $ awk -v FS="\t" -v OFS="\t" '($5=="MYC")' gencode.v39.exons.bed > answer.bed
  
  You can then further filter that by transcript or other attributes, etc.
  
original_text: 14882: <p>So I know Consensus CDS has the genomic locations of exons, however, only of the exons in the CDS. Everything before or after is not included.</p>
  <p>NIH variation viewer has those (kinda-) radio buttons next to the gene name, and when you hover over them, you do get to see the genomic locations of the exons. But this method isn't very scalable.</p>
  <p>Does anyone know an easy, scalable way of retrieving the genomic locations of exon for a certain gene?</p>
   2388: <p>I'd use biomart on ensembl.org</p>
   776: <p>Perhaps you could use this (assuming <code>hg38</code>) as a lookup table:</p>
  <pre><code>$ wget -qO- https://ftp.ebi.ac.uk/pub/databases/gencode/Gencode_human/release_39/gencode.v39.annotation.gff3.gz \
      | gunzip -c \
      | grep -wF exon \
      | convert2bed --input=gff --attribute-key=&quot;gene_name&quot; - \
      &gt; gencode.v39.exons.bed
  </code></pre>
  <p>If you prefer to search for an Ensembl accession ID, you can remove the <code>--attribute-key=&quot;gene_name&quot;</code> option. Otherwise, this puts the HGNC symbol into the ID column.</p>
  <p>The preceding step takes about 30 seconds. Once you have made this lookup file, you can search it for exons of any gene of interest. Using <code>MYC</code> as an example:</p>
  <pre><code>$ awk -v FS=&quot;\t&quot; -v OFS=&quot;\t&quot; '($5==&quot;MYC&quot;)' gencode.v39.exons.bed &gt; answer.bed
  </code></pre>
  <p>You can then further filter that by transcript or other attributes, etc.</p>
  