Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-08T08:16:41.673Z
Answers.Text: 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.
Answers.UserDisplayName: Mee
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-08T09:30:35.390Z
Answers.Text: 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.
Answers.UserDisplayName: haci
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-08T18:05:47.860Z
Answers.Text: 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
Answers.UserDisplayName: Mee
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-07T13:43:36.320Z
Answers.LastActivityDate: 2020-10-07T13:43:36.320Z
Answers.UserDisplayName: haci
Body: <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>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-07T12:58:06.950Z
Comments.Text: by TMM you meaning running limma or edgeR on it i supposed? Or obtaining the cpms?
Comments.UserDisplayName: StupidWolf
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-10-08T08:19:26.853Z
Comments.Text: 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.
Comments.UserDisplayName: Mee
Tags: <rna-seq><clustering><pca><tmm>
Title: data visualization RNAseq : scaling data for PCA and cluster dendogram
ThreadText: # 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  
  
  ---
  
  