| sc_example | R Documentation |
A simulated scRNA-seq dataset generated using the splatter package and
clustered using the SC3 and Seurat packages.
sc_example
sc_example is a list holding a simulated scRNA-seq dataset. Items
in the list included the simulated counts, normalised log counts,
tSNE dimensionality reduction and cell assignments from SC3 and Seurat
clustering.
# Simulation
library("splatter") # Version 1.2.1
sim <- splatSimulate(batchCells = 200, nGenes = 10000,
group.prob = c(0.4, 0.2, 0.2, 0.15, 0.05),
de.prob = c(0.1, 0.2, 0.05, 0.1, 0.05),
method = "groups", seed = 1)
sim_counts <- counts(sim)[1:1000, ]
# SC3 Clustering
library("SC3") # Version 1.7.6
library("scater") # Version 1.6.2
sim_sc3 <- SingleCellExperiment(assays = list(counts = sim_counts))
rowData(sim_sc3)$feature_symbol <- rownames(sim_counts)
sim_sc3 <- normalise(sim_sc3)
sim_sc3 <- sc3(sim_sc3, ks = 1:8, biology = FALSE, n_cores = 1)
sim_sc3 <- runTSNE(sim_sc3)
# Seurat Clustering
library("Seurat") # Version 2.2.0
sim_seurat <- CreateSeuratObject(sim_counts)
sim_seurat <- NormalizeData(sim_seurat, display.progress = FALSE)
sim_seurat <- FindVariableGenes(sim_seurat, do.plot = FALSE,
display.progress = FALSE)
sim_seurat <- ScaleData(sim_seurat, display.progress = FALSE)
sim_seurat <- RunPCA(sim_seurat, do.print = FALSE)
sim_seurat <- FindClusters(sim_seurat, dims.use = 1:6,
resolution = seq(0, 1, 0.1),
print.output = FALSE)
sc_example <- list(counts = counts(sim_sc3),
logcounts = logcounts(sim_sc3),
tsne = reducedDim(sim_sc3),
sc3_clusters = as.data.frame(colData(sim_sc3)),
seurat_clusters = sim_seurat@meta.data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.