Question: Salmon tximport get TPM
gravatar for bharata1803
7 months ago by
bharata1803450 wrote:


In Salmon result, there is a TPM column but it is from transcript level. I want to use tximport library to get TPM values for gene level.

per_gene <- tximport(salmon_file_list, type = "salmon", tx2gene = trs2gene)

I use that code and I get this:

[1] "abundance"           "counts"              "length"              "countsFromAbundance"

There are no TPM but I read there is a parameter countsFromAbundance with scaledTPM and lengthScaledTPM.

Is this parameter can be used to get TPM? Which values (scaledTPM or lengthScaledTPM) are better if I want to compare TPM accross different experiment (i.e independent RNA-seq experiment but same cll type)? How can I get this from the result? is per_gene["countsFromAbundance"] store the values?

Thank you

rna-seq salmon • 561 views
ADD COMMENTlink written 7 months ago by bharata1803450

I see. Thank you for your feedback. I will use rlog or VST because I usually use that. I totally forget about it and just think maybe I can use TPM directly.

ADD REPLYlink written 7 months ago by bharata1803450
gravatar for ATpoint
7 months ago by
ATpoint31k wrote:

None of it. TPM is not a robust measure for inter-sample comparison and was never developed to be one. You better compare normalized counts you get from e.g. DESeq2, edgeR etc or use data transformations such as vst or rlog. Please use the search function as this was discussed many times before. If you insist on TPM, aggregate counts to the gene level with tximport and then calculate TPM with the gene length information produced by tximport as described

ADD COMMENTlink written 7 months ago by ATpoint31k
gravatar for kristoffer.vittingseerup
7 months ago by
European Union
kristoffer.vittingseerup3.0k wrote:

Appart from agreeing with ATpoint about needing inter-library normalisation (read more about that here) I just want to point out that the TPM values are stored in the "abundance" entry of the "per_gene" list. With regards to countsFromAbundance that is recommended but the exact way to do it depends a bit on what you want to use the counts for - I'd recomend "scaledTPM" as they are the most universally usable but you can read figure 1 of this article.

ADD COMMENTlink modified 7 months ago • written 7 months ago by kristoffer.vittingseerup3.0k
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.3.0
Traffic: 1099 users visited in the last hour