<p><em>Answer from @devon-ryan, converted from comment:</em></p>
<p>Try a UCSC gene ID instead. For those genes they'd be: <code>uc001zni.3</code> (INO80), <code>uc002vaz.4</code> (INO80D), <code>uc004eup.4</code> or <code>uc004eun.4</code> (SMARCA1) and <code>uc001coj.2</code>, <code>uc010olq.2</code>, <code>uc010olr.2</code>, <code>uc001coi.2</code> or <code>uc001col.2</code> (NASP). You might have to omit the versions (the <code>.4</code> part, for example).</p>

CC BY-SA 4.0
2021-07-04T04:21:12.437Z
2021-07-04T04:21:12.437Z
gringer
<p>I want to get coordinates of human genes from my list (consisting of hgnc genes id) using GenomicFeatures and TxDb.Hsapiens.UCSC.hg19.knownGene R packages from Bioconductor.</p>

<pre><code>library(TxDb.Hsapiens.UCSC.hg19.knownGene)
txdb=(TxDb.Hsapiens.UCSC.hg19.knownGene)

my_genes = c("INO80","NASP","INO80D","SMARCA1")

select(txdb, keys = my_genes,
   columns=c("TXCHROM","TXSTART","TXEND","TXSTRAND"), 
   keytype="GENEID")
</code></pre>

<p>However, it doesn't' work because txdb doesn't take hgnc identifiers; how can it be solved? I couldn't find any appropriate keytype that will support hgnc and not sure how to match hgnc id I have and GENEID from txdb.</p>

<r><bioconductor><sequence-annotation>
Get genomic coordinates using GenomicFeatures by HGNC gene names
# Get genomic coordinates using GenomicFeatures by HGNC gene names

(Asked by: username_0 on 2018-09-07)

I want to get coordinates of human genes from my list (consisting of hgnc genes id) using GenomicFeatures and TxDb.Hsapiens.UCSC.hg19.knownGene R packages from Bioconductor.
library(TxDb.Hsapiens.UCSC.hg19.knownGene)
txdb=(TxDb.Hsapiens.UCSC.hg19.knownGene)

my_genes = c("INO80","NASP","INO80D","SMARCA1")

select(txdb, keys = my_genes,
   columns=c("TXCHROM","TXSTART","TXEND","TXSTRAND"), 
   keytype="GENEID")

However, it doesn't' work because txdb doesn't take hgnc identifiers; how can it be solved? I couldn't find any appropriate keytype that will support hgnc and not sure how to match hgnc id I have and GENEID from txdb.

**Tags:** r, bioconductor, sequence-annotation

---

## 1 answers

### Answer by username_1 on 2021-07-04. Score: 0

*Answer from @devon-ryan, converted from comment:*

Try a UCSC gene ID instead. For those genes they'd be: `uc001zni.3` (INO80), `uc002vaz.4` (INO80D), `uc004eup.4` or `uc004eun.4` (SMARCA1) and `uc001coj.2`, `uc010olq.2`, `uc010olr.2`, `uc001coi.2` or `uc001col.2` (NASP). You might have to omit the versions (the `.4` part, for example).


---

