0
$\begingroup$

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 <- TxDb.Hsapiens.UCSC.hg19.knownGene
k <- keys(txdb, keytype = "TXNAME")
tx2gene <- 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 <- TxDb.Mmusculus.UCSC.mm10.knownGene
k <- keys(txdb, keytype = "TXNAME")
tx2gene <- 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 <- tximport(files, type = "salmon", tx2gene = tx2gene)

It raises the error:

enter image description here

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:

enter image description here

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

enter image description here

However, still no luck. The identifiers in the k <- 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.

$\endgroup$
2
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

Do your ids in the expression file (from gencode) match up with the gene IDs in the transcript file (from UCSC?) I'm willing to bet that they don't. Stay consistent throughout your process. Either pull down the gencode transcript to gene translations, or do your pseudoalignments to UCSC transcripts.

$\endgroup$
  • $\begingroup$ I already got the salmon aligned data, that was aligned to the gencode file. Now I do not know what TxDb library file I need to use. $\endgroup$ – Nikita Vlasenko Apr 10 '18 at 21:56
  • $\begingroup$ see answer here $\endgroup$ – heathobrien Apr 11 '18 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.