<p>The <code>PCHeatmap</code> function (renamed <code>DimHeatmap</code> in Seurat v3) can be used to help determine the number of principal components to use in downstream analysis, as well as to visualize the top genes contributing to each PC. </p>

<p>Both cells and genes are ordered by their PC scores, and by default the 15 genes with the highest and 15 genes with the lowest PC loadings are displayed for each PC.</p>

<p>In your case with PC1 and PC2, my conclusion would be that PC1 and PC2 both strongly separate different populations of cells. For PC1 there is a smaller population with very strong separation, and PC2 splits the cells roughly in half.</p>

<p>You can also set the <code>cells.use</code> parameter (renamed <code>cells</code> in Seurat v3) to only show the top <em>n</em> cells for each PC which can help with visualization.</p>

CC BY-SA 4.0
2019-10-11T01:42:05.187Z
What do you mean by PC score? Do you do two PCAs where one uses the genes as features and the other the cells? I don't get it.
Inhibitor
CC BY-SA 4.0
2019-11-25T16:06:43.393Z
@Inhibitor no just one PCA. but roughly speaking the cell scores are the eigenvector values, and the gene score is the linear combination of the cell score and the cell counts
august
CC BY-SA 4.0
2020-02-03T05:12:00.397Z
@august Thanks. I don't have the intuition to immediately see how these things become useful scores (need to think about it a bit), but at least it's something I can calculate. Wish people would write this in their articles, coz' if it confuses me then it certainly also confuses wet lab biologists...
Inhibitor
CC BY-SA 4.0
2019-03-01T22:15:43.620Z
2019-03-01T22:15:43.620Z
TimStuart
<p>I am currently trying to understand the purpose of these PCHeatmaps - part of the <code>seurat</code> package in R:</p>

<p><a href="https://i.sstatic.net/A6NRi.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/A6NRi.png" alt="enter image description here"></a></p>

<p>All the online documentation I have searched for has only highlighted how it is used to observe heterogeneity in the data.. This much I understand. </p>

<p>My questions are: </p>

<ul>
<li>Are the genes in the rows of each PC plot just the most variable x
number of genes defined in <code>FindVariableGenes</code>?</li>
<li>If not, then how are each of these genes 'chosen' for use in the <code>PCHeatmap</code>
visualization?</li>
<li>What would be the different conclusions/deductions drawn from the PC1 heatmap and PC2 heatmap with regards to heterogeneity for example?</li>
<li>And finally, how can these conclusions help in the analysis of scRNASeq data?</li>
</ul>

<scrnaseq><r><seurat><pca>
Understanding PCHeatmap outputs
# Understanding PCHeatmap outputs

(Asked by: username_0 on 2019-03-01)

I am currently trying to understand the purpose of these PCHeatmaps - part of the `seurat` package in R:

[![enter image description here](https://i.sstatic.net/A6NRi.png)](https://i.sstatic.net/A6NRi.png)

All the online documentation I have searched for has only highlighted how it is used to observe heterogeneity in the data.. This much I understand.

My questions are:

* Are the genes in the rows of each PC plot just the most variable x
  number of genes defined in `FindVariableGenes`?
* If not, then how are each of these genes 'chosen' for use in the `PCHeatmap`
  visualization?
* What would be the different conclusions/deductions drawn from the PC1 heatmap and PC2 heatmap with regards to heterogeneity for example?
* And finally, how can these conclusions help in the analysis of scRNASeq data?

**Tags:** scrnaseq, r, seurat, pca

---

## 1 answers

### Answer by username_1 on 2019-03-01. Score: 3 | Accepted answer

The `PCHeatmap` function (renamed `DimHeatmap` in Seurat v3) can be used to help determine the number of principal components to use in downstream analysis, as well as to visualize the top genes contributing to each PC.

Both cells and genes are ordered by their PC scores, and by default the 15 genes with the highest and 15 genes with the lowest PC loadings are displayed for each PC.

In your case with PC1 and PC2, my conclusion would be that PC1 and PC2 both strongly separate different populations of cells. For PC1 there is a smaller population with very strong separation, and PC2 splits the cells roughly in half.

You can also set the `cells.use` parameter (renamed `cells` in Seurat v3) to only show the top *n* cells for each PC which can help with visualization.

> **Comments:**
> **username_2**: What do you mean by PC score? Do you do two PCAs where one uses the genes as features and the other the cells? I don't get it.  
> **username_3**: @Inhibitor no just one PCA. but roughly speaking the cell scores are the eigenvector values, and the gene score is the linear combination of the cell score and the cell counts  
> **username_2**: @august Thanks. I don't have the intuition to immediately see how these things become useful scores (need to think about it a bit), but at least it's something I can calculate. Wish people would write this in their articles, coz' if it confuses me then it certainly also confuses wet lab biologists...  

---

