knitr::opts_chunk$set(tidy = FALSE, cache = FALSE, dev = "png", message = FALSE, error = FALSE, warning = TRUE)
RCSL
is an R toolkit for single-cell clustering and trajectory analysis using single-cell RNA-seq data.
RCSL
can be installed directly from GitHub with 'devtools'.
library(devtools) devtools::install_github("QinglinMei/RCSL")
Now we can load RCSL
. We also load the SingleCellExperiment
, ggplot2
and igraph
package.
library(RCSL) library(SingleCellExperiment) library(ggplot2) library(igraph) library(umap)
We illustrate the usage of RCSL on a human preimplantation embryos and embryonic stem cells(Yan et al., (2013)). The yan data is distributed together with the RCSL package, with 90 cells and 20,214 genes:
data(yan, package = "RCSL") head(ann) yan[1:3, 1:3] origData <- yan label <- ann$cell_type1
In practice, we find it always beneficial to pre-process single-cell RNA-seq datasets, including: 1. Log transformation. 2. Gene filter
data <- log2(as.matrix(origData) + 1) gfData <- GenesFilter(data)
resSimS <- SimS(gfData)
Estimated_C <- EstClusters(resSimS$drData,resSimS$S)
resBDSM <- BDSM(resSimS$S, Estimated_C)
ARI_RCSL <- igraph::compare(resBDSM$y, label, method = "adjusted.rand")
DataName <- "Yan" res_TrajecAnalysis <- TrajectoryAnalysis(gfData, resSimS$drData, resSimS$S, clustRes = resBDSM$y, TrueLabel = label, startPoint = 1, dataName = DataName)
res_TrajecAnalysis$MSTPlot
res_TrajecAnalysis$PseudoTimePlot
res_TrajecAnalysis$TrajectoryPlot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.