tx2gene file for tximport issue I am trying to use tximport to get raw count matrices of a bulk RNA-seq sequencing experiment. I followed the tutorial:

https://bioconductor.org/packages/3.7/bioc/vignettes/tximport/inst/doc/tximport.html

Where they generate tx2gene in the following way:

library(TxDb.Hsapiens.UCSC.hg19.knownGene)
txdb &lt;- TxDb.Hsapiens.UCSC.hg19.knownGene
k &lt;- keys(txdb, keytype = "TXNAME")
tx2gene &lt;- select(txdb, k, "GENEID", "TXNAME")


So, I reasoned to do it the same way. But since my data is mouse one, I used a different gene annotation file:

library(TxDb.Mmusculus.UCSC.mm10.knownGene)
txdb &lt;- TxDb.Mmusculus.UCSC.mm10.knownGene
k &lt;- keys(txdb, keytype = "TXNAME")
tx2gene &lt;- select(txdb, k, "GENEID", "TXNAME")


The transcript annotation file that I used when running salmon is gencode.vM13.transcripts.fa.sidx. Then when I try getting txi object:

txi &lt;- tximport(files, type = "salmon", tx2gene = tx2gene)


It raises the error:



Seems like I am creating tx2gene in the wrong way. Maybe I need to use a different library, not TxDb.Mmusculus.UCSC.mm10.knownGene. Any suggestions would be greatly appreciated.


  Update


I looked into the quant.sf files that I got from salmon and it looked the following way:



A colleague adviced me to strip away everything that follows the dot in the Name column, so it started to look:



However, still no luck. The identifiers in the k &lt;- keys(txdb, keytype = "TXNAME") look like that:

"uc007afg.1" "uc007afh.1" "uc007afi.2" "uc011wht.1" "uc011whu.1" 
"uc057aty.1"


I suppose I need to convert these identifiers first to ENS-like ones, but do not know how to.
The solution was to use a different library as I expected. It should be library(TxDb.Hsapiens.UCSC.hg19.ensGene). And also, as specified in the question, to remove everything after the dot in the Name column of the quant.sf files.