Repository navigation
Home
Ambient RNA decontamination for single-cell and single-nucleus RNA-seq
Every droplet-based single-cell experiment contains RNA that did not come from the cell in the droplet. Cells that lyse during dissociation release transcripts into the suspension, and these free molecules are captured alongside every cell. This background, called ambient RNA or the soup, adds the expression of abundant cell types to every other cell. Marker genes then appear where they do not belong, rare populations look like mixtures, and differential expression can report the soup instead of biology.
Decant estimates how much of each cell's signal is ambient and removes it. It is designed around three principles:
- Measure the soup, do not guess it. The ambient profile is taken from the empty droplets of your own experiment.
- Never add counts. A corrected count is always between zero and the observed count, so the output can never contain signal that was not in the input.
- Every default is tested. Each component is enabled only after it passes a test against data with a known answer, and the results are reported whether they favour Decant or not.
Decant also provides contamination-aware differential expression, which models the soup inside the statistical test instead of removing it first.
This guide is written for anyone who analyses droplet-based single-cell data in R. If you can load a count matrix and run a Seurat workflow, you have everything you need. No knowledge of the statistics behind Decant is assumed; the concepts are introduced in Chapter 2.
The chapters follow the order of a typical analysis. Read Chapters 1 to 3 first; the remaining chapters can be read as needed.
| Chapter | Title | What you will learn |
|---|---|---|
| 1 | Installation | Installing Decant and its optional dependencies |
| 2 | Key Concepts | Ambient RNA, the soup, empty droplets and the contamination fraction |
| 3 | Quick Start | A complete analysis in ten lines of code |
| 4 | Preparing Your Data | Reading 10x output and separating cells from empty droplets |
| 5 | Running Decant | The decant() function, its arguments and its output |
| 6 | Seurat Integration | Correcting a Seurat object with RunDecant()
|
| 7 | Estimation and Correction | How contamination is estimated and removed, and how to choose a rule |
| 8 | Multi-Sample Experiments | One soup per sample, with information shared across samples |
| 9 | Differential Expression | Contamination-aware testing with ambient_de() and DecantDE()
|
| 10 | Splice-Aware and Genotype Modules | RNA velocity layers and genotype-based contamination estimates |
| 11 | Diagnostics and Troubleshooting | Reading warnings, checking results, and fixing common problems |
| 12 | Validation and Benchmarks | How Decant performs against other tools and against ground truth |
| 13 | Function Reference | Every exported function, grouped by task |
| 14 | Cell-Cell Communication | Ligand-receptor calls that discount ambient RNA; experimental |
- Code is shown in grey blocks and can be copied into an R session.
- Lines that begin with
#>show the output the code produces. They are not code. - Every code block is followed by a short explanation of what each line does.
- Examples use simulated data that ships with Decant, so every example runs
without downloading anything. Blocks that need your own files start with
the comment
# Requires your own data. - Matrices are always genes in rows and droplets (cells) in columns, the same orientation as Seurat and Cell Ranger.
- Function documentation:
?decant,?RunDecant,?ambient_de. - Questions and bug reports: GitHub issues.
Include the output of
sessionInfo()and, if possible, a small example that reproduces the problem.
If you use Decant in published work, please cite the package:
citation("Decant")Decant builds on ideas from earlier ambient RNA methods, in particular SoupX (Young & Behjati, 2020), DecontX (Yang et al., 2020) and CellBender (Fleming et al., 2023). Its ground-truth evaluation uses metrics and datasets described by Cargnelli et al. (2026), Segerstolpe et al. (2016) and Janssen et al. (2023).
Next: Chapter 1, Installation
Decant user guide · Repository · Report an issue · MIT License
Decant User Guide
- Preface
- 1. Installation
- 2. Key Concepts
- 3. Quick Start
- 4. Preparing Your Data
- 5. Running Decant
- 6. Seurat Integration
- 7. Estimation and Correction
- 8. Multi-Sample Experiments
- 9. Differential Expression
- 10. Splice-Aware and Genotype Modules
- 11. Diagnostics and Troubleshooting
- 12. Validation and Benchmarks
- 13. Function Reference
- 14. Cell-Cell Communication