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
- Integration
- 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
- Cluster marker gene identification with monocle
- Automated cell-type annotation with EWCE
- Cluster identity mapping against the Allen Human Brain Atlas
- Differential gene expression implementations
- Pathway and functional category enrichment analysis
- Interface to the Enrichr database with EnrichR
- Interface to the WebGestalt tool with WebGestaltR
- 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
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("neurogenomics/scFlow")
If using linux system, open a cmd terminal and run the following commands:
docker pull nfancy/scflow
docker run --rm -d \
-v $HOME:/home/rstudio/home \
-e ROOT=true \
-e PASSWORD=password \
-p 8950:8787 \
nfancy/scflow
Then access the RStudio Server on your browser at IP:8950. The default
username is rstudio
and password is password
. To understand more on
how to run docker Rstudio follow the link
here.
- 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.
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.