Tutorials

Single-cell quality filters: cells, genes, mitochondrial reads

How to filter single-cell data using genes per cell, total counts, mitochondrial percentage, doublet scores and ambient RNA, with reproducible thresholds.

Quality filtering is the first decision that changes a single-cell dataset, and it is one of the few that cannot be undone. Remove too little and empty droplets, dying cells and doublets distort the clustering. Remove too much and rare populations disappear, or the remaining cells represent only the healthiest part of the tissue. There is no universal threshold that works for every experiment. This guide explains the metrics, how to choose cut-offs from the data, and what to record when you filter.

Why filtering is part of the analysis

A droplet-based experiment captures cells, free RNA and empty droplets in the same run. Cell calling separates barcodes that contain a cell from those that do not, but the boundary is not perfect. Some barcodes contain a damaged cell, some contain two cells, and some contain ambient RNA released by other cells. Each of these creates a profile that can look plausible in isolation.

Filtering is therefore not a cleanup step before the "real" analysis. It defines the population you will study. Two analysts can reach different biological conclusions from the same matrix if they filter differently, which is why the thresholds and the number of cells removed need to be reported.

The three numbers people start with

Most workflows calculate three per-cell metrics: the number of genes detected, the total count of molecules, and the percentage of counts that come from mitochondrial genes. These are useful starting points, not a complete quality assessment.

Genes detected per cell

The number of genes with at least one count reflects both the amount of RNA captured and the complexity of the cell. A very low number suggests an empty or damaged droplet, or a cell type with little cytoplasm. A very high number can suggest a doublet, especially if it is far above the rest of the sample.

Total counts per cell

Total counts correlate with genes detected but are affected by sequencing depth and by cell size. A low total can be a real small cell or a failed capture. A high total can be a large cell, a doublet or an unusually active cell. Neither metric is meaningful in isolation.

Mitochondrial percentage

Mitochondrial reads are common in compromised cells, because cytoplasmic RNA leaks out while mitochondria remain. A high mitochondrial fraction is therefore a warning sign. The baseline differs by tissue: heart and skeletal muscle are mitochondria-rich, and some cell types naturally have more mitochondrial transcripts. A threshold that works for blood may remove healthy cells from a muscle biopsy.

For human data, mitochondrial genes usually start with MT-; for mouse, mt-. Check the gene annotation rather than assuming.

Choosing thresholds from distributions

The usual mistake is to copy a threshold from a tutorial. Instead, look at the distributions. Plot each metric as a histogram or violin plot, per sample, and identify the tail that represents low-quality barcodes. The tail is often separated from the main population, but not always.

A reproducible approach is to flag outliers using the median absolute deviation (MAD) on log-transformed metrics, as recommended in the Orchestrating Single-Cell Analysis resource. A cell is kept if it lies within a chosen number of MADs of the median for each metric. This adapts to the sample instead of imposing a fixed number. It still requires a choice of stringency, and it still needs to be checked against biology.

Inspect the cells you are about to remove. Do they express markers of a cell type that is otherwise missing? Are they concentrated in one sample? If removed cells form a coherent biological group, the filter may be removing signal rather than noise.

Doublets

A doublet is a droplet containing two cells. Its profile is a mixture, so it can appear as an intermediate cluster or as a cluster with markers from two lineages. Doublet rates increase with the number of cells loaded, which is why detection should be run per sample before merging.

Scrublet, DoubletFinder and scDblFinder score cells by comparing their profiles with artificial doublets generated from the dataset. High-scoring cells are candidates for removal. The score is probabilistic, and the expected doublet rate is an estimate, so keep the scores and report the threshold used. Removing every cell above a score of 0.5 is common, but it is a convention, not a law.

Ambient RNA

Ambient RNA is free transcript from lysed cells that gets captured in other droplets. It adds a low background of genes that do not belong to the cell, and it is particularly misleading for markers of abundant cell types. SoupX and CellBender estimate and remove this background. Both make assumptions about the empty droplets or the contamination profile, so compare corrected and uncorrected results before deciding whether correction changes the biology.

What over-filtering costs

Aggressive filtering biases the dataset towards large, intact, transcriptionally active cells. That can remove neutrophils, stressed cells, rare progenitors or cells from a fragile tissue. It also changes cell type proportions, which matters if proportions are part of the question.

Under-filtering has its own cost: empty droplets add a cluster of low-count cells, doublets create fake intermediates, and dying cells can dominate the mitochondrial tail. The aim is a defensible middle, not the smallest possible dataset. For how filtering fits into the rest of the pipeline, see the Scanpy and Seurat workflow.

A practical Scanpy pass

The exact code depends on your version, but the sequence is usually:

python
import scanpy as sc

adata.var["mt"] = adata.var_names.str.startswith("MT-")
sc.pp.calculate_qc_metrics(adata, qc_vars=["mt"], inplace=True)

sc.pl.violin(adata, ["n_genes_by_counts", "total_counts", "pct_counts_mt"],
             jitter=0.4, multi_panel=True)
sc.pl.scatter(adata, "total_counts", "n_genes_by_counts", color="pct_counts_mt")

Look at the plots before writing any filter. Then apply thresholds, record how many cells and genes remain, and re-run the quality plots on the filtered object. Seurat has equivalent functions in PercentageFeatureSet and the nFeature_RNA and nCount_RNA columns.

Record what you removed

Write down the metrics used, the thresholds, the number of cells before and after each step, and the reason for the choice. Keep the unfiltered object or the list of removed barcodes so the decision can be reversed. If a reviewer asks why a cluster disappeared, you need to be able to show whether it was removed by the filter or changed by a later step.

Filtering is also a place where double dipping can occur: choosing thresholds after seeing which clusters you like. Decide the rule before looking at the biological result, and state it in the methods.

Key points

  • Filtering defines the population you study, so it belongs in the methods and the results.
  • Genes per cell, total counts and mitochondrial percentage are starting points, not a complete QC.
  • Mitochondrial baselines differ by tissue and cell type; do not copy a threshold from another experiment.
  • Distribution-based rules such as MAD outliers adapt better than fixed cut-offs, but still need biological checks.
  • Detect doublets per sample and keep the scores; ambient RNA correction is a separate decision.
  • Over-filtering removes rare and fragile populations and biases cell proportions.
  • Record thresholds, cell numbers and removed barcodes so the choice can be reviewed.

When to ask for help

If your QC plots show a tail you cannot interpret, or if filtering one sample removes a population that is present in the others, an analyst can compare the metrics with the experimental design before cells are discarded. You can order an analysis or discuss a project through our single-cell analysis service. The first-analysis walkthrough shows where filtering fits in the rest of the workflow.

Sources

When to ask for help. If your data or design do not fit a tutorial, order an analysis and we will reply with a fixed price.

Written by the Solagene team for research and education. Found an error? Tell us and we will correct it.