Lesson · 40 min · Free
Cellranger Outputs: Matrices and QC Reports
Cellranger Outputs: Matrices and QC Reports After running cellranger count , the pipeline produces a structured output directory (typically named sample_name/outs/ ) containing everything needed for downstream single-cel
Cellranger Outputs: Matrices and QC Reports
After running cellranger count , the pipeline produces a structured output directory (typically named sample_name/outs/ ) containing everything needed for downstream single-cell analysis. Understanding these outputs is essential before loading data into tools like Seurat or Scanpy, because nearly every downstream workflow begins by reading one of these files. The most important output is the gene-barcode matrix , which stores the expression counts for every gene (row) across every cell barcode (column). Because most entries in this matrix are zero — a given cell expresses only a fraction of all genes — Cell Ranger stores it in Market Exchange Format (MEX) , a sparse matrix format. The matrix is split across three files in the filtered_feature_bc_matrix directory: matrix.mtx (the nonzero count values and their coordinates), barcodes.tsv (the list of cell-associated barcodes), and features.tsv (gene identifiers, names, and feature types). Cell Ranger also writes a raw_feature_bc_matrix , which includes barcodes from empty droplets; the filtered matrix, from which empty droplets have been removed by background modeling, is what you will normally use. Alongside the matrix, Cell Ranger generates an automated QC report ( web_summary.html ), an interactive HTML file that summarizes run quality. Key metrics include the estimated number of cells, the mean reads per cell, the sequencing saturation (how completely the transcriptome was sampled), the valid barcodes percentage, and the fraction of reads mapped confidently to the transcriptome. For a healthy 10x Genomics run, you generally expect valid barcodes above 95%, mapping rates above 70–90% depending on sample quality, and a cell-calling metric ( Cells ) consistent with the number of nuclei or cells loaded. Low mapping rates often indicate RNA degradation, while low saturation suggests under-sequencing. Reviewing web_summary.html before proceeding to analysis prevents wasted effort on poor-quality libraries. Explore the output directory structure with standard shell commands. The following example inspects a typical Cell Ranger output folder and previews the MEX files: # List the contents of the outs directory ls -lh pbmc3k/outs/ # Expected key outputs: # web_summary.html -> QC report (open in a browser) # filtered_feature_bc_matrix/ -> matrix for downstream analysis # aligned.bam -> read alignments # molecule_info.h5 -> molecule-level information # Inspect the sparse matrix files head -3 pbmc3k/outs/filtered_feature_bc_matrix/matrix.mtx head -3 pbmc3k/outs/filtered_feature_bc_matrix/features.tsv head -3 pbmc3k/outs/filtered_feature_bc_matrix/barcodes.tsv Once you have confirmed the files exist and the QC report looks acceptable, you can load the matrix into Python using Scanpy, which reads the MEX format directly and converts it into an annotated data object for analysis: import scanpy as sc # Read the filtered gene-barcode matrix produced by Cell Ranger adata = sc.read_10x_mtx( "pbmc3k/outs/filtered_feature_bc_matrix/", # path to MEX folder var_names="gene_symbols", # use gene names as variables cache=True # cache for faster reloads ) # Basic QC summary from the object print(adata) # n_obs = number of cells, n_vars = number of genes print(adata.obs.head()) # cell barcodes (observation metadata) The primary analysis-ready output is filtered_feature_bc_matrix , a sparse (MEX) matrix consisting of matrix.mtx , barcodes.tsv , and features.tsv . web_summary.html is the first file to check: it reports cell counts, reads per cell, sequencing saturation, barcode validity, and mapping rates. The raw matrix includes empty droplets; always use the filtered matrix for downstream analysis. Low mapping rates suggest degraded RNA; low saturation indicates the library was under-sequenced. Tools like Scanpy ( sc.read_10x_mtx ) and Seurat ( Read10X ) are designed to ingest these outputs directly. Practice exercise: Download the public 10x Genomics PBMC 3k dataset and run cellranger count on it (or use a pre-computed output provided by your instructor). Open web_summary.html in a browser and record the estimated number of cells, mean reads per cell, sequencing saturation, and fraction of valid barcodes. Then use ls and head to examine the three files in filtered_feature_bc_matrix , noting how many barcodes are listed and how the dimensions in matrix.mtx correspond to the gene and barcode counts. Finally, load the matrix with Scanpy and confirm that the number of observations in your AnnData object matches the cell count reported in the QC report.
Watch the full lesson — free
This topic is part of Computational Biomedicine: From Command Line to Single-Cell, a complete AI-narrated video course. Press play once and watch the entire lecture like a movie.
Start the course free →