DecontX is a Bayesian method that estimates and removes contamination from ambient RNA in individual cells of droplet-based single-cell RNA-seq data. Since celda 1.29.1, DecontX is developed and documented in the standalone decontX Bioconductor package.
celda’s decontX(), decontXcounts(),
plotDecontXContamination(),
plotDecontXMarkerExpression(),
plotDecontXMarkerPercentage(), and
simulateContamination() are thin wrappers that pass their
arguments on to the decontX package. Code that calls them through celda
keeps working, as long as decontX is installed. New code can call the
decontX package directly.
Install decontX from Bioconductor:
The full tutorial, which decontaminates the 10X PBMC 4k dataset, is in the decontX vignette. Read it on the decontX Bioconductor page, or open it in R after installing decontX:
The decontX package also has a vignette for DecontPro, which decontaminates protein expression data from single cells.
To report a bug or ask a question about DecontX, use the decontX GitHub page at https://github.com/campbio/decontX.
## R version 4.6.1 (2026-06-24)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 26.04.1 LTS
##
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.32.so; LAPACK version 3.12.0
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## time zone: Etc/UTC
## tzcode source: system (glibc)
##
## attached base packages:
## [1] stats4 stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] celda_1.29.3 Matrix_1.7-6
## [3] SingleCellExperiment_1.35.2 SummarizedExperiment_1.43.0
## [5] Biobase_2.73.2 GenomicRanges_1.65.4
## [7] Seqinfo_1.3.2 IRanges_2.47.5
## [9] S4Vectors_0.51.10 BiocGenerics_0.59.12
## [11] generics_0.1.4 MatrixGenerics_1.25.0
## [13] matrixStats_1.5.0 BiocStyle_2.41.0
##
## loaded via a namespace (and not attached):
## [1] pROC_1.19.1 gridExtra_2.3.1 rlang_1.3.0
## [4] magrittr_2.0.5 clue_0.3-68 GetoptLong_1.1.1
## [7] otel_0.2.0 compiler_4.6.1 png_0.1-9
## [10] vctrs_0.7.3 reshape2_1.4.5 stringr_1.6.0
## [13] pkgconfig_2.0.3 shape_1.4.6.1 crayon_1.5.3
## [16] fastmap_1.2.0 magick_2.9.1 XVector_0.53.0
## [19] labeling_0.4.3 rmarkdown_2.32 xfun_0.61
## [22] WriteXLS_6.8.0 cachem_1.1.0 jsonlite_2.0.0
## [25] DelayedArray_0.39.8 irlba_2.4.1 parallel_4.6.1
## [28] cluster_2.1.8.3 R6_2.6.1 bslib_0.12.0
## [31] stringi_1.8.9 RColorBrewer_1.1-3 jquerylib_0.1.4
## [34] Rcpp_1.1.2 iterators_1.0.14 knitr_1.52
## [37] FNN_1.1.4.1 tidyselect_1.2.1 abind_1.4-8
## [40] yaml_2.3.12 viridis_0.6.5 enrichR_3.4
## [43] doParallel_1.0.17 codetools_0.2-20 curl_8.0.0
## [46] lattice_0.23-1 tibble_3.3.1 plyr_1.8.9
## [49] withr_3.0.3 S7_0.2.2 evaluate_1.0.5
## [52] Rtsne_0.17 RcppEigen_0.3.4.0.2 circlize_0.4.18
## [55] pillar_1.11.1 BiocManager_1.30.27 foreach_1.5.2
## [58] dbscan_1.2.7 ggplot2_4.0.3 scales_1.4.0
## [61] glue_1.8.1 maketools_1.3.2 tools_4.6.1
## [64] dendextend_1.19.1 sys_3.4.3 data.table_1.18.6.1
## [67] buildtools_1.0.0 grid_4.6.1 colorspace_2.1-4
## [70] cli_3.6.6 S4Arrays_1.13.2 viridisLite_0.4.3
## [73] ComplexHeatmap_2.29.0 ggdendro_0.2.0 dplyr_1.2.1
## [76] uwot_0.2.5 gtable_0.3.6 sass_0.4.10
## [79] digest_0.6.39 SparseArray_1.13.4 ggrepel_0.9.8
## [82] rjson_0.2.23 farver_2.1.2 htmltools_0.5.9
## [85] lifecycle_1.0.5 httr_1.4.9 GlobalOptions_0.1.4
## [88] MASS_7.3-66