Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Annotate cell types and states

Clustering groups cells with similar expression profiles. Annotation asks what those groups might be. We will start with broad PBMC labels, check several supporting and negative markers, and then refine the labels where the evidence allows it.

The tissue matters: a plausible blood-cell identity may make little sense in another sample. Use the marker patterns together with that context, and keep uncertain labels provisional. The Identify PBMC populations with scRNA-seq tutorial introduces the broad populations used here.

Open the prepared analysis

Started: 2026-10-11T18:54:41.636055Z | Wall time: 4.904 s

Open the downloaded store and its saved analysis.

DataStore has 3948 (5025) cells with 1 assays: RNA Cell metadata: 'I', 'ids', 'names', 'RNA_G2M_score', 'RNA_S_score', 'RNA_UMAP1', 'RNA_UMAP2', 'RNA_cell_cycle_phase', 'RNA_clusters', 'RNA_doublet_score', 'RNA_leiden_cluster', 'RNA_nCounts', 'RNA_nFeatures', 'RNA_paris_cluster', 'RNA_percentMito', 'RNA_percentRibo' RNA assay has 33538 features and following metadata: 'I', 'ids', 'names', 'dropOuts', 'feature_type', 'genome', 'nCells'

Started: 2026-10-11T18:54:46.544560Z | Wall time: 35.915 s

This is the same prepared result as the RNA tutorial. Cluster numbers and labels below belong to this result; a new analysis may produce different clusters. The marker table compares each saved cluster with the other analyzed cells, as the run’s own run["markers"] does.

Read the marker evidence

Start with the default marker filters and inspect one cluster:

feature_namescorefrac_expfold_changeaucp_value_adjusted
0S100A120.956020.93994815.529810.969160.0
1VCAN0.926710.96648360.289120.982440.0
2CD140.920580.95251419.171100.975500.0
3ALDH1A10.906550.51816646.329330.758540.0
4CLEC4E0.906040.58659834.764240.792820.0
5LGALS20.903430.55587243.498140.776420.0
6CD1630.894370.50419433.350700.751370.0
7QPCT0.884680.46788370.170630.733170.0
8CYP27A10.883720.46648363.403520.732340.0
9STAB10.877410.6243093.185040.807920.0

Started: 2026-10-11T18:55:22.464500Z | Wall time: 0.132 s

Each row compares expression in this cluster with the rest of the analyzed cells.

ColumnHow to read it
frac_expFraction of cells with detected expression, from 0 to 1. A value of 0.8 means 80% of the cluster.
fold_changeMean expression in the cluster divided by the mean in the other cells. It is inf for a gene that no other cell expresses and NaN for a gene that no cell expresses. Check detection too: a few cells can drive a large difference.
aucValues above 0.5 favour higher expression in this cluster; below 0.5 favour the other cells. A value near 0.5 gives little separation.
scoreA relative specificity score based on expression ranks across clusters. It is not a detection fraction or a probability of cell identity.
p_value_adjustedA two-sided Mann-Whitney p-value with Benjamini-Hochberg correction within the cluster’s tested genes. It does not account for biological replication.

A low specificity score does not establish that a gene is absent. Read frac_exp for detection and compare it with frac_exp_rest when evaluating negative evidence.

fold_change is a ratio of the means of the values that the marker search ranks: here, library-size normalized counts. Sorted from high to low, genes that only this cluster expresses come first with inf, however faint, and genes that no cell expresses come last with NaN. With log_transform=True, or for an ADT assay normalized with CLR, the ranked values are on a log scale, so the ratio compares log-scale means and is not a fold change in expression. Compare fold changes only between results of the same assay and normalization.

Assign initial cell types

Plot a few familiar markers alongside the clusters. Drawing high values last makes sparse expression easier to see in these panels.

PBMC UMAP panels show CD14, CD19, CD8A, CD4, NCAM1, and IL3RA expression beside cluster labels. Different marker patterns locate candidate monocyte, B-cell, T-cell, NK-cell, and pDC-like populations.

Started: 2026-10-11T18:55:22.599275Z | Wall time: 4.389 s

CD14 suggests a monocyte population, CD19 highlights candidate B cells, and NCAM1 (CD56) highlights an NK-like population. CD8A and CD4 help locate candidate T-cell groups, but neither is sufficient alone. In this example, CD4’s highest specificity score is in monocyte cluster 1. CD19 points to cluster 8, CD8A to cluster 7, and NCAM1 to cluster 5. These associations help locate candidate populations; they do not make any of these genes a unique lineage marker. IL3RA suggests a pDC-like population that we will check with other markers.

The default marker filters hide weak and negative evidence. For the remaining comparisons, load all marker rows once by relaxing both filters. Keep this table for the later panels.

group_idscorefrac_expauc
feature_name
CD1410.920.950.98
CD1980.540.610.78
CD8A70.490.880.89
CD410.340.750.77
NCAM150.760.400.70
IL3RA100.811.001.00

Started: 2026-10-11T18:55:26.992920Z | Wall time: 0.695 s

These are starting hypotheses. Several clusters receive the same broad name:

1 CD14 monocytes 2 B cells 3 T cells 4 T cells 5 NK cells 6 T cells 7 T cells 8 B cells 9 monocytes 10 pDC-like cells Name: proposed_cell_type, dtype: str

Started: 2026-10-11T18:55:27.692177Z | Wall time: 0.011 s

Look for several supporting markers

A heatmap helps us check whether several genes support each proposed identity. Show the three leading markers per cluster, with enough width to read the cluster labels:

Heatmap of the three leading marker genes per PBMC cluster, with genes in rows and clusters in columns. Standardized expression and hierarchical ordering highlight distinct marker patterns across clusters.

Started: 2026-10-11T18:55:27.707026Z | Wall time: 2.512 s

Read each column’s cluster number before interpreting the heatmap. The column order follows marker similarity, so it is not numerical order.

  • Monocytes: cluster 1 has S100A12, VCAN, and CD14. Cluster 9 has a distinct CTSL, TCF7L2, and SMIM25 pattern. Keep its broader monocyte label while investigating its state.

  • B cells: IGHD, FCER2, and TCL1A support a naive B-cell interpretation for cluster 8. IGHA1, TNFRSF13B, and IGHG1 support a memory-like B-cell population in cluster 2.

  • NK and T cells: KLRF1, FGFBP2, and SPON2 support an NK interpretation for cluster 5. Cluster 6 has a GZMK, TRGC2, and KLRG1 pattern; inspect T-cell markers before interpreting its cytotoxic program. Cluster 7 has CD8B among its leading markers.

  • Other T-cell groups: clusters 3 and 4 retain broad T-cell labels. Their different leading markers are a reason to inspect their states, not sufficient evidence to name a subtype.

  • pDC-like cells: SERPINF1 in cluster 10 supports the initial IL3RA association, but the short heatmap panel does not settle this rare population’s identity. Keep the label provisional.

For finer T-cell labels, compare clusters 6 and 7 using a small panel:

group_idfeature_namefrac_expscore
1676906GZMK0.710.78
1676976CD8A0.480.41
1677486CD8B0.460.28
1677796CD3D0.980.26
1678406IL7R0.720.23
1692346CD270.520.14
2007936CCR70.120.02
2012297CD8B0.950.68
2012337CD8A0.880.49
2012557CCR70.850.30
2012597CD270.910.29
2013687CD3D0.980.21
2013847IL7R0.950.20
2344107GZMK0.020.01

Started: 2026-10-11T18:55:30.222909Z | Wall time: 0.044 s

Cluster 6 has a GZMK-associated cytotoxic T-cell pattern. Cluster 7 combines frequent CD8A and CD8B detection with CCR7, IL7R, and CD27, supporting a naive-like CD8 interpretation. GZMK is rarely detected in cluster 7. These descriptions remain hypotheses about state, not proof of a separate lineage.

Check competing identities

Cytotoxic genes are shared by NK cells and some T cells. Compare the candidate NK cluster 5 with T-cell clusters 6 and 7 using CD3D and CD3E, then inspect CD4, CD8A, and CD8B:

group_idfeature_namefrac_expfrac_exp_restauc
1341635GNLY1.000.111.00
1341995NKG71.000.210.99
1419945CD3D0.310.650.40
1431295CD3E0.420.660.40
1665925CD8A0.110.110.50
1675865CD40.020.390.31
1676335CD8B0.000.120.44
1676976CD8A0.480.060.72
1677236NKG70.890.180.86
1677486CD8B0.460.060.70
1677796CD3D0.980.570.77
1678086CD3E0.990.600.73
1726646GNLY0.240.170.54
1988376CD40.230.380.42
2012297CD8B0.950.080.95
2012337CD8A0.880.080.89
2013117CD3E0.990.630.70
2013687CD3D0.980.610.66
2339937GNLY0.110.180.46
2341837NKG70.130.280.42
2346697CD40.010.370.32

Started: 2026-10-11T18:55:30.269492Z | Wall time: 0.060 s

In cluster 6, CD3D and CD3E are detected in almost all cells, alongside NKG7 in most cells. This supports a T-cell interpretation despite the cytotoxic program. Calling this cluster NK from NKG7 alone would miss the T-cell evidence. For candidate NK cluster 5, check whether the T-cell markers are depleted relative to the cytotoxic markers.

In cluster 7, frequent CD8A and CD8B detection supports the CD8 T-cell label. Check CD4 and other competing lineages in the same way; low detection of one marker does not establish that a population is pure. Cluster-level averages can also hide mixtures within a group.

Save and compare the reviewed labels

Keep the broad labels where we have not established a finer identity. Update the groups with additional supporting evidence:

initialreviewed
2B cellsmemory-like B cells
7T cellsnaive-like CD8 T cells
8B cellsnaive B cells

Started: 2026-10-11T18:55:30.332366Z | Wall time: 0.009 s

The cell table includes cells outside this run. Align the labels to the run’s selection before saving them. Rerunning this cell replaces the two annotation columns, leaving the computed clusters unchanged.

T cells 2230 CD14 monocytes 716 NK cells 318 naive B cells 256 memory-like B cells 239 naive-like CD8 T cells 149 monocytes 25 pDC-like cells 15 Name: cells, dtype: int64

Started: 2026-10-11T18:55:30.344547Z | Wall time: 0.091 s

The same PBMC UMAP colored by proposed and reviewed cell types. Review separates naive and memory-like B cells and adds a provisional naive-like CD8 T-cell label.

Started: 2026-10-11T18:55:30.439987Z | Wall time: 1.410 s

The saved naive-like CD8 T cells and memory-like B cells labels summarize the interpretations above. They are provisional teaching labels for this dataset. Keep the marker evidence and the run identity with them when recording an analysis.

What still needs further review?

Clusters can separate continuous states within one lineage. Compare marker evidence across partitions with Clustering and cluster evidence before treating each cluster as a distinct cell type.

Mixed lineage markers may reflect doublets, background RNA, or uncertain identity. Check per-cell evidence and Quality control across assays; a cluster-average score cannot settle the question. Rare populations deserve this review as much as large ones.

These marker statistics compare cells. Use Pseudobulk and differential expression (DE) primer for questions about differences between biological conditions. Use Mapping cells and transferring labels when transferring labels from a fixed reference.

Find marker references for your tissue

Use resources as evidence to compare with your measured markers, rather than a list of names to assign automatically: