Question: Obtaining transcript names in RSEM
gravatar for deena
9 months ago by
deena10 wrote:


I have performed the abundance estimation using RSEM which outputted the genes.results and isoforms.results. I would like to import the isoforms results into DESeq2 pipeline. I followed the tximport pipleine for RSEM like following but when I checked the rownames, it gave me gene names instead of transcript names 


txi.rsem=tximport(rsem.files, type = "rsem",txOut = T)

Could anyone please guide what mistake I committed.

Thanks in advance.

ADD COMMENTlink modified 9 months ago by Michael Love18k • written 9 months ago by deena10
gravatar for Michael Love
9 months ago by
Michael Love18k
United States
Michael Love18k wrote:

The tximport to DESeq2 pipeline described in the tximport vignette is designed for gene level analysis.

ADD COMMENTlink written 9 months ago by Michael Love18k

Hi Michael,

Thank you very much for your reply. I am working on a non-model organism for which has denovo assembled transcriptome. I use Trinity suite to align and estimate the count data. Trinity suite can estimate counts using RSEM or kallisto depending upon the user's choice. In case of kallisto, it generates abundance.tsv.isoforms and abudance.tsv.genes and in case of RSEM genes.results and isoforms.results. The estimated/expected counts for the isoforms and gene files are almost same except for those transcripts which has isoforms.

So my point is can I make use of this isforms files into tximport pipeline and DESeq2 pipeline for further analysis ? Also after importing the kallisto or RSEM raw counts into DESeq2, is it advisable to rlog them and use for it plot generation? 



ADD REPLYlink written 9 months ago by deena10

You can do whatever you like with the quantifications. Variance stabilization is a good idea for calculating sample distances or ordination plots like PCA or MDS. You can read in the matrix from the isoforms table using base R functions for RSEM, and txOut with tximport.

ADD REPLYlink written 9 months ago by Michael Love18k


I tried importing the RSEM.isoform.results files into R like described in vignette. My RSEM.isoform.result file has columns transcript_id gene_id effective_length expected_count TPM FPKM IsoPct. So when tried to import it got the following code



tximport(rsem_isoform, type = "rsem",txOut = T)

reading in files with read_tsv
1 Error: all(c(geneIdCol, abundanceCol, lengthCol) %in% names(raw)) is not TRUE
When I went through the tximport code, it has written in a such way that  for "rsem" option, the code recognizes the only column "gene_id". So when I deleted the column gene_id and renamed the transcript_id as gene_id it worked.

Am I doing the right thing? I tried tx.Out=T, then also I am getting the same error.




ADD REPLYlink written 9 months ago by deena10

Instead of changing the column names, you should use the tximport arguments: geneIdCol, txIdCol, abundanceCol, countsCol, and lengthCol. If txOut=TRUE, then geneIdCol will be ignored so you can put anything.

We only are currently supporting RSEM's gene-level counts with type="RSEM". It would take more effort to support both, and I didn't have any time to write it so the function does this automatically. The user can always specify the above columns though such that it works. Note that it's simply cbind'ing the columns into matrices for txOut=TRUE, so there's not much to it.

ADD REPLYlink written 9 months ago by Michael Love18k

Hi, I tried using the suggested method by stating the column names..

txi.rsem_isoform <- tximport(files = files_isoform,tx2gene = tx2gene,type = "rsem", txOut = TRUE, geneIdCol = "gene_id", txIdCol = "transcript_id", countsCol = "expected_count", lengthCol = "effective_length", abundanceCol = "TPM")


Still, I also face the same problem as Deena. In fact, I observed that it doesn't even mater which column I name what. The result is always the same.

For example, the command below also resulted in the same results. Which is a bit strange.

txi.rsem_isoform <- tximport(files = files_isoform,tx2gene = tx2gene,type = "rsem", txOut = TRUE, geneIdCol = "expected_count",txIdCol = "transcript_id", countsCol = "gene_id",lengthCol = "effective_length", abundanceCol = "TPM")


ADD REPLYlink written 27 days ago by shreygandhi19900

Can you upgrade to the latest version of Bioconductor and tximport? RSEM txp level support was just added to this release.

ADD REPLYlink written 27 days ago by Michael Love18k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 192 users visited in the last hour