Biology and medicine · 10 minutes
CD decoder
Immunologists describe cells in code: "CD3+ CD4+ CD25+ CD127−". Each CD number names a protein on the cell surface, + means the cell has it, − means it does not. A cell type is a logical expression over these proteins, and you already know how to work with those.
Start here no biology needed
Blood carries red cells (oxygen), platelets (clotting) and white blood cells. The white cells are the immune system on patrol, and they come in types with very different jobs. Under a microscope several of these types look almost identical, so immunologists tell them apart by something else: the proteins each type carries on its surface.
The cast
- T cells
- Each one recognises a single specific target, such as a piece of a virus. Helper T cells direct the other immune cells, cytotoxic T cells kill infected or cancerous cells, and regulatory T cells are the brake that stops the response from damaging healthy tissue.
- B cells
- Produce antibodies, the proteins that stick to an invader and flag it for destruction.
- Natural killer cells
- Kill abnormal cells on sight, without having to learn a specific target first.
- Monocytes
- Circulate in blood and move into tissue, where they become macrophages that eat microbes and debris. Most are the classical kind. A smaller non-classical group patrols the walls of blood vessels.
- Neutrophils, eosinophils
- Granulocytes, cells packed with granules of toxic proteins. Neutrophils are the most numerous white cell and the first to arrive at an infection. Eosinophils deal with parasites and take part in allergies.
- Stem and progenitor cells
- Rare, immature cells that still have to decide what to become. All the others descend from them.
The measurement
To test for one surface protein, you add an antibody that sticks only to that protein and carries a fluorescent dye. A flow cytometer then sends the cells through a laser beam one at a time and records how brightly each cell glows.
Do that for twelve proteins at once and every cell becomes a row of twelve numbers. In your terms: a cell is a feature vector, a cell type is a rule over the features, and the immunologist is fitting a small decision tree by hand. Each threshold in that tree is called a gate.
1. What the code means
- CD stands for cluster of differentiation. The numbers were handed out in the order the proteins were characterised, so CD4 and CD5 have nothing in common, and the number tells you nothing about function.
- + and − mean the protein is detected or not, usually with a fluorescent antibody in flow cytometry or imaging. dim, low, bright, high describe how much.
- No single marker defines a cell type. Populations are isolated by gating: a sequence of thresholds, each one a cut through a continuous intensity distribution.
2. Gate a population
Below are eleven kinds of blood cell, each with the markers it carries. Your job is to write the rule that keeps one kind and removes all others. Pick a mission, then click markers to require them (+) or exclude them (−). The first mission needs a single click.
One click: must be positive. Two clicks: must be negative. Three clicks: no gate.
Solid: passes every gate. Dashed amber: borderline, the cell has dim or variable expression of a gated marker, so the outcome depends on where the threshold sits. Faded: excluded. Outlined: the population you want.
3. Decoder table
The protein name on the antibody tube and the gene name in an RNA dataset are often different. This table is the join key.
4. Why this matters for your model
- Labels are thresholds. "CD4+" was decided by someone drawing a gate on a histogram. Two labs gate differently, and so do two operators in one lab. That is label noise with structure.
- Protein and RNA disagree. A cell can carry plenty of CD4 protein with almost no CD4 transcript captured in single-cell RNA data. Do not expect marker genes to behave like marker proteins.
- Species matter. Mouse and human markers differ. Mouse neutrophils are usually found with Ly6G, which humans do not have.
- State changes markers. Activation, disease and treatment move expression. CD25 rises on any activated T cell, which is why regulatory T cells need a second marker.
5. Check yourself
Notes and caveats
The table shows typical patterns for healthy adult human blood, reduced to three levels. Real populations are continuous and contain subsets and exceptions: natural killer T cells, CD56-bright natural killer cells, intermediate monocytes and many others are left out. Regulatory T cells are defined most reliably by the transcription factor FOXP3, which sits inside the cell and is not a CD marker.