knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) library(emo)
scrappy provides an easy way to visualize the quality of scRNA single-cells.
You can install the development version with:
# install.packages("remotes") remotes::install_github("darlanminussi/scrappy")
scrappy uses the percentage of mitochondrial gene expression to classify the cells as:
r emo::ji("smile")
: Great Quality.
r emo::ji("slightly_smiling_face")
: Good quality.
r emo::ji("nauseated")
: OK quality.
r emo::ji("poop")
: Low quality.
scrappy can be used on SingleCellExperiment objects as well as Seurat objects.
library(scRNAseq) sce <- ZeiselBrainData() # Quality control. library(scater) is.mito <- grepl("^mt-", rownames(sce)) table(is.mito) sce <- addPerCellQC(sce, subsets=list(Mito=is.mito)) # Normalization. sce <- logNormCounts(sce) # Feature selection. library(scran) dec <- modelGeneVar(sce) hvg <- getTopHVGs(dec, prop=0.1) # Dimensionality reduction. set.seed(1234) sce <- runPCA(sce, ncomponents=25, subset_row=hvg) sce <- runTSNE(sce, dimred = 'PCA', external_neighbors=TRUE)
sce
library(scrappy) scrappyPlot(sce, "TSNE")
PS: If you want to learn about QC metrics and how to filter your single-cell datasets follow this link.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.