LSMA

LONDON SCHOOL OF MULTIOMICS & AI

Free course

Free course

0 of 73 lessons

Lesson 8 of 10

Module 1 · Understanding omics

Single-cell and spatial biology

Single-cell and spatial biology

Single-cell and spatial biology

A tumour is a mix of cancer cells, immune cells, fibroblasts and blood vessels. Bulk methods average them; single-cell and spatial methods tell them apart, and show where each one sits.

⏱ 17 min readModule 1 · Understanding omicsFree
Lesson at a glance3 steps · about 17 min
  1. How single-cell works
  2. What happens after the counts
  3. Spatial biology: where cells are
Bulk RNA-seq
  • A smoothie: one average for the whole sample
  • Deep, reliable counts
  • Cheap enough for hundreds of patients
  • Cannot say which cells a signal came from
Single-cell RNA-seq
  • A fruit salad: every piece seen separately
  • Thousands of cells per sample, each with sparse counts
  • Reveals rare cell types and states
  • Costlier, so usually fewer patients

The two analogies are worth taking literally. A smoothie tells you what went in on average, but not whether the strawberry flavour came from many strawberries or a few very ripe ones. In a fruit salad you can count the pieces and look at each one. A cell type is a kind of cell with a recognised identity and job, such as a T cell or a fibroblast. A cell state is what a cell of one type is doing at the moment: a T cell can be resting, active or exhausted after a long fight with a tumour. Bulk data blends all of these into one number per gene.

The trade-off runs the other way for depth. A bulk sample gives tens of millions of reads for one average, so every gene that is in use is measured well. A single cell contains only a small amount of RNA, and only part of it is captured, so each cell's counts are low and patchy.

How single-cell works

In the most common methods, each cell is captured in a tiny droplet with a bead carrying a unique cell barcode. Every RNA molecule from that cell is tagged with the barcode and a unique molecular identifier (UMI), so reads can be traced to their cell and PCR copies counted once.

First the tissue is broken apart into single cells, a step called dissociation. The cells then flow through narrow channels on a chip and meet beads and oil, so that droplets form, most of them holding at most one cell and one bead. Inside each droplet the cell bursts open and its mRNA sticks to the bead. The barcode works like a sample barcode in How sequencing works, but for each cell: every read that carries it came from the same droplet, and so from the same cell.

The UMI solves the PCR duplicate problem from How sequencing works. Each capture strand on the bead has its own random UMI, so each original RNA molecule receives a different one. If one molecule is copied eight times during PCR, all eight reads carry the same barcode and the same UMI, and the computer counts them as one molecule. Single-cell counts are therefore counts of molecules, often called UMI counts, rather than counts of reads.

A short example shows why this matters. Suppose a gene in one cell gives 12 reads. If those reads carry three different UMIs, the cell held three molecules of that RNA, and the other nine reads were PCR copies. Another gene might give 12 reads with 12 different UMIs: twelve molecules. Read counts would call the two genes equal; UMI counts show that one is four times more abundant. Because amplification is uneven from molecule to molecule, counting UMIs removes much of the noise that PCR adds.

Barcoding also has its own failure modes, and every single-cell analysis starts by dealing with them.

  • Empty droplets. Cells are loaded dilute on purpose, so that two cells rarely share a droplet. The price is that most droplets hold a bead and no cell. Those droplets still catch a little loose RNA, so the raw data contains far more barcodes than there were cells. Software separates real cells from empty droplets mainly by their total UMI count: a real cell has many molecules, an empty droplet very few. This step is called cell calling.
  • Ambient RNA. Cells that burst during dissociation release RNA into the liquid, and a little of it ends up in every droplet. In a sample with many red blood cells, for example, haemoglobin genes can appear at low levels in cells that never make them. Tools exist to estimate and subtract this background, but a weak signal of an unexpected gene should always raise the question.
  • Doublets. Sometimes two cells do share a droplet and one barcode. The result looks like a single cell that expresses the markers of two cell types at once. The more cells are loaded, the more doublets appear, so there is a trade-off between cells per run and purity.
  • Damaged cells. A cell whose outer membrane is broken loses much of its cytoplasmic mRNA, while RNA inside its mitochondria stays behind. A high share of reads from mitochondrial genes is therefore a common sign of a dying or damaged cell, and such cells are usually filtered out. The right cut-off depends on the tissue, since some healthy cells, such as heart muscle, are naturally rich in mitochondria.

Dissociation itself shapes the data. Breaking tissue apart usually means enzymes and warming, and cells respond within minutes by switching on stress genes such as FOS and JUN. Fragile or large cells, such as neurons and fat cells, may not survive at all, so the cells in the data are not a perfect sample of the cells in the tissue. Some protocols sequence isolated nuclei instead of whole cells (single-nucleus RNA-seq), which works on frozen tissue and loses fewer fragile cells, at the cost of seeing mostly RNA that has not yet left the nucleus.

One more limit is built into the most common kits. The capture strand pairs with the poly(A) tail, and in many protocols only the end of the molecule nearest the tail is sequenced. That is enough to tell which gene a molecule came from, but usually not which splice variant it was: many genes can be cut and joined in more than one way, giving several versions of their RNA that differ away from the tail end.

Single-cell and spatial biology · LSMA free course Left: one cell and one bead enclosed in an oil droplet. Right: one capture strand from the bead, made of an adapter, a cell barcode shared by the whole bead, a UMI unique to the strand, and a poly(dT) stretch that pairs with the poly(A) tail of an mRNA. 1 · ONE CELL, ONE BEAD 2 · ONE CAPTURE STRAND ON THE BEAD cell bead droplet in oil adapter cell barcode UMI poly(dT) poly(A) tail mRNA Cell barcode: the same on every strand of one bead UMI: different on every strand
The bead carries many such strands. The poly(dT) end catches mRNA by its poly(A) tail; when the mRNA is copied, the copy carries the bead's cell barcode and the strand's UMI, so every read can be traced to one cell and one molecule. Schematic, not to scale.

Each cell yields only a few thousand detected genes, so the data is sparse: mostly zeros. Analysis groups similar cells into clusters, names them by marker genes, and displays them with UMAP.

The result of all this barcoding is one table, the cell-by-gene matrix. Each column is a cell barcode, each row is a gene, and each entry is the number of UMIs for that gene in that cell. (Some tools turn it the other way, with cells as rows; the content is the same.) It is the single-cell version of the count table from Bulk transcriptomics, with one important difference in shape: a bulk study might have 20,000 genes and 50 samples, while one single-cell sample can have 20,000 genes and 10,000 cells, or 200 million entries.

Because most of those entries are zero, the table is stored as a sparse matrix, a format that writes down only the non-zero values and their positions. A common output from droplet pipelines is a folder of three files: matrix.mtx holds the non-zero counts, barcodes.tsv names the columns and features.tsv names the rows. Analysis packages read these into a single object that also carries a table of information about each cell, such as its sample, its total UMI count and, later, its cluster.

What happens after the counts

  • Sparse. If a cell shows 2,000 detected genes out of about 20,000, then 18,000 ÷ 20,000 = 90% of its entries are zero. Many of those zeros are genes the cell does use, whose molecules were not captured. A zero in single-cell data therefore often means "not seen", not "not there".
  • Clusters. A computer compares every cell with every other and groups those with similar expression. Nobody tells it what the groups are; that comes next.
  • Marker genes. A marker is a gene known to be active in one cell type and not in others. PTPRC, which makes the protein CD45, marks immune cells; CD3E marks T cells; EPCAM marks epithelial cells, the cell type most carcinomas arise from. A cluster high in CD3E is labelled as T cells.
  • UMAP (uniform manifold approximation and projection) squeezes thousands of gene measurements per cell into two coordinates, so each cell becomes a dot on a flat picture. Cells that are close in the picture have similar expression. Distances between clusters, and cluster sizes, are not reliable, so UMAP is for looking, not for measuring.

Between the raw matrix and the coloured picture lie a few standard steps, and each exists for a reason.

  • Normalisation. Cells differ in how many molecules were captured, for technical reasons as much as biological ones. As with counts per million in Bulk transcriptomics, each cell's counts are divided by its total and scaled to a common size, then usually log-transformed so that a few very active genes do not dominate.
  • Feature selection. Most genes vary little between cells and add only noise. Analyses keep a few thousand highly variable genes, the ones whose levels differ most from cell to cell, because those carry the information about cell identity.
  • Dimension reduction. Principal component analysis (PCA) summarises those genes as a few dozen combined axes. Clustering and UMAP are both built on these axes, not on the raw genes.
  • Clustering. Each cell is linked to its most similar neighbours, and groups of tightly linked cells become clusters. A setting called the resolution controls how finely the cells are split. Higher resolution gives more, smaller clusters; it does not make them more true. Choosing it is a judgement about the question, and it is worth checking that a conclusion holds at more than one setting.

Going from clusters to cell types is where biology comes back in. For each cluster, the software lists genes that are much higher there than in the other cells. The analyst compares those lists with known markers, such as the ones above, and names the cluster. Often the first pass gives broad groups, such as immune, epithelial and stromal cells (the supporting cells of a tissue, such as fibroblasts), and each group is then re-clustered on its own to find finer types: CD4 and CD8 T cells within the T cells, for example. Another approach compares each cell with a labelled reference atlas and transfers the closest label, which is quick and consistent but can only find cell types the reference already contains.

Not every cluster is a cell type. A cluster can be a cell state, such as dividing cells, which group together because they share hundreds of cell-cycle genes whatever their type. It can be a group of doublets, recognisable because it carries markers of two unrelated types, such as CD3E with EPCAM. It can be low-quality cells, with few genes detected and many mitochondrial reads. And when samples are processed on different days, cells may group by sample rather than by type. This is a batch effect, and it is corrected by integration methods that align shared cell types across samples. Integration can also over-correct and erase a real difference between conditions, so results should be checked against the uncorrected data.

The most serious pitfall comes when comparing conditions. Ten thousand cells from two patients are not ten thousand independent measurements: they are two patients. Treating each cell as a replicate makes tiny differences look highly significant. The safer approach is pseudobulk: add up the counts for one cell type within each sample, which gives one profile per sample, and then compare samples with the same methods and the same need for replicates that you met in Bulk transcriptomics.

T cellsTumourMyeloidB cellsFibroblastsUMAP 1UMAP 2
A UMAP of single cells: cells with similar expression sit together, so clusters correspond to cell types. Illustrative data.

Worked example · why bulk can mislead

Sample 1: 20% immune cells · Sample 2: 40% immune cells
an immune gene doubles in bulk data
→ yet each immune cell may express it exactly the same

The change came from the mix of cells, not from any cell changing its behaviour. Single-cell data, or deconvolution of bulk data, tells the two apart.

Step by step. Suppose every immune cell makes 10 units of the gene's RNA and the other cells make none. In sample 1, the bulk level is the average over all cells: 0.20 × 10 = 2 units per cell. In sample 2 it is 0.40 × 10 = 4 units per cell. The bulk value has gone from 2 to 4, a doubling, a log2 fold change of 1 (Bulk transcriptomics). Yet every single immune cell still makes exactly 10 units.

What the answer means. A bulk "change" can be a change in what cells are doing, or a change in which cells are present. Both are real, but they mean very different things: more immune cells in a tumour is a different finding from immune cells switching a gene on. Deconvolution estimates the share of each cell type in a bulk sample by comparing its profile with reference profiles of pure cell types, often taken from single-cell data.

Droplet single-cell RNA-seq was described in two papers published together: Macosko and colleagues (2015, Cell, Drop-seq) and Klein and colleagues (2015, Cell, inDrop). Counting molecules with UMIs is shown in Islam and colleagues (2014, Nature Methods). Most commercial systems today build on these ideas.

On UMAP, the warning in this lesson is backed by Chari and Pachter (2023, PLOS Computational Biology), who showed that two-dimensional embeddings can badly distort the true distances between cells. Use UMAP to present clusters, and base any claim about how similar groups are on the full data, not on the picture.

Spatial biology: where cells are

Dissociating a tumour loses the cells' positions. Yet position matters: immune cells that have pushed into the tumour behave differently from those held at its edge, which is the basis of describing tumours as “hot” or “cold”. Spatial methods measure molecules while keeping the tissue intact.

A “hot” tumour is one that T cells have entered in large numbers; a “cold” tumour has few, or keeps them out at its border. The difference matters in the clinic, because immunotherapies that release the brakes on T cells tend to work better when T cells are already inside the tumour. A single-cell experiment can tell you that T cells are present, but not whether they are mixed in among the cancer cells or held at the edge. Only a method that keeps the tissue in place can show that.

Spot-based transcriptomics
  • Tissue on a slide printed with barcoded spots
  • On widely used Visium slides each spot is 55 µm across and holds several cells
  • Whole transcriptome
Imaging-based methods
  • Molecules detected under a microscope, cell by cell
  • Single-cell or finer resolution
  • Usually a chosen panel of hundreds to thousands of genes, or about 40 proteins with imaging mass cytometry

The two families trade breadth for detail. In spot-based methods, a thin tissue section is laid on the slide and its RNA sticks to the spot beneath it, where it picks up that spot's barcode, much as in the droplets above. The barcode then says where the read came from. A micrometre (µm) is a thousandth of a millimetre, and a typical human cell is roughly 10 to 20 µm across, so a 55 µm spot covers a small group of cells and reports their mixture, like a tiny bulk sample. Imaging-based methods detect each molecule as a point of light under the microscope, so molecules can be assigned to individual cells, but only for the genes on the chosen panel. In imaging mass cytometry, antibodies tagged with different metal atoms bind their proteins; a laser then vaporises the tissue spot by spot, and a mass spectrometer reads which metals were present at each spot.

What position adds is easiest to see with examples. Spatial data can show that a tumour has a core low in oxygen, with stressed cells at its centre and dividing cells at its rim; that a group of T cells and B cells has formed a small organised cluster within the tumour; or that a signalling molecule made by one cell type sits right next to cells that carry its receptor. In each case, the same cells could be present in a single-cell dataset, but only their arrangement in the tissue shows the pattern.

Spot-based and single-cell data are often used together. Because each spot is a small mixture, its profile can be deconvolved, as in the worked example above: a single-cell dataset from the same tissue provides reference profiles for each cell type, and the method estimates how much of each type lies under each spot. The result is a map of cell types across the section, at the resolution of the spots.

Spatial methods have pitfalls of their own.

  • Cell boundaries. Imaging methods must decide which cell each molecule belongs to, a step called segmentation, usually from a stain of the nuclei and sometimes the membranes. In packed tissue, cells overlap and boundaries are guessed, so molecules from one cell can be counted in its neighbour. A T cell that seems to express a tumour gene may simply be pressed against a tumour cell.
  • The panel limits discovery. An imaging method can find only the genes chosen before the experiment. A cell type whose markers are not on the panel will be missed or mislabelled.
  • A section is thin and small. Sections are typically about 5 to 10 µm thick and a few millimetres across. Many cells are cut through rather than captured whole, and one section shows one region of what may be a very varied tissue. Conclusions about a whole tumour need several regions, or several patients.
  • Neighbours are not independent. Nearby spots and cells resemble each other partly because they share an environment. Statistics that treat every spot as an independent sample overstate certainty, the same mistake as treating cells as replicates.
  • Tissue handling. RNA in tissue degrades. How the sample was preserved, frozen or fixed in formalin and embedded in wax as most hospital samples are, decides which methods will work and how good the data will be.
Single-cell and spatial biology · LSMA free course Left: a patch of tissue with a 55 micrometre spot drawn over it; the spot covers several cells of different types and measures them together. Right: the same patch imaged, with individual molecules shown as dots inside individual cells. 1 · SPOT-BASED 2 · IMAGING-BASED the spot measures the cells under it together each molecule is placed in its own cell spot, 55 µm across tumour immune other
The same patch of tissue read two ways. The dashed spot on the left returns one combined measurement for the handful of tumour, immune and other cells beneath it; on the right, each dot is one detected molecule, assigned to the cell it sits in. Cell colours are for illustration. Schematic, not to scale.
Go deeper: what a 55 µm spot really covers

A worked number makes the trade-off concrete. A spot 55 µm across has an area of about 3.14 × 27.5 × 27.5 ≈ 2,400 µm². A cell 15 µm across, cut through its middle, covers about 180 µm². Even perfectly packed, a spot can hold only a dozen or so cell slices, and in practice usually somewhere between one and ten.

The spots are also not touching. On standard Visium slides their centres are 100 µm apart, so each spot sits in a patch of about 8,700 µm² of tissue. Only around a quarter of the section lies on a spot at all; the rest is never measured. Newer versions shrink the capture area to squares of a few micrometres, closing the gaps, but each square then holds very few molecules, the same sparsity problem single-cell data has.

Key point

Choose the method by the question. Hundreds of patients and a robust signal: bulk. Which cells, and which states: single-cell. Which neighbours: spatial.

Try it on three questions about one cancer type. "Does high expression of a gene predict survival?" needs many patients with outcome data: bulk. "Which cells make that gene, and are there rare cells that resist treatment?" needs every cell seen separately: single-cell. "Do T cells sit next to the cancer cells, or are they kept at the edge?" needs positions: spatial. Many studies combine them, using single-cell data to define cell types and spatial data to place them.

Further reading · Module 1Sources for this module and the rest of the course are gathered on one page. · All reading for this course

Check your understanding

1. What does a cell barcode do?

2. A bulk immune gene doubles between two tumours. What else could explain it?

3. A 55 µm Visium spot usually contains:

Up next

Lesson 9

Proteomics and metabolomics

Ask BioTutor

Create a free website with Framer, the website builder loved by startups, designers and agencies.