3

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.

lizaveta
  • 203
  • 1
  • 3

1 Answers1

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).

gringer
  • 14,012
  • 5
  • 23
  • 79