<p>Neither CPM nor TPM are well suited here, because neither performs robust cross-sample normalisation (see the blog post Devon linked to).</p>

<p>DESeq2 provides two robust log-space normalisation methods for downstream analysis, the <em>regularised log</em> (<code>rlog</code>), and the <em>variance stabilising transformation</em> (<code>vst</code>). The <a href="http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#data-transformations-and-visualization" rel="nofollow noreferrer">DESeq2 vignette explains how to use these</a> for things like hclust.</p>

<hr>

<p>On a more general note, CPM does not account for transcript length differences, while TPM does. If the choice is between TPM and CPM I would therefore use TPM. However, if you are only comparing the same transcripts across experiments, the transcript length is actually invariant so it doesn’t matter (but CPM is still not a good cross-experiment normalisation).</p>

CC BY-SA 3.0
2017-08-15T12:25:36.743Z
I am confused now , so what is the use of TPM, why does one produce it and when or where do you use it? , in other words which tools, analysis in RNA seq would you use TPM if everything revolves around using counts and pushing it through DESeq2
novicebioinforesearcher
CC BY-SA 3.0
2017-08-15T12:29:34.003Z
Tools produce TPMs because they don’t have the information (= the other samples) necessary to perform cross-sample normalisation. Lacking that, TPM is the best they can do. TPM is also useful for *within-sample* comparisons: It can give you an accurate estimate of how much genes are expressed in a given sample relative to each other.
Konrad Rudolph
CC BY-SA 3.0
2017-08-15T12:40:23.293Z
Plz Correct me if am wrong here, given an experimental design different cell types from a normal mouse say 4 cell types (3 replicates each), sequenced using same library prep but may be at different times. Aim would be to check for set of cell type specific transcripts you would use TPM where as if you want to add a significance parameter (need a pvalue) one would use raw counts based analysis?  I guess the confusion for me is when we use the word  "expression" . People use TPM and call it expression, also use raw counts and call it expression
novicebioinforesearcher
CC BY-SA 3.0
2017-08-15T13:24:54.507Z
Both are estimates for expression, given the data. Your use-case sounds reasonable although I would generally prefer to determine “cell type specific transcripts” by comparing different cell types, rather than based solely on a single sample. Which would imply performing differential expression analysis.
Konrad Rudolph
CC BY-SA 3.0
2017-08-15T15:08:49.240Z
`Which would imply performing differential expression analysis` on?
novicebioinforesearcher
CC BY-SA 3.0
2017-08-15T17:12:21.763Z
@novicebioinforesearcher On whatever data sets you wish to compare. It rarely (if ever!) makes sense to describe a gene as being cell type specific without saying “as opposed to these other cell types”. For example, a cell type specific gene may nevertheless be lowly expressed: as long as it’s *entirely absent* in other cells, it’s cell type specific. This is in fact often the case. You therefore *cannot* characterise many cell type specific genes without comparing different cell types.
Konrad Rudolph
CC BY-SA 4.0
2018-10-05T10:15:39.140Z
Is VST/RLOG normalised for transcript length? If not is it possible to get length normalised VST/RLOG?
mindlessgreen
CC BY-SA 4.0
2018-10-05T12:25:00.157Z
@rmf No, they do not normalise for transcript length; both functions merely change the *distribution* shape of the counts into something closer to linear. For those purposes where you’d use rlog/vst, accounting for transcript length, is normally not important. You could however apply further transformation (let’s call it rlog-TMP), if you have an application where you need cross-sample as well as within-sample normalised values.
Konrad Rudolph
CC BY-SA 4.0
2018-10-05T16:58:30.090Z
Would you say it's ok to do something like `(vst/length)*(10^6)` and use that for heatmaps where I actually want to compare expression of one gene to another gene.
mindlessgreen
CC BY-SA 4.0
2018-10-05T18:04:34.850Z
@rmf Yes but in a heatmap you usually scale by (gene) row anyway (either explicitly or the plotting function performs the division internally) so the normalisation per transcript length will be strictly a no-op.
Konrad Rudolph
CC BY-SA 3.0
2017-08-15T09:45:02.523Z
2017-08-15T09:45:02.523Z
Konrad Rudolph
<p>You can find the various equations in <a href="https://haroldpimentel.wordpress.com/2014/05/08/what-the-fpkm-a-review-rna-seq-expression-units/" rel="nofollow noreferrer">this oft-cited blog post from Harold Pimentel</a>. CPM is basically depth-normalized counts, whereas TPM is length-normalized (and then normalized by the length-normalized values of the other genes).</p>
<p>If one has to choose between those two choices one typically chooses TPM for most things, since generally the length normalization is handy. Realistically, you probably want <code>log(TPM)</code> since otherwise noise in your most highly expressed genes dominates over small expression signals.</p>

CC BY-SA 3.0
2017-08-14T21:40:50.403Z
in a given case if one would trim adapters from paired end sequenced rna seq data, this would result in different read length, as you say above `TPM is length normalized` does it mean that this difference in read length is taken into consideration?
novicebioinforesearcher
CC BY-SA 3.0
2017-08-15T07:04:26.150Z
@novicebioinforesearcher No, transcript/gene length, which correlates (somewhat) with counts and therefore will tend to drive clustering unless handled in a reasonable way.
Devon Ryan
CC BY-SA 3.0
2017-08-17T14:35:17.313Z
Rob Patro also wrote a pretty good article about the topic as well: http://robpatro.com/blog/?p=235
story
CC BY-SA 4.0
2022-06-21T04:27:45.583Z
[link] (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8220791/)
envs_h_gang_5
CC BY-SA 4.0
2017-08-14T21:15:27.507Z
2021-01-06T08:22:48.657Z
2021-01-06T08:22:48.657Z
Devon Ryan
<p>What the difference between TPM and CPM when dealing with RNA seq data?</p>

<p>What metrics would you use if you have to perform some down stream analysis other than Differential expression for eg. </p>

<p>Clustering analysis using Hclust function and then plotting heat map to find differences in terms of expression levels, correlation and pca</p>

<p>Is it wrong to use TPM for such analysis, if yes then when does one use TPM versus CPM. </p>

<rna-seq>
Difference between CPM and TPM and which one for downstream analysis?
# Difference between CPM and TPM and which one for downstream analysis?

(Asked by: username_0 on 2017-08-14)

What the difference between TPM and CPM when dealing with RNA seq data?

What metrics would you use if you have to perform some down stream analysis other than Differential expression for eg.

Clustering analysis using Hclust function and then plotting heat map to find differences in terms of expression levels, correlation and pca

Is it wrong to use TPM for such analysis, if yes then when does one use TPM versus CPM.

**Tags:** rna-seq

---

## 2 answers

### Answer by username_3 on 2017-08-14. Score: 13 | Accepted answer

You can find the various equations in [this oft-cited blog post from Harold Pimentel](https://haroldpimentel.wordpress.com/2014/05/08/what-the-fpkm-a-review-rna-seq-expression-units/). CPM is basically depth-normalized counts, whereas TPM is length-normalized (and then normalized by the length-normalized values of the other genes).

If one has to choose between those two choices one typically chooses TPM for most things, since generally the length normalization is handy. Realistically, you probably want `log(TPM)` since otherwise noise in your most highly expressed genes dominates over small expression signals.

> **Comments:**
> **username_0**: in a given case if one would trim adapters from paired end sequenced rna seq data, this would result in different read length, as you say above `TPM is length normalized` does it mean that this difference in read length is taken into consideration?  
> **username_3**: @novicebioinforesearcher No, transcript/gene length, which correlates (somewhat) with counts and therefore will tend to drive clustering unless handled in a reasonable way.  
> **username_4**: Rob Patro also wrote a pretty good article about the topic as well: http://robpatro.com/blog/?p=235  
> **username_5**: [link] (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8220791/)  

---

### Answer by username_1 on 2017-08-15. Score: 3

Neither CPM nor TPM are well suited here, because neither performs robust cross-sample normalisation (see the blog post Devon linked to).

DESeq2 provides two robust log-space normalisation methods for downstream analysis, the *regularised log* (`rlog`), and the *variance stabilising transformation* (`vst`). The [DESeq2 vignette explains how to use these](http://bioconductor.org/packages/devel/bioc/vignettes/DESeq2/inst/doc/DESeq2.html#data-transformations-and-visualization) for things like hclust.

---

On a more general note, CPM does not account for transcript length differences, while TPM does. If the choice is between TPM and CPM I would therefore use TPM. However, if you are only comparing the same transcripts across experiments, the transcript length is actually invariant so it doesn’t matter (but CPM is still not a good cross-experiment normalisation).

> **Comments:**
> **username_0**: I am confused now , so what is the use of TPM, why does one produce it and when or where do you use it? , in other words which tools, analysis in RNA seq would you use TPM if everything revolves around using counts and pushing it through DESeq2  
> **username_1**: Tools produce TPMs because they don’t have the information (= the other samples) necessary to perform cross-sample normalisation. Lacking that, TPM is the best they can do. TPM is also useful for *within-sample* comparisons: It can give you an accurate estimate of how much genes are expressed in a given sample relative to each other.  
> **username_0**: Plz Correct me if am wrong here, given an experimental design different cell types from a normal mouse say 4 cell types (3 replicates each), sequenced using same library prep but may be at different times. Aim would be to check for set of cell type specific transcripts you would use TPM where as if you want to add a significance parameter (need a pvalue) one would use raw counts based analysis?  I guess the confusion for me is when we use the word  "expression" . People use TPM and call it expression, also use raw counts and call it expression  
> **username_1**: Both are estimates for expression, given the data. Your use-case sounds reasonable although I would generally prefer to determine “cell type specific transcripts” by comparing different cell types, rather than based solely on a single sample. Which would imply performing differential expression analysis.  
> **username_0**: `Which would imply performing differential expression analysis` on?  
> **username_1**: @novicebioinforesearcher On whatever data sets you wish to compare. It rarely (if ever!) makes sense to describe a gene as being cell type specific without saying “as opposed to these other cell types”. For example, a cell type specific gene may nevertheless be lowly expressed: as long as it’s *entirely absent* in other cells, it’s cell type specific. This is in fact often the case. You therefore *cannot* characterise many cell type specific genes without comparing different cell types.  
> **username_2**: Is VST/RLOG normalised for transcript length? If not is it possible to get length normalised VST/RLOG?  
> **username_1**: @rmf No, they do not normalise for transcript length; both functions merely change the *distribution* shape of the counts into something closer to linear. For those purposes where you’d use rlog/vst, accounting for transcript length, is normally not important. You could however apply further transformation (let’s call it rlog-TMP), if you have an application where you need cross-sample as well as within-sample normalised values.  
> **username_2**: Would you say it's ok to do something like `(vst/length)*(10^6)` and use that for heatmaps where I actually want to compare expression of one gene to another gene.  
> **username_1**: @rmf Yes but in a heatmap you usually scale by (gene) row anyway (either explicitly or the plotting function performs the division internally) so the normalisation per transcript length will be strictly a no-op.  

---

