knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of scpackages is to integrate different R packages to perform single cell RNA-seq analysis easily with minimum instructions. At present it is based on only Seurat
# install.packages("devtools") devtools::install_github("vondoRishi/scpackages")
This is a basic example which shows you how to solve a common problem:
library(scpackages) ## basic example code
In this example we use the 10x data dowloaded from here
First initialize and QC Seurat object with single command. This will also genarate QC plots
seurat_Obj <- read10XwithMarkergenes( tenxPath = "/tmp/filtered_gene_bc_matrices/mm10/", pMin.cells = 3, pMin.features = 20, markerGenes = NULL, projectName = "1k_Brain_E18_Mm", cellRangerAggregated = FALSE # If 10x data are aggrgated )
Now after inspecting the QC plots we want to keep good quality cells only. That can be done with following commands.
seurat_Obj <- filterSeurat(seurat_Obj, mito.range = c(0, 5), # Cells with mitochondrial genes 0-5% gene_range = c(1000,Inf) # Cells with more than 1000 genes )
The above commands can be run with different parameters or there could be several samples. It could be difficult to make separate markdown file for each object. Therefore we will use following command to genearate markdown notes about the above resuts and save "seurat_obj" for future use.
report_QC(obj_scRNA = seurat_Obj,title = "1k_Brain_E18_Mm")
This will generate 1k_Brain_E18_Mm_currentDate.nb.html report with all information and figures. Additionally, it will also save seurat_Obj asĀ 1k_Brain_E18_Mm_currentDate.rds for future use.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.