nf-core pipeline · clustering, dimensionality-reduction, integration
nf-core/scdownstream
A Nextflow pipeline for quality control, batch integration, clustering, and analysis of single-cell RNA-seq data.
What nf-core/scdownstream is
nf-core/scdownstream is a bioinformatics pipeline designed to process already quantified single-cell RNA sequencing datasets. Originally developed by Nico Trummer with community contributors, the pipeline synthesises ideas and implementations from earlier single-cell workflows including panpipes, scFlow, scRAFIKI, and YASCP.
The workflow takes pre-computed count matrices and guides them through essential downstream steps: droplet filtering, ambient RNA removal, doublet detection, sample aggregation, batch correction, cell type annotation, and clustering. It produces unified, integrated datasets alongside quality control reports, facilitating reproducible exploratory analysis across diverse single-cell cohorts.
What the pipeline does
The pipeline starts with per-sample preprocessing of count matrices supplied as H5AD, H5, RDS, or CSV files. If raw droplets are provided, it can filter matrices using CellBender or EmptyDrops, remove ambient RNA using DecontX, SoupX, CellBender, or scAR, and flag doublets using SOLO, Scrublet, DoubletDetection, or scDblFinder (with an optional majority-vote consensus). Cells are also assigned cell cycle scores based on the Tirosh et al. method, and sample-level quality metrics are compiled into MultiQC.
Individual samples are merged into an AnnData H5AD object for batch integration, supporting algorithms such as scVI, scANVI, Symphony/Harmony, BBKNN, Scanorama, ComBat, Seurat, PCA, scimilarity, and Expimap, with optional integration benchmarking via scib-metrics. The integrated data undergo cell type annotation (using CellTypist, SingleR, Pan-human Azimuth, or CyteType), Leiden clustering, UMAP or t-SNE projection, PAGA trajectory connectivity, differential gene testing (via Scanpy rank_genes_groups, pseudobulk decoupler aggregation, PyDESeq2, or edgePython), and cell-cell communication analysis via LIANA+ or Tensor-cell2cell. Final outputs include integrated H5AD files, optional SingleCellExperiment RDS or CELLxGENE-compatible H5AD exports, and Quarto reports.
Key facts
- Original author
- Nico Trummer
- Input formats
- H5AD, H5, RDS (SingleCellExperiment or Seurat), CSV
- Output formats
- H5AD, SingleCellExperiment RDS (optional), CELLxGENE H5AD (optional), MultiQC and Quarto reports
- Workflow manager
- Nextflow
- Clustering algorithm
- Leiden
- Dimensionality reduction
- PCA, UMAP, t-SNE
What you can use it for
- Doublet detection and ambient RNA removal
- Clean raw or filtered single-cell count matrices by decontaminating ambient background RNA and removing doublets using consensus or individual statistical models.
- Batch integration and benchmarking
- Merge multi-sample single-cell cohorts and correct for technical batch effects across models like scVI, Harmony, or BBKNN, evaluating performance via scib-metrics.
- Automated cell type annotation
- Assign cell identities across integrated datasets using reference-based classifiers including CellTypist, SingleR, Pan-human Azimuth, and CyteType.
- Pseudobulk differential expression
- Aggregate cells into pseudobulk profiles using decoupler to perform group-level differential expression analysis with PyDESeq2 or edgePython.
- Cell-cell communication inference
- Infer ligand-receptor interactions across cell clusters using LIANA+ or Tensor-cell2cell.
Run it here
The research agent runs nf-core/scdownstream with Nextflow on its own machine — up to 32 cores, 256 GiB of memory and 24 hours per run, which covers the test profile and real single-sample runs. It builds the samplesheet, checks it against the pipeline's schema and reads the results back. When a run is too big for one machine, it gives you the exact command for your own cluster instead.
Strengths and limits
Good at
- Supports multiple methods for ambient RNA cleaning and doublet detection, including a majority-vote option across doublet callers.
- Provides a broad selection of batch integration algorithms alongside built-in scib-metrics benchmarking.
- Enables downstream differential expression testing through single-cell rank tests or pseudobulk aggregation with PyDESeq2 and edgePython.
- Exports analysis-ready objects into either Python-centric AnnData H5AD or R-centric SingleCellExperiment RDS formats, as well as CELLxGENE-ready files.
Watch out for
- Operates exclusively on pre-quantified gene expression matrices and does not process raw FASTQ sequencing reads.
- SoupX ambient RNA decontamination requires unfiltered droplet matrices and cannot run when only filtered matrices are supplied.
- Custom Nextflow configuration files passed via the -c flag cannot be used to modify pipeline parameters.
Questions
Can I run nf-core/scdownstream without my own cluster?
The research agent runs nf-core/scdownstream with Nextflow on its own machine — up to 32 cores, 256 GiB of memory and 24 hours per run, which covers the test profile and real single-sample runs. It builds the samplesheet, checks it against the pipeline's schema and reads the results back. When a run is too big for one machine, it gives you the exact command for your own cluster instead.
What licence is nf-core/scdownstream under?
MIT, like every nf-core pipeline.
What input formats are accepted by the pipeline?
The pipeline accepts count matrices formatted as H5AD, H5, RDS (SingleCellExperiment or Seurat objects), and CSV files with cell barcodes in the first column and genes as headers.
Can the pipeline process data if only filtered matrices are available?
Yes, but SoupX ambient correction requires unfiltered matrices; if only filtered matrices are supplied, ambient correction must either be set to DecontX or disabled.
Can the final results be loaded directly into R?
Yes, supplying the --tords flag converts the final integrated H5AD object into a SingleCellExperiment RDS file for R workflows.
How are cell doublets identified?
Doublets can be detected using SOLO, Scrublet, DoubletDetection, or scDblFinder, with the option to evaluate a majority vote across algorithms.
How to cite it
Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen. The nf-core framework for community-curated bioinformatics pipelines. Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x.
Written from nf-core/scdownstream's own README. Statements citing a figure that does not appear there are removed before publication. Licence and running details come from our registry.