<p>Scaling (or centering) makes the genes comparable: Putting the expression levels of genes in the same scale (i.e. between 0 and 1) sustains that all of your genes contribute equally to the PCA or distance calculations. On the other hand, without this step, such calculations would be dominated by the highly/lowly expressed genes. I get &quot;better&quot; results with scaling.</p>

CC BY-SA 4.0
2020-10-08T08:16:41.673Z
Yes, I understand that. But the data has already been standardized using by trimmed mean of the value. And when performing PCA with and without scaling the results are pretty similar. I am wondering if the scaling and centering are not needed because the data has already been standardized.
Mee
CC BY-SA 4.0
2020-10-08T09:30:35.390Z
What TMM does is to "make different samples comparable" by adjusting for library size and more. It does not deal with individual genes. So yes, scaling would help when expression levels of different genes vary a lot (it is often the case). Since you are using `edgeR`, you can use the function `cpm()` to calculate log2 of CPM and then scale these before clustering for example.
haci
CC BY-SA 4.0
2020-10-08T18:05:47.860Z
ok, thank you for your answer now I undestand. But, in terms of using the cpm() function: is it ok to use it over the data that is already TMM? Thanks
Mee
CC BY-SA 4.0
2020-10-07T13:43:36.320Z
2020-10-07T13:43:36.320Z
haci
<p>I have count data from a RNAseq experiment (2 samples are from normal cells and 3 samples are cells with a disease), and the data is already standardized by trimmed mean of M values (TMM).
I want to do some plots: biplot of Principal Component Analysis (PCA) and a cluster dendrogram to see if the samples normal/disease are well separated (there is a clear difference between them).
Since the data is already standardized (TMM) should I scale and center the data prior to perform PCA and cluster dendrogram??</p>
<p>thank you!</p>

CC BY-SA 4.0
2020-10-07T12:58:06.950Z
by TMM you meaning running limma or edgeR on it i supposed? Or obtaining the cpms?
StupidWolf
CC BY-SA 4.0
2020-10-08T08:19:26.853Z
Using kallisto I get the TMM, and before looking for differentially expressed genes with edgeR I am doing PCA and cluster dendogram to look into the data.
Mee
<rna-seq><clustering><pca><tmm>
data visualization RNAseq : scaling data for PCA and cluster dendogram
# data visualization RNAseq : scaling data for PCA and cluster dendogram

(Asked by: username_0 on 2020-10-07)

I have count data from a RNAseq experiment (2 samples are from normal cells and 3 samples are cells with a disease), and the data is already standardized by trimmed mean of M values (TMM).
I want to do some plots: biplot of Principal Component Analysis (PCA) and a cluster dendrogram to see if the samples normal/disease are well separated (there is a clear difference between them).
Since the data is already standardized (TMM) should I scale and center the data prior to perform PCA and cluster dendrogram??

thank you!

**Tags:** rna-seq, clustering, pca, tmm
> **Comments:**
> **username_1**: by TMM you meaning running limma or edgeR on it i supposed? Or obtaining the cpms?  
> **username_0**: Using kallisto I get the TMM, and before looking for differentially expressed genes with edgeR I am doing PCA and cluster dendogram to look into the data.  

---

## 1 answers

### Answer by username_2 on 2020-10-07. Score: 2 | Accepted answer

Scaling (or centering) makes the genes comparable: Putting the expression levels of genes in the same scale (i.e. between 0 and 1) sustains that all of your genes contribute equally to the PCA or distance calculations. On the other hand, without this step, such calculations would be dominated by the highly/lowly expressed genes. I get "better" results with scaling.

> **Comments:**
> **username_0**: Yes, I understand that. But the data has already been standardized using by trimmed mean of the value. And when performing PCA with and without scaling the results are pretty similar. I am wondering if the scaling and centering are not needed because the data has already been standardized.  
> **username_2**: What TMM does is to "make different samples comparable" by adjusting for library size and more. It does not deal with individual genes. So yes, scaling would help when expression levels of different genes vary a lot (it is often the case). Since you are using `edgeR`, you can use the function `cpm()` to calculate log2 of CPM and then scale these before clustering for example.  
> **username_0**: ok, thank you for your answer now I undestand. But, in terms of using the cpm() function: is it ok to use it over the data that is already TMM? Thanks  

---

