Skip to content

04. From Sequencer Output to a Cell by Gene Matrix

Primary processing of single-cell RNA measurements joins two kinds of short sequence fragment, or read. One carries a cell address called a cell barcode and an original-molecule label called a unique molecular identifier (UMI). The other carries complementary DNA (cDNA), a DNA copy of RNA, that can be aligned to a gene. A FASTQ file stores each read sequence and its quality scores. Two FASTQ records from the same molecule are paired to form a feature-barcode count matrix. Here, a feature is a measured gene, a barcode is a candidate cell, and each value is the deduplicated number of RNA molecules.

Question for this lesson: How do cell-address and cDNA reads become gene counts for each cell?

Exact read lengths and barcode positions depend on the chemistry version, the laboratory specification used to build the collection of molecules prepared for sequencing, or library. When several libraries are sequenced together, a sample index is a separate address that identifies the source library. Alignment also requires a reference genome and Gene Transfer Format (GTF) annotation containing gene coordinates. The data roles remain stable.

inputinformation
Read 1 FASTQcell barcode + UMI
Read 2 FASTQcDNA copied from mRNA
sample indexsource library
reference genome + GTF gene annotationgenome sequence and gene coordinates

Each output cell is the number of original RNA molecules assigned to one gene in one candidate cell. Most genes are not detected in a given cell, so most values are 0 and the matrix is sparse.

The observed barcode is checked against the valid list for the chemistry. A mismatch may be corrected using base quality and a nearby valid barcode. Reads that cannot be assigned confidently are excluded.

The cDNA sequence is aligned to the reference genome and transcript annotation. Exon boundaries and splice junctions matter, as they do in bulk RNA-seq.

The alignment is compared with GTF annotation. Reads that overlap several genes ambiguously may be left out of confident counts.

Reads are grouped by cell barcode + gene + UMI. Copies created during polymerase chain reaction (PCR) amplification in the same group collapse to one count, and likely UMI sequencing errors can be corrected using sequence distance and read support.

5. Select barcodes associated with real cells

Section titled “5. Select barcodes associated with real cells”

A nonzero barcode is not necessarily a cell. An empty droplet can contain ambient RNA released from broken cells into the surrounding solution. Selecting barcodes that appear to contain captured cells from total UMI counts and expression profiles is called cell calling.

Keep matrices from before and after cell calling

Section titled “Keep matrices from before and after cell calling”

Cell Ranger reports a raw matrix before cell calling and a filtered matrix containing only candidate cells selected by cell calling.

outputincluded barcodes
raw feature-barcode matrixvalid barcodes with at least one read, including background
filtered feature-barcode matrixbarcodes called as cell-associated

The raw matrix supports ambient-RNA estimation and review of low-RNA cells that default calling may miss.

A 10x Matrix Exchange (MEX) matrix consists of three files.

filtered_feature_bc_matrix/
matrix.mtx.gz
features.tsv.gz
barcodes.tsv.gz
  • features.tsv.gz maps row numbers to feature IDs, names, and types.
  • barcodes.tsv.gz maps column numbers to barcode sequences.
  • matrix.mtx.gz stores only nonzero row, column, and UMI-count entries.

The 10x file has features in rows and barcodes in columns. AnnData, the data object used by the Python package Scanpy, typically exposes the same data as observations, cells, by variables, genes. Always name both axes instead of guessing from shape.

Cell Ranger is an implementation, not the concept

Section titled “Cell Ranger is an implementation, not the concept”

Cell Ranger is the official 10x Chromium pipeline. The v10.1 documentation checked in August 2026 covers barcode processing, alignment, UMI counting, and feature-barcode output.

Other implementations can produce the same data type. Reproducibility still requires the chemistry, pipeline version, genome and GTF version, cell-calling settings, UMI correction, and raw versus filtered output paths.

Primary analysis reads cell and molecule addresses, assigns cDNA reads to genes, collapses UMI groups, and calls cell-associated barcodes. The result is a raw matrix and a smaller filtered matrix.

Next, Filtering Empty Droplets and Low-Quality Cells inspects the evidence behind the word filtered.