Cell Ranger: from reads to a count matrix
Cell Ranger, the official 10x Genomics pipeline, turns the sequencer’s FASTQ files into a gene × cell count matrix and writes a one-page web_summary.html. This chapter is the bridge between bench and analysis: every number on that summary traces back to a bench step from the previous four chapters.
Four steps: barcodes, alignment, UMI counting, cell calling
cellranger count does four things in order:
- Barcode and UMI processing. It takes the barcode from Read 1 and matches it against the whitelist, correcting up to one mismatch; a UMI one base away from a more abundant UMI is treated as a sequencing error and merged.
- Alignment. STAR maps Read 2 to the reference genome, and the annotation decides whether it falls in an exon, an intron or between genes. Only reads that land on a single gene count as confidently mapped. From Cell Ranger 7, intronic reads are counted by default.
- UMI counting. For each barcode and gene it counts distinct UMIs, giving the raw matrix
raw_feature_bc_matrix. - Cell calling. It decides which barcodes are cells and writes the filtered matrix
filtered_feature_bc_matrix.
Cell calling: the barcode rank plot
Sort every barcode by its UMI count and plot it on log–log axes, and you get the barcode rank plot, or knee plot. The high plateau on the left is droplets with cells; the long tail after the drop is empty droplets holding only ambient RNA.
Recent Cell Ranger versions first take the clearly high-UMI barcodes, then test lower-UMI barcodes with an EmptyDrops-like method: if a barcode’s profile differs clearly from the ambient RNA, it is called a cell too. This keeps small, RNA-poor cells from being thrown away wholesale. Drag the threshold in the widget and see how hard the barcodes near the boundary are to call.
The metrics on the web summary
| Metric | Meaning | Traces back to |
|---|---|---|
| Estimated Number of Cells | Barcodes called as cells | Cells loaded × recovery; cell calling (ch. 2) |
| Mean Reads per Cell | Total reads ÷ estimated cells; includes reads outside cells | Depth allocation (ch. 4) |
| Median Genes per Cell | Median genes detected per cell | RNA content, capture, depth (ch. 3–4) |
| Median UMI Counts per Cell | Median total UMIs per cell | Same |
| Sequencing Saturation | Share of reads from already-seen molecules | Library complexity and depth (ch. 3–4) |
| Fraction Reads in Cells | Share of valid reads on cell barcodes | Ambient RNA, viability (ch. 1) |
| Valid Barcodes | Share of reads whose barcode matches the whitelist | Bead oligos, Read 1 quality (ch. 3) |
| Q30 Bases (Barcode / UMI / RNA Read) | Share of bases with quality ≥ 30 | The sequencing run (ch. 4) |
| Reads Mapped Confidently to Transcriptome | Share of reads mapping to a single gene | RNA quality, reference, intron setting |
Cell Ranger shows a warning at the top of the page when a metric crosses an internal threshold; for example, 10x expects Fraction Reads in Cells of roughly 70% or more and Valid Barcodes of roughly 75% or more. Thresholds can change between versions, so check the documentation.
Read the metrics together:
- Low Fraction Reads in Cells, many cells, few genes per cell: lots of ambient RNA, and some empty droplets may have been called as cells.
- Low saturation, few genes: not sequenced deeply enough; more sequencing helps.
- High saturation, still few genes: the library lacks complexity (poor capture or reverse transcription); more sequencing will not help much.
The pbmc3k example used v1 chemistry and a very early Cell Ranger (the dataset page lists 1.1.0), whose cell-calling algorithm differs from today’s.
Common pitfalls
- Looking only at the cell count. A count on target can mean empty droplets were called as cells; check the curve and Fraction Reads in Cells as well.
- Comparing metrics across versions. Chemistry and Cell Ranger version (for example, whether introns are counted) both change the numbers.
- Treating a warning as a verdict. A warning tells you to find the cause; it does not make the data unusable. And no warning does not mean no problem.