SingCellaR provides a comprehensive set of R functions for analyzing single-cell RNA sequencing (scRNA-seq) data. The package includes functionalities for:

  • supporting the analysis of scRNA-seq datasets generated from different types of single-cell technologies (e.g., Chromium 10x Genomics, Smart-Seq2/3, and other drop-let-based technologies
  • supporting Target-Seq analysis that integrates both mutation information and RNA-seq from the same single cell
  • supporting multiple integrative approaches:

        Harmony,
        Seurat,
        Liger,
        Scanorama,
        Limma,
        and Combat

    SingCellaR facilitates downstream analyses for each type of data integration within the same object. The users can visualize the results such as UMAP, tSNE, and etc., from different integrative methods in a single platform.

  • supporting our developed integration method, namely “supervised harmony”. This method is used as an additional algorithm to integrate data that have similar cell types (e.g. CD34+Lin-) generated from different batches, donors, and conditions.
  • cluster identification, it supports clustering analyses both graph-based community detection and K-means clustering.
  • cell-type annotation, we developed the cell-type annotation system that helps to assign the cell types to identified clusters. This system produces the enrichment scores of possible cell types derived from multiple curated signature gene sets (the users can input their signature genes of interest), which can greatly help assign the cell types.
  • cellular trajectory analysis, SingCellaR incorporates cellular trajectory analysis based on Force-directed graph, KNN-graph, and Diffusion map. It provides the gene set scoring system that can be superimposed on top of the embedding to facilitate cell type and state annotation.
  • differential gene expression analysis, SingCellaR combines Wilcoxon test on the log-transformed, normalized UMIs to compare expression level and Fisher′s exact test that compares the expressing cell frequency for each gene as previously described (Giustacchini et al., Nature Medicine, 2017). P-values generated from both tests are then combined using Fisher’s method and are adjusted using the Benjamini-Hochberg (BH) correction.
  • gene set enrichment analysis, SingCellaR incorporates fGSEA https://bioconductor.org/packages/release/bioc/html/fgsea.html
    for the GSEA analysis
  • powerful visualization comprising:
  •    tSNE
       UMAP
       Force-directed graph
       KNN-graph visualization in both 2D and 3D
       Diffusion map
       Violin plot
       Bubble plot
       Heatmap
       
       Different types of plots can be visualized with different types of information:
       - Individual gene expression
       - Gene set score
       - AUCell score
       

Citation

If you use SingCellaR for your research, please cite our papers:

  1. G. Wang, W. X. Wen, A. J. Mead, Roy, A, B. Psaila, and S. Thongjuea (2022). Processing single-cell RNA-seq datasets using SingCellaR. STAR Protocols (doi.org/10.1016/j.xpro.2022.101266) https://www.sciencedirect.com/science/article/pii/S2666166722001460

  2. Roy, A., G. Wang, D. Iskander, S. O’Byrne, N. Elliott, J. O’Sullivan, G. Buck, E. F. Heuston, W. X. Wen, A. R. Meira, P.Hua, A. Karadimitris, A. J. Mead, D. M. Bodine, I. Roberts, B. Psaila and S. Thongjuea (2021). Transitions in lineage specification and gene regulatory networks in hematopoietic stem/progenitor cells over human development. Cell Reports 36(11).https://www.sciencedirect.com/science/article/pii/S2211124721011451

Getting started

Installation (in R >=4.2)

install.packages('devtools')
library(devtools)
install_github('supatt-lab/SingCellaR')

Installation of python packages in R environment

Here is an example to create an environment, install packages within it, then use the created environment from R:

library(reticulate)
#create a new environment 
conda_create("r-reticulate")

The reticulate will create the r-miniconda in your working environment (e.g., in /Users/supat/Library/r-miniconda/envs)

To install python library in R use:

>py_install("fa2")

More information can be found from https://rstudio.github.io/reticulate/articles/python_packages.html#conda-installation-1

To install Scanorama, the user has to run ‘pip’ command line in the created environment working directory e.g., in /Users/supat/Library/r-miniconda/envs

> cd /Users/supat/Library/r-miniconda/envs/r-reticulate

The standard ‘pip’ software using the command line below can be used :

> ./pip install scanorama

To install Scrublet, please see https://github.com/swolock/scrublet. The ‘pip’ command line can be used to install Scrublet, similar to the Scanorama installation.

> ./pip install scrublet

SingCellaR implemented c++ functions that need to be compiled. These functions built on RcppArmadillo, RcppAnnoy, and RcppParallel that require the c++ compilation.

For mac users, the compiler ‘Clang’ has to be installed https://clang.llvm.org/get_started.html

Install gfortran can be found here https://gcc.gnu.org/wiki/GFortranBinaries. Install Clang can be found here https://clang.llvm.org/get_started.html