Pen and paper. The recurring question is the one from the lectures: where does the compartment barcode enter the molecule, and what can go wrong between there and the sequencer?
Part 1 — Plates, droplets and microwells
E1. What the loading rate costs the experiment
A run of 100,000 droplets can be loaded at 0.1 or at 0.3 cells per droplet. The Poisson arithmetic is worked in the compartments unit; take its results. At 0.1: 90,484 droplets empty, 9,048 with one cell, 468 with two or more. At 0.3: 74,082 empty, 22,224 with one cell, 3,694 with two or more.
- How many barcodes are called as cells at each setting, and what fraction of those is a doublet?
- One doublet of a T cell and a monocyte survives into the analysis unflagged. What does it look like after clustering, and why is that a worse outcome than losing the cell altogether?
- Two things in these decks find such doublets. Name them, and say which works only between samples.
At 0.1: 9,048 + 468 = 9,516 occupied barcodes, of which 468 / 9,516 = 4.9% hold two cells or more. At 0.3: 25,918 occupied barcodes and 14.3% doublets. The higher rate returns 2.5 times as many cells from the same run at three times the doublet fraction.
It carries the markers of both cells and falls between the two clusters, so it reads as an intermediate or transitional state — a cell type that does not exist. A lost cell costs statistical power; an unflagged doublet produces a positive result that the rest of the analysis cannot distinguish from biology.
A barnyard experiment, which measures the rate rather than flagging individual cells and needs two species mixed; and cell hashing, which flags the individual doublet but only when its two cells came from different samples.
E2. The UMI in the bead oligo
The 10x 3’ v3 bead oligo carries a 16-nt cell barcode and a 12-nt UMI, which is what makes Read 1 about 28 cycles. A very abundant gene has 5,000 mRNA molecules in one cell. With N possible UMIs and n molecules the expected number of distinct UMIs is N (1 - exp(-n / N)).
- Compute the undercount for the 12-nt UMI of the kit, and for an 8-nt UMI.
- A UMI has to be unique only within one cell and one gene, not across the whole library. Why does that make 12 nt generous, and what sets the length instead?
A UMI of length L has 4^L values. For small n / N, N (1 - exp(-n / N)) is close to n - n^2 / (2N). The general question of UMI length is worked in the barcodes-and-UMIs unit.
12 nt: N = 4^12 = 16,777,216 and n / N = 2.98 x 10^-4, so the expected number of distinct UMIs is about 4,999 — under one molecule lost, 0.015%. 8 nt: N = 4^8 = 65,536 and n / N = 0.0763, so 65,536 x (1 - 0.9265) = 4,814 distinct UMIs, an undercount of 3.7%, and it falls on the most abundant genes, where the counts would otherwise be the most precise.
Collisions are counted per cell and per gene, where n is a few thousand at most, not over the millions of molecules in the pooled library, so the space is far larger than the use needs. What limits the length is the cycles it takes out of Read 1 and the chance of a sequencing error inside the UMI, since an error splits one molecule into two apparent ones unless the UMIs are collapsed.
E3. Why the bead whitelist must be sparse
The barcode on the bead is drawn from a whitelist the manufacturer designed. Consider a lab making its own beads: cell barcodes are 12 nt long, so a read barcode with one error has 12 x 3 = 36 possible one-mismatch neighbours, and the whitelist is one million 12-mers picked at random.
- How many of the 36 neighbours would you expect to be on the whitelist?
- What does this do to the correction rule the deck states — a barcode one mismatch from exactly one whitelist entry is corrected to it, two equally close entries and the read is dropped?
- How does the situation change for the 16-nt barcodes the kit uses?
Distances, correction and the barcode-set design behind them are the barcodes-and-UMIs unit; here the question is what the bead whitelist has to look like for that correction to be usable.
There are 4^12 = 16,777,216 possible 12-mers, so a fraction of 1,000,000 / 16,777,216 = 0.06 is on the whitelist, and 36 x 0.06 = 2.1 neighbours are expected.
The rule almost never fires: a corrupted barcode usually has more than one plausible origin, so it is dropped, and a real barcode corrupted into another valid entry is silently assigned to the wrong cell. Many reads are lost and some are misassigned, and the misassigned ones move transcripts between cells.
With 16 nt the space is 4^16 = 4.3 x 10^9, and a million entries fill 2.3 x 10^-4 of it: 48 neighbours x 2.3 x 10^-4 = 0.011 expected on the whitelist. Almost every one-mismatch barcode has a single possible origin, so the correction rule recovers most of the damaged reads. Kit whitelists are additionally designed with a minimum distance between entries rather than drawn at random, which removes the remaining ambiguous pairs.
E4. Pick the protocol
For each project, say which family of protocol you would use and what decides.
- 60 human cells, picked by FACS, from a rare population; you need splice isoforms.
- PBMC from 12 patients, about 5,000 cells each, with the goal of finding which cell types change.
- Frozen human brain biopsies, where whole cells cannot be recovered.
A plate-based full-length protocol (SMART-seq2 or 3). Cell number is small, so cost per cell is acceptable, and isoforms need reads across the whole transcript, which a 3’ tag cannot give.
A droplet 3’ protocol, with hashing to pool the 12 samples in a few lanes. Many cells are needed, and a 3’ tag is enough to identify cell types and states; hashing removes batch effects and flags doublets.
Nuclei from frozen tissue, in a droplet or combinatorial protocol. Whole cells would not survive, and nuclei hold the RNA needed. More of the reads are intronic, and those reads are counted only against a reference that includes introns.
E5. Diagnose from a barcode rank plot
A droplet run gives 10^6 barcodes. About 6,000 have more than 5,000 UMIs; the rest follow a tail below 100. After clustering, a red-blood-cell gene (haemoglobin) is present at a low level in every cluster.
- What are the many low-count barcodes?
- What explains the haemoglobin signal in cell types that do not make it?
- What can you do?
Droplets with no cell, which captured free RNA. The plateau is the cells; the tail is empty droplets.
Ambient RNA: haemoglobin mRNA released by lysed red blood cells is in the suspension and is captured in every droplet, including those with other cells.
Ambient RNA falls when the cells are washed and viability is kept high before loading, since it comes from cells that broke. The ambient profile can also be estimated from the empty droplets and subtracted computationally (SoupX does this). What remains is a limit on interpretation: a gene that is abundant in the suspension cannot be called expressed in another cell type from these data alone.
E6. One fragment out of five
Follow the 10x trace past the droplet. The pooled cDNA is amplified off its two handles, then fragmented, end-repaired and A-tailed, the Read 2 adapter is ligated, and index PCR adds the sample index with P5 and P7.
- A 2-kb cDNA fragmented to about 400 bp gives roughly five pieces. Which of them can become a library molecule, and what happens to the other four?
- Read 1 is about 28 cycles. What is in them, and what is lost if it is shortened to 16?
- Fragmenting cuts the molecule into pieces long after the cells were pooled, yet the link between a read and its cell survives. Why?
Index PCR needs one primer site at each end. Ask which ends each piece has after ligation, and where on the original cDNA the cell barcode sits.
Only the piece that still holds the poly(dT) end of the cDNA, because that is where the cell barcode and the Read 1 primer site are. Ligation gives it a Read 2 adapter at its cut end, so index PCR has a site at each end and completes it. The four internal pieces have the ligated adapter at both ends and no Read 1 site, so the index PCR cannot complete them; they would also carry no cell barcode and so could not be assigned to a cell in any case. This is why a 3’ library has coverage at one end of the transcript and not along it.
The 16-nt cell barcode and the 12-nt UMI, in that order. At 16 cycles the read identifies the cell but not the molecule, so PCR duplicates cannot be collapsed and the counts become read counts.
Because the barcode is inside the molecule, covalently attached in the droplet before the oil was broken. Everything after that — bulk amplification, fragmentation, ligation, indexing — carries it along, and nothing has to keep the molecules of one cell physically apart any more.
Part 2 — Combinatorial indexing and multimodal assays
E7. What a collision does to the data
A split-pool experiment uses three rounds of 96 wells, so B = 96^3 = 884,736 paths. The collision arithmetic is worked in the compartments unit; use its result, that the chance a given cell shares its path with another is 1 - exp(-n / B).
- 50,000 cells are loaded. What fraction share a path, and what does one of those shared barcodes look like in the count matrix?
- A collision is not a droplet doublet, although it looks like one. Which part of the experiment sets each of the two?
- The SPLiT-seq trace has two ways of enlarging the barcode space. Name them and say what each costs.
1 - exp(-50,000 / 884,736) = 1 - exp(-0.0565) = 5.5%. The shared barcode holds the molecules of two cells, so in the matrix it is one cell with roughly twice the UMIs and the markers of both; if the two cells are of the same type it is simply an unusually deep cell and nothing marks it at all.
The doublet rate is set by how many cells share a physical compartment, so by the loading rate of the device. The collision rate is set by how many cells are drawn from the same finite set of barcode paths, so by the number of cells against the number of paths. Loading fewer cells is the only lever that works on both.
More wells per round: 384 instead of 96 gives B = 384^3 = 56.6 million, and at 100,000 cells the collision rate is 1 - exp(-100,000 / 56.6 x 10^6) = 0.18%. The cost is four times the oligos and the plate handling in every round. The other is the sublibrary index added in the PCR of each aliquot, which multiplies the space by the number of aliquots with no further splitting of cells, and at the same time raises the number of samples that can be run together; the cost is that the aliquots are separate PCRs and separate libraries.
E8. Reading a barnyard plot
A mixed human and mouse experiment gives 1,000 called cells: 470 with only human reads, 470 with only mouse reads and 60 with reads from both.
- What is the observed mixed rate?
- Estimate the real collision rate, and say what assumption you make.
60 / 1,000 = 6%.
If the two species were mixed in equal proportions, a collision between two cells is mixed in half of the cases (one human and one mouse) and same-species in the other half, so the real rate is about twice the observed mixed rate: 12%. The assumptions are an equal mix and random collisions. If the mix is 4:1, the visible fraction is 2 x 0.2 x 0.8 = 32% of all collisions, and the correction is larger.
E9. Cell hashing and hidden doublets
Hashing itself is a block from the barcodes-and-UMIs unit, where the tags and the way a cell is called from them are taught. What matters here is what it buys an overloaded droplet run. Six samples of equal size are hashed and pooled, and the device is loaded hard enough that 10% of called cells are doublets.
- What fraction of the doublets can be identified from their hashtags?
- What fraction of all called cells remain as undetected doublets?
- Why is a run loaded that hard in the first place?
A doublet carries two tags. If the two cells came from different samples (5 of 6 cases, since the second cell is from the same sample with probability 1/6) the doublet has two tags and is identified: 5/6, or 83%.
The remaining 1/6 of the doublets have one tag, because both cells came from one sample: 10% x 1/6 = 1.7% of all called cells. More samples lower this fraction.
The cells recovered per run rise with the loading rate, and the doublets it creates are mostly between samples, which the tags find. The 1.7% that stay hidden is what the overloading costs, against the more than twice as many cells a harder loading returns from the same run.
E10. A trap: antibody oligos without a poly(A) tail
A lab orders antibody-oligo conjugates for a 3’ droplet kit, but the oligos have a PCR handle and a barcode and no poly(A) tail. Cells are stained and the run proceeds normally.
- What does the antibody library show?
- Name two design changes.
Almost no antibody counts, while the gene-expression library looks fine. The bead oligo captures by oligo(dT), and an oligo without poly(A) is not captured, so it is washed away.
Add a poly(A) tail to the antibody oligo (the original CITE-seq design); or use a capture sequence on the oligo that the bead in the kit carries (a feature-barcoding kit). The antibody library is also kept apart from the cDNA by size, and indexed separately.
E11. Why the 3’ library cannot read the receptor
A T-cell receptor beta mRNA has its CDR3 about 600 nt upstream of the poly(A) tail (assume 600 nt for this problem). A 3’ gene-expression library has Read 2 of 90 nt.
- How far does Read 2 get from the poly(A) tail, and how far short of the CDR3 is it?
- Describe a library that reads it, and which part of the existing barcoded cDNA it reuses.
Read 2 reads the 90 nt closest to the tail, so it falls about 510 nt short of the CDR3; the read lies in the constant region or the 3’ UTR.
Amplify the barcoded cDNA from the constant region with nested primers (one set for TCR, another for BCR), fragment, and sequence paired-end with enough read length to cover the junction. With 5’ capture the cell barcode is on the template-switch oligo, so it is next to the variable region; both chains of a cell then share one barcode, and alpha and beta are paired.
E12. Assigning guides to cells
A single-cell screen reads its guides by direct capture; the same counting problem arises with the CROP-seq route. The guide counts (UMIs) in three cells are: cell A has guide 1 with 35 and guide 2 with 3; cell B has guide 1 with 20 and guide 4 with 18; cell C has guide 2 with 1.
Assign each cell and say how you decide.
Cell A: guide 1. The 3 UMIs of guide 2 are most likely from ambient guide transcripts or PCR chimeras; set a rule such as a minimum count and a minimum share of the cell’s guide UMIs.
Cell B: two guides with similar counts. The cell has either two integrations or is a doublet. It cannot be assigned to one guide: it is either excluded or treated as a double perturbation, with the doublet score checked first. In a screen run at high multiplicity on purpose, that pair is the measurement.
Cell C: one UMI is too little to call. Leave it unassigned.
Thresholds are set from the distribution over all cells, not by eye, and the effect of each guide is judged against cells carrying non-targeting guides.
E13. A read budget with several libraries
An experiment profiles 10,000 cells with three libraries: gene expression at 20,000 reads per cell, antibody tags at 3,000 and V(D)J at 5,000.
- How many reads are needed in total, and in what proportions?
- Why is the antibody library a risk for the sequencing run if it is loaded alone?
28,000 reads per cell x 10,000 cells = 280 million reads: 71% for gene expression, 11% antibody tags and 18% V(D)J. The libraries are pooled by molarity in those proportions, since reads follow molarity.
The antibody library has a short barcode of the same few sequences at the same position in every read, so it has low diversity: the first cycles give a single colour and the run can fail the focus and base-calling. A common remedy is to mix it with other libraries or add PhiX.
Self-check
- Why must the cell barcode be attached before the cells or molecules are pooled?
- What is the compartment in plates, in droplets, in microwells and in split-pool methods?
- What does a UMI give you that a cell barcode does not?
- Why does a split-pool experiment load fewer cells than there are barcodes?
- How can antibodies, guide RNAs and receptor sequences all be read with a poly(A)-capture 3’ or 5’ library?
- Which step of a droplet method is done in bulk, and which must happen inside a droplet?
- When would you choose full-length SMART-seq over a 3’ tag?
- After pooling, a mixture of molecules cannot be traced back to its cell; only a tag attached beforehand can.
- A well; a droplet with a bead; a well with a bead; the fixed cell itself, with the path through wells as barcode.
- It tags each molecule, so PCR copies can be collapsed and molecules counted; the cell barcode only says which cell.
- Each cell draws a barcode path at random, and a path shared by two cells is a collision; the chance rises with n / B, so the cells must be fewer than the paths.
- Each is given a handle that the capture chemistry recognises: a poly(A) tail on the antibody oligo, a guide placed in or captured through a polyadenylated transcript, constant-region primers on the barcoded cDNA.
- The reverse transcription that attaches the barcode must happen inside the droplet; amplification, fragmentation and indexing are done in bulk after the emulsion is broken.
- When isoforms, splice junctions, variants or allelic information in a small number of selected cells are the question.