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

Note: Some package dependencies require Bioconductor v3.6, https://bioconductor.org/install/

singleCellTK is under development. You can install the development version from github:

# install.packages("devtools")
devtools::install_github("compbiomed/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:

source("https://bioconductor.org/biocLite.R")
biocVersion()

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

biocLite("BiocUpgrade")

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

biocValid()

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

biocLite()

Then, try to install the toolkit again:

devtools::install_github("compbiomed/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.5.0 (2018-04-23)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 16.04.4 LTS
## 
## Matrix products: default
## BLAS: /home/biocbuild/bbs-3.7-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.7-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.0.3          SingleCellExperiment_1.2.0 
##  [3] SummarizedExperiment_1.10.1 DelayedArray_0.6.1         
##  [5] BiocParallel_1.14.1         matrixStats_0.53.1         
##  [7] Biobase_2.40.0              GenomicRanges_1.32.3       
##  [9] GenomeInfoDb_1.16.0         IRanges_2.14.10            
## [11] S4Vectors_0.18.3            BiocGenerics_0.26.0        
## [13] BiocStyle_2.8.2            
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_0.12.17           knitr_1.20             XVector_0.20.0        
##  [4] magrittr_1.5           zlibbioc_1.26.0        lattice_0.20-35       
##  [7] GSVAdata_1.16.0        stringr_1.3.1          tools_3.5.0           
## [10] grid_3.5.0             xfun_0.2               htmltools_0.3.6       
## [13] yaml_2.1.19            rprojroot_1.3-2        digest_0.6.15         
## [16] bookdown_0.7           Matrix_1.2-14          GenomeInfoDbData_1.1.0
## [19] bitops_1.0-6           RCurl_1.95-4.10        evaluate_0.10.1       
## [22] rmarkdown_1.10         stringi_1.2.3          compiler_3.5.0        
## [25] backports_1.1.2