scFlow - Single-Cell Workflow
The scFlow R package provides the analytical back-end to the nf-core/scflow Nextflow pipeline for the orchestration of automated, scalable, and reproducible single-cell RNA sequencing analyses.
The scFlow R package is built to enable standardized workflows following best practices on top of popular single-cell R packages, including Seurat, Monocle, scater, emptyDrops, DoubletFinder, LIGER, and MAST (Hao 2021, Cao 2019, McCarthy 2017, Lun 2019, McGinnis 2019, Welch 2019). Common analytical tasks required by users that involve multiple tools can be performed in scFlow with a single command (i.e. a higher level of abstraction). Key plots, tables, and other analysis outputs are automatically generated, together with interactive HTML reports for each stage of the analysis. These reports provide informative summaries of analytical steps in ways that can highlight the impact of parameter choices and guide their revision when needed.
The following example illustrates a complete sample quality-control with default parameters using the scFlow R package, including ambient RNA profiling, gene/cell annotation, thresholding, doublet/multiplet removal, and generation of an interactive HTML report with key plots: -
sce <- read_sparse_matrix(matrix_path) %>% generate_sce(metadata) %>% find_cells() %>% annotate_sce() %>% filter_sce() %>% find_singlets() %>% filter_sce() %>% report_qc_sce()
Overview of scFlow features
- Quality control of gene-cell matrices
- Profiling of ambient RNA with emptyDrops
- Filtering of matrices by counts and features including optional adaptive filtering
- Filtering of mitochondrial and ribosomal genes and thresholding of counts
- Doublet and multiplet identification and removal with DoubletFinder
- Rich QC metrics annotation with scater
- Dimensionality reduction and Clustering
- Dimensionality reduction with tSNE and/or UMAP with/without integration
- Community detection with the Louvain or Leiden clustering algorithms using monocle
- Cell-type identification
- Differential gene expression implementations
- Pathway and functional category enrichment analysis
- Cell-type composition analysis
- Dirichlet modeling of differential cell-type composition using DirichletReg
- Publication quality plots and analysis reports
- Eight interactive HTML reports with key plots and algorithm performance metrics
Get Started and Documentation
Our primary documentation is at https://combiz.github.io/scflow-manual/.
You can install the development version of scFlow from GitHub with: -
# install.packages("devtools") devtools::install_github("combiz/scFlow")
An additional data package,
scFlowData, will be needed which contains
supplementary data required for gene annotation, cell type annotation,
and pathway analysis. Install that with: -
# install.packages("devtools") devtools::install_github("combiz/scFlowData")
- Ask a question on Stack Overflow with the scFlow tag, we monitor this for new questions.
- Discuss on the scFlow Slack team.
- Open bug reports and feature requests (not questions) on GitHub issues.
How to Contribute
Check the CONTRIBUTING page.
Combiz Khozoie, Nurun Fancy, Mahdi M. Marjaneh, Alan E. Murphy, Paul M. Matthews, Nathan Skene. “scFlow: A Scalable and Reproducible Analysis Pipeline for Single-Cell RNA Sequencing Data.” bioRxiv 2021 August 19. doi: 10.22541/au.162912533.38489960/v1.
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 Biotechnology (2020); doi: 10.1038/s41587-020-0439-x
Note: If you use scFlow in your GitHub projects, please add scFlow in the requirements.txt.