Contents

The Single Cell Toolkit (SCTK) is an interactive scRNA-Seq analysis package that allows a user to upload raw scRNA-Seq count matrices and perform downstream scRNA-Seq analysis interactively through a web interface, or through a set of R functions through the command line. The package is written in R with a graphical user interface (GUI) written in Shiny. Users can perform analysis with modules for filtering raw results, clustering, batch correction, differential expression, pathway enrichment, and scRNA-Seq study design, all in a simple to use point and click interface. The toolkit also supports command line data processing, and results can be loaded into the GUI for additional exploration and downstream analysis.

1 Installation

You can download the release version of the Single Cell Toolkit in Bioconductor v3.7:

if (!requireNamespace("BiocManager", quietly=TRUE))
    install.packages("BiocManager")
BiocManager::install("singleCellTK")

1.1 Troubleshooting Installation

For the majority of users, the commands above will install the latest version of the singleCellTK without any errors. Rarely, you may encounter an error due to previously installed versions of some packages that are required for the singleCellTK. If you encounter an error during installation, use the commands below to check the version of Bioconductor that is installed:

if (!requireNamespace("BiocManager", quietly=TRUE))
  install.packages("BiocManager")
BiocManager::version()

If the version number is not 3.7 or higher, you must upgrade Bioconductor to install the toolkit:

BiocManager::install()

After you install Bioconductor 3.7 or higher, you should be able to install the toolkit using BiocManager::install("singleCellTK"). If you still encounter an error, ensure your Bioconductor packages are up to date by running the following command.

BiocManager::valid()

If the command above does not return TRUE, run the following command to update your R packages:

BiocManager::install()

Then, try to install the toolkit again:

BiocManager::install("singleCellTK")

If you still encounter an error, please contact us and we’d be happy to help.

2 Data Structure

The Single Cell Toolkit uses a SingleCellExperiment object to store data matrices along with annotation information, metadata, and reduced dimensionality data (PCA, t-SNE, etc.).

3 Run the Shiny App

3.1 Example Data

Example data is available within the app. To get started, simply run the singleCellTK function:

library(singleCellTK)
singleCellTK()

3.2 Upload data directly through the shiny app

To upload count matrices and annotation information stored as text files, run the singleCellTK function:

library(singleCellTK)
singleCellTK()

Then, follow data upload instructions in the “Upload Tab” vignette.

3.3 Load data from a SingleCellExperiment object

3.3.1 Creating a SingleCellExperiment object

To create a SingleCellExperiment object, we have provided the createSCE() function:

library(singleCellTK)
data("mouseBrainSubsetSCE")
counts_mat <- assay(mouseBrainSubsetSCE, "counts")
sample_annot <- colData(mouseBrainSubsetSCE)
row_annot <- rowData(mouseBrainSubsetSCE)
newSCE <- createSCE(assayFile = counts_mat, annotFile = sample_annot, 
                    featureFile = row_annot, assayName = "counts",
                    inputDataFrames = TRUE, createLogCounts = TRUE)

3.3.2 Loading data stored in a SingleCellExperiment object

Once a SingleCellExperiment object is created, the object can be loaded directly from the R console:

singleCellTK(newSCE)

4 Vignettes

To help you get started with the SCTK, we have prepared several vignettes in two categories: interactive analysis and R console analysis.

Session info

## R version 4.0.0 (2020-04-24)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.4 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.11-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.11-bioc/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] parallel  stats4    stats     graphics  grDevices utils     datasets 
## [8] methods   base     
## 
## other attached packages:
##  [1] singleCellTK_1.8.0          SingleCellExperiment_1.10.0
##  [3] SummarizedExperiment_1.18.0 DelayedArray_0.14.0        
##  [5] matrixStats_0.56.0          Biobase_2.48.0             
##  [7] GenomicRanges_1.40.0        GenomeInfoDb_1.24.0        
##  [9] IRanges_2.22.0              S4Vectors_0.26.0           
## [11] BiocGenerics_0.34.0         BiocStyle_2.16.0           
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.4.6           knitr_1.28             XVector_0.28.0        
##  [4] magrittr_1.5           zlibbioc_1.34.0        lattice_0.20-41       
##  [7] rlang_0.4.5            GSVAdata_1.23.0        stringr_1.4.0         
## [10] tools_4.0.0            grid_4.0.0             xfun_0.13             
## [13] htmltools_0.4.0        yaml_2.2.1             digest_0.6.25         
## [16] bookdown_0.18          Matrix_1.2-18          GenomeInfoDbData_1.2.3
## [19] BiocManager_1.30.10    bitops_1.0-6           RCurl_1.98-1.2        
## [22] evaluate_0.14          rmarkdown_2.1          stringi_1.4.6         
## [25] compiler_4.0.0