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 3.6.1 (2019-07-05)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.3 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.10-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.10-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.6.0          SingleCellExperiment_1.8.0 
##  [3] SummarizedExperiment_1.16.0 DelayedArray_0.12.0        
##  [5] BiocParallel_1.20.0         matrixStats_0.55.0         
##  [7] Biobase_2.46.0              GenomicRanges_1.38.0       
##  [9] GenomeInfoDb_1.22.0         IRanges_2.20.0             
## [11] S4Vectors_0.24.0            BiocGenerics_0.32.0        
## [13] BiocStyle_2.14.0           
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.2             knitr_1.25             XVector_0.26.0        
##  [4] magrittr_1.5           zlibbioc_1.32.0        lattice_0.20-38       
##  [7] rlang_0.4.1            GSVAdata_1.21.0        stringr_1.4.0         
## [10] tools_3.6.1            grid_3.6.1             xfun_0.10             
## [13] htmltools_0.4.0        yaml_2.2.0             digest_0.6.22         
## [16] bookdown_0.14          Matrix_1.2-17          GenomeInfoDbData_1.2.2
## [19] BiocManager_1.30.9     bitops_1.0-6           RCurl_1.95-4.12       
## [22] evaluate_0.14          rmarkdown_1.16         stringi_1.4.3         
## [25] compiler_3.6.1