Introduction

nf-core/scdownstream is a bioinformatics pipeline that can be used to process already quantified single-cell RNA-seq data. It takes a samplesheet and h5ad-, SingleCellExperiment/Seurat- or CSV files as input and performs quality control, integration, dimensionality reduction and clustering. It produces an integrated h5ad and SingleCellExperiment file and an extensive QC report.

The pipeline is based on the learnings and implementations from the following pipelines (alphabetical):

nf-core/scdownstream

Steps marked with the boat icon are not yet implemented. For the other steps, the pipeline uses the following tools:

  1. Per-sample preprocessing
    1. Convert all RDS files to h5ad format
    2. Create filtered matrix (if not provided)
    3. Present QC for raw counts (MultiQC)
    4. Remove ambient RNA
    5. Apply user-defined QC filters (can be defined per sample in the samplesheet)
    6. Doublet detection (Majority vote possible)
  2. Sample aggregation
    1. Merge into a single h5ad file
    2. Present QC for merged counts (MultiQC)
    3. Integration
  3. Cell type annotation
  4. Clustering and dimensionality reduction
    1. Leiden clustering
    2. UMAP
  5. Create report (MultiQC)

Usage

Note

If you are new to Nextflow and nf-core, please refer to this page on how to set-up Nextflow. Make sure to test your setup with -profile test before running the workflow on actual data.

Note

If you are confused by the terms filtered and unfiltered, please check out the respective documentation.

First, prepare a samplesheet with your input data that looks as follows:

samplesheet.csv
sample,unfiltered
sample1,/absolute/path/to/sample1.h5ad
sample2,/absolute/path/to/sample3.h5
sample3,relative/path/to/sample2.rds
sample4,/absolute/path/to/sample3.csv

Each entry represents a h5ad, h5, RDS or CSV file. RDS files may contain any object that can be converted to a SingleCellExperiment using the Seurat as.SingleCellExperiment function. CSV files should contain a matrix with genes as columns and cells as rows. The first column should contain cell names/barcodes.

—>

Now, you can run the pipeline using:

nextflow run nf-core/scdownstream \
   -profile <docker/singularity/.../institute> \
   --input samplesheet.csv \
   --outdir <OUTDIR>
Warning

Please provide pipeline parameters via the CLI or Nextflow -params-file option. Custom config files including those provided by the -c Nextflow option can be used to provide any configuration except for parameters; see docs.

For more details and further functionality, please refer to the usage documentation and the parameter documentation.

Pipeline output

To see the results of an example test run with a full size dataset refer to the results tab on the nf-core website pipeline page. For more details about the output files and reports, please refer to the output documentation.

Credits

nf-core/scdownstream was originally written by Nico Trummer.

We thank the following people for their extensive assistance in the development of this pipeline (alphabetical):

Contributions and Support

If you would like to contribute to this pipeline, please see the contributing guidelines.

For further information or help, don’t hesitate to get in touch on the Slack #scdownstream channel (you can join with this invite).

Citations

An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.

You can cite the nf-core publication as follows:

The nf-core framework for community-curated bioinformatics pipelines.

Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.

Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x.