I am trying to get gene IDs (and eventually entrez gene IDs) for the list of known genes in the TxDb.Mmusculus.UCSC.mm10.knownGene database. My ultimate goal is to get the 5'UTR regions for all known protein-coding mouse genes, which I have attempted to do using an external list of about 24,000 genes, but this returned an error of "subscript contains invalid names" when following the Genomic Ranges vignette.
Therefore, I would like to look "within" TxDb.Mmusculus.UCSC.mm10.knownGene to see what genes I can work with (I am assuming it less than 24,000 due to my error).
Here is the code that was generating the error:
txdb <- TxDb.Mmusculus.UCSC.mm10.knownGene txbygene <- transcriptsBy(txdb, "gene")[entrez_list_all]