Provides additional functions for Seurat v3
- Pipeline tools
- Diffusionmap
- Slingshot
- Ligand-Receptor Analysis
devtools::install_github('chris-mcginnis-ucsf/DoubletFinder')
devtools::install_github("jokergoo/ComplexHeatmap")
install.packages(c("NMF","data.table","broom","quantreg","gam","parallelDist"))
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("kstreet13/slingshot")
BiocManager::install(c("destiny","scds","Biobase"))
devtools::install_github('Morriseylab/scExtras')
Read in 10x files, this can be H5 files or directories containg the mtx, barcode and gene files. Doublet detection is performed using scds and DoubletFinder
input10x <- c('Rep1.H5','Rep2.H5')
outdir<-'Seurat'
qcdir <- paste0(outdir,'/QC')
org<-'human'
projectname<- 'HumanLung1'
scrna= RunQC(dir=outdir,org=org,name=projectname,files=input10x ,filter=T, doubletdetection = T,UpperMitoCutoff=10)
Normalize data and scale data, cscale=T will regress out cell cycle effects and sc.transform will use SCTransform
scrna = processExper(scrna ,ccscale = T, sc.transform = T)
Perform PCA and save plots in QC dir.
scrna= PCATools(scrna, npcs=30, jackstraw=F, plotdir = qcdir)
Perform Louvain Clustering and UMAP redcution
scrna <- ClusterDR(scrna,dims=1:npcs,n.neighbors =k)
Seruat v3 removed the Diffusionmap dimension reduction routine.
scrna <- RunDiffusion(scrna, dims=1:20)
scrna <- runSlingshot(mes,reduction='umap',approx_points = 200,extend= "n",stretch=0)
lineageDimPlot(scrna,reduction = "umap",group.by = "var_cluster",lineage = "all")
scrna <- RunLigRec(scrna,org=org)