Closed atly2000 closed 2 years ago
AverageExpression averages the cells, so you're losing the per-cell information. It sounds like you just want a normal single-cell heatmap (running DoHeatmap on the original object) grouped by dataset. You can do this by skipping the averaging step, and run DoHeatmap with group.by = "cat"
I am planning on plotting a heatmap showing the gene expression three categories of cells from my scRNA-seq data. Unlike Seurat-assigned clusters, I specify these barcodes from an external analysis.
Using subset, I assigned three new categories to my Seurat Object as identities: cat_1, cat_2, and cat_3.
I would like to plot the average gene expression within each of these identities as a heatmap.
I have tried the following:
But I get this after using head:
I expected to see a matrix with cell barcodes and other metadata, but I do not see any barcodes at all.
Next, when I perform DoHeatmap, I get three columns as I expected. However, I am unsure if the cells have been properly plotted on the heatmap. How can I be sure that these columns correspond to cat_1, cat_2, and cat_3?
Also, is there a way to label each column as cat_1, cat_2, and cat_3?
I appreciate your help.