liezeltamon/single-cell-preprocess
A Snakemake pipeline for processing 10X single-cell data
Overview
Latest release: None, Last update: 2026-05-16
Share link: https://snakemake.github.io/snakemake-workflow-catalog?wf=liezeltamon/single-cell-preprocess
Quality control: linting: failed formatting: failed
Deployment
Step 1: Install Snakemake and Snakedeploy
Snakemake and Snakedeploy are best installed via the Conda package manager. It is recommended to install conda via Miniforge. Run
conda create -c conda-forge -c bioconda -c nodefaults --name snakemake snakemake snakedeploy
to install both Snakemake and Snakedeploy in an isolated environment. For all following commands ensure that this environment is activated via
conda activate snakemake
For other installation methods, refer to the Snakemake and Snakedeploy documentation.
Step 2: Deploy workflow
With Snakemake and Snakedeploy installed, the workflow can be deployed as follows. First, create an appropriate project working directory on your system and enter it:
mkdir -p path/to/project-workdir
cd path/to/project-workdir
In all following steps, we will assume that you are inside of that directory. Then run
snakedeploy deploy-workflow https://github.com/liezeltamon/single-cell-preprocess . --tag None
Snakedeploy will create two folders, workflow and config. The former contains the deployment of the chosen workflow as a Snakemake module, the latter contains configuration files which will be modified in the next step in order to configure the workflow to your needs.
Step 3: Configure workflow
To configure the workflow, adapt config/config.yml to your needs following the instructions below.
Step 4: Run workflow
The deployment method is controlled using the --software-deployment-method (short --sdm) argument.
To run the workflow using apptainer/singularity, use
snakemake --cores all --sdm apptainer
To run the workflow using a combination of conda and apptainer/singularity for software deployment, use
snakemake --cores all --sdm conda apptainer
To run the workflow with automatic deployment of all required software via conda/mamba, use
snakemake --cores all --sdm conda
Snakemake will automatically detect the main Snakefile in the workflow subfolder and execute the workflow module that has been defined by the deployment in step 2.
For further options such as cluster and cloud execution, see the docs.
Step 5: Generate report
After finalizing your data analysis, you can automatically generate an interactive visual HTML report for inspection of results together with parameters and code inside of the browser using
snakemake --report report.zip
Configuration
The following section is imported from the workflow’s config/README.md.
Workflow overview
This workflow is a best-practice workflow for preprocessing multiplexed 10X single-cell RNA-seq data produced by the Cell Ranger multi pipeline.
The workflow is built using Snakemake and consists of the following steps:
Remove empty droplets from the raw feature-barcode matrix (
DropletUtils::emptyDrops)Demultiplex samples using HTO/hashtag oligonucleotide information (
cellhashR, consensus across 6 methods)Detect and flag doublets (
scDblFinder)Filter cells by conventional QC metrics using MAD-based outlier detection (
scuttle::isOutlier)Compute per-sample QC summary statistics and plots (
qc_sc_sample)Aggregate QC metrics across all samples and render cross-sample heatmaps (
qc_sc_aggregate)
Running the workflow
Input data
The workflow auto-detects samples as subdirectories of data/cellranger/.
Each sample must have a Cell Ranger multi output H5 matrix and an HTO-to-sample mapping file.
Input |
Path pattern |
Format |
|---|---|---|
Raw feature-barcode matrix |
|
10X HDF5; must contain Gene Expression and Multiplexing Capture experiments |
HTO-to-sample mapping |
|
Tab-separated; columns: |
Parameters
This table lists all parameters that can be set in config/config.yml.
Section |
Parameter |
Type |
Description |
Default |
|---|---|---|---|---|
empty_emptydrops |
||||
|
int |
Random seed for reproducibility |
|
|
|
int |
Number of cores for |
|
|
|
float |
FDR threshold for retaining barcodes as non-empty |
|
|
dehash_cellhashr |
||||
|
str |
10X Genomics chemistry version (e.g. |
|
|
|
list |
Demultiplexing algorithms to run; subset of |
all 6 methods |
|
doublet_scdblfinder |
||||
|
int |
Random seed for reproducibility |
|
|
|
int |
Number of cores for |
|
|
filter_conventional |
||||
|
str |
Column in barcode metadata used to group cells per sample for outlier detection |
|
|
|
int |
Number of MADs beyond which a cell is flagged as an outlier |
|
|
|
str |
Set of QC metric fields to use for outlier detection; |
|
|
qc_sc_sample |
||||
|
str |
Metadata column used to group cells when computing per-sample QC summaries |
|
|
qc_sc_aggregate |
||||
|
str |
Metadata column used to group cells when aggregating QC metrics across samples |
|
|
|
list |
Three colours defining the low / mid / high gradient of the QC heatmap |
|
|
|
int |
Font size used in the QC heatmap |
|
Linting and formatting
Linting results
1ModuleNotFoundError in file "/tmp/tmph0jzovlm/workflow/Snakefile", line 12:
2No module named 'utils'
3 File "/tmp/tmph0jzovlm/workflow/Snakefile", line 12, in <module>
Formatting results
1[DEBUG]
2[DEBUG] In file "/tmp/tmph0jzovlm/workflow/rules/qc_sc_sample.smk": Formatted content is different from original
3[DEBUG]
4[DEBUG] In file "/tmp/tmph0jzovlm/workflow/rules/empty_emptydrops.smk": Formatted content is different from original
5[DEBUG]
6[DEBUG] In file "/tmp/tmph0jzovlm/workflow/rules/doublet_scdblfinder.smk": Formatted content is different from original
7[DEBUG]
8[DEBUG] In file "/tmp/tmph0jzovlm/workflow/Snakefile": Formatted content is different from original
9[DEBUG]
10[DEBUG] In file "/tmp/tmph0jzovlm/workflow/rules/dehash_cellhashr.smk": Formatted content is different from original
11[DEBUG]
12[DEBUG] In file "/tmp/tmph0jzovlm/workflow/rules/qc_sc_aggregate.smk": Formatted content is different from original
13[DEBUG]
14[DEBUG] In file "/tmp/tmph0jzovlm/workflow/rules/filter_conventional.smk": Formatted content is different from original
15[INFO] 7 file(s) would be changed 😬
16
17snakefmt version: 0.11.5