Lesson 13 of 20
UMAP — a chart whose axes mean nothing
Figs. 5B·5I·7A·8A — 4 of the 62 panels
Single-cell data gives each cell 20,000 gene values. How do you look at 50,000 points in 20,000 dimensions?
You squash them into two. That is what UMAP and t-SNE do, and it is what Figs. 5B, 5I, 7A and 8A all are.
The resulting chart has some strange properties.
This is PCA, not UMAP. The difference is that its axes do mean something — a share of variance explained. The rest of the grammar is identical.
Python
Runs in your browser
PCA was used on purpose. Setting it beside a chart whose axes do mean something is what makes “a UMAP's axes mean nothing” land.
| PCA | UMAP · t-SNE | |
|---|---|---|
| Axis meaning | share of variance explained | none |
| Distance between clumps | trustworthy | not trustworthy |
| Rerun it | identical (signs may flip) | different |
| Power to separate clumps | weak | strong |
Which is why the paper uses UMAP only as a backdrop for colouring cell types. The actual claims are made by the dot plots (lesson 14) and the proportion bars beside it. A UMAP is a map saying “this is how we divided the cells up”. It is not evidence.
🤔 Check yourself
Two clusters sit far apart on a UMAP. What can you conclude?
Answer UMAP only tries to preserve neighbourhoods. Inter-cluster distance is not part of its objective. Two clusters that look close may in fact be the most different.
🤔 Check yourself
You rerun UMAP on the same data and the shape changes. What should you do?
Answer UMAP relies on random initialisation. Recording the seed, n_neighbors and min_dist lets anyone regenerate exactly the same picture.
🤔 Check yourself
What goes wrong if you plot 50,000 raw points on a UMAP?
Answer This is overplotting. It can even make the conclusion depend on drawing order. Density plots, transparency and hexbin are the standard remedies.