# 07. Naming Cell Types with Gene Patterns

> Use combinations of relatively high and low genes together with previously labelled reference data to assign cell-type names to single-cell groups.

Clustering groups cells with similar expression and assigns temporary IDs such as cluster 0, 1, and 2. Cluster 3 is therefore only an algorithmic identifier. A **marker gene** is relatively high or low in one group and helps identify that group. Calling cluster 3 a T cell or fibroblast requires patterns from several markers, tissue context, and previously labelled reference data.

> **Question for this lesson**: What evidence supports a cell-type name for a numbered cluster?

## Use marker combinations, not one gene

This simplified table illustrates the pattern.

| cluster | relatively high genes | initial label candidate |
| --- | --- | --- |
| 0 | `CD3D`, `CD3E`, `TRBC1` | T cell |
| 1 | `MS4A1`, `CD79A`, `CD37` | B cell |
| 2 | `COL1A1`, `COL1A2`, `DCN` | fibroblast |
| 3 | `EPCAM`, `KRT8`, `KRT18` | epithelial cell |

One detected `CD3D` count is not enough to call a T cell. Several positive markers should agree, while key markers of incompatible lineages should remain low. **Ambient RNA**, RNA released from broken cells into the surrounding solution, can make an isolated gene appear in the wrong cluster. A **doublet**, two cells captured together, can combine otherwise incompatible gene patterns.

A **positive marker** is expected for the label. A **negative marker** should not be strong if that label is correct. Using both helps distinguish related types and identify doublets.

## Separate stable identity from temporary state

T cell, B cell, and fibroblast are relatively stable identities called **cell types**. Cycling, interferon response, stress, and reduced function called exhaustion can be temporary **cell states** shared across types.

A cluster dominated by cell-cycle genes may be an activated state of one lineage rather than a new lineage. Store the two labels separately.

```text
cell_type = T cell
cell_state = proliferating
```

Dissociation can induce heat-shock and immediate-early genes. These processing artefacts are artificial signals created during the experiment. Compare their sample distribution and processing conditions before interpreting them as biology.

## Cluster markers differ by construction

Cluster markers compare one computed cluster with the others. The same data defined the groups and then tested their differences. A [marker p-value](/en/reference/statistical-testing/) summarizes how surprising the result would be under a model with no difference, but it is not independent evidence for a treatment effect.

Marker rankings support annotation. Condition comparisons answer a different question. Review effect size, fraction of cells expressing the marker, sample contributions, doublet scores, and continuity with nearby clusters.

## Compare with previously labelled reference data

A **cell atlas** is a reference map containing expression profiles with known cell labels. Comparing unlabelled query cells with reference cells and transferring the closest label is called **reference mapping**. Automated annotation is fast and consistent across many cells.

A disease state or rare type absent from the reference may be forced into the nearest wrong label. Confirm that tissue, species, assay, and states match the query, then compare transferred labels with marker patterns.

Look for agreement among three sources.

1. Cluster markers discovered in the dataset
2. Known positive and negative marker combinations
3. Label transfer from an appropriate reference

When they disagree, use a broader parent label or leave the cluster `unresolved` rather than inventing false precision.

## Keep the evidence and change history for each label

Store provenance, the information needed to trace where an interpretation came from, alongside each label.

| field | example |
| --- | --- |
| `cluster` | `3` |
| `cell_type` | `CD8 T cell` |
| `cell_state` | `cycling` |
| `annotation_method` | marker review + reference mapping |
| `reference` | atlas name and version |
| `marker_evidence` | `CD3D`, `CD8A`, `CCL5` |
| `confidence` | high / medium / unresolved |

A cell name is an interpretation added after measurement. Counts and cluster IDs must remain traceable when the label changes.

## Summary

Annotation combines positive and negative markers, type versus state, sample contributions, and reference mapping. Store the evidence and uncertainty with the label.

Next, [Comparing Cell Composition and Expression Across Conditions](/en/lessons/single-cell-comparison/) uses these labels while preserving donors as the experimental replicates.

---

### Sources

- Manual and automated annotation guidance: [Pasquini et al., *Nature Protocols* (2021)](https://www.nature.com/articles/s41596-021-00534-0)
- Marker-based annotation and reference mapping: [Heumos et al., *Nature Reviews Genetics* (2023)](https://www.nature.com/articles/s41576-023-00586-w)
- PBMC marker example: [Scanpy preprocessing and clustering](https://scanpy.readthedocs.io/en/stable/tutorials/basics/clustering.html)