3 Integrated scRNA-seq pipeline
- Load the R packages.
# sc libraries
library(Seurat)
library(phateR)
library(DoubletFinder)
library(monocle)
library(slingshot)
library(GSVA)
library(limma)
library(plyr)
library(dplyr)
library(org.Mm.eg.db)
library(org.Hs.eg.db)
library(CellChat)
library(velocyto.R)
library(SeuratWrappers)
library(stringr)
library(scran)
library(ggpubr)
library(viridis)
library(pheatmap)
library(parallel)
library(reticulate)
library(SCENIC)
library(feather)
library(AUCell)
library(RcisTarget)
library(Matrix)
library(foreach)
library(doParallel)
library(clusterProfiler)
library(GPTCelltype)
library(openai)
library(HematoMap)
# st libraries
library(RColorBrewer)
library(Rfast2)
library(SeuratDisk)
library(abcCellmap)
library(biomaRt)
library(copykat)
library(gelnet)
library(ggplot2)
library(parallelDist)
library(patchwork)
library(markdown)
# getpot
library(getopt)
library(tools)
# HemaScopeR
library(HemaScopeR)
- Run the integrated scRNA-seq pipeline.
scRNASeq_10x_pipeline(
# input and output
input.data.dirs = c('/home/wangzy/HemaScopeR/Demo/SRR7881399.Rds',
'/home/wangzy/HemaScopeR/Demo/SRR7881400.Rds',
'/home/wangzy/HemaScopeR/Demo/SRR7881401.Rds',
'/home/wangzy/HemaScopeR/Demo/SRR7881402.Rds',
'/home/wangzy/HemaScopeR/Demo/SRR7881403.Rds'),
project.names = c( 'SRR7881399',
'SRR7881400',
'SRR7881401',
'SRR7881402',
'SRR7881403'),
output.dir = '/home/wangzy/HemaScopeR/Demo/output/',
pythonPath = python.path.sc(),
databasePath = '/home/wangzy/HemaScopeR/Demo/database/',
# quality control and preprocessing
gene.column = 2,
min.cells = 10,
min.feature = 200,
mt.pattern = '^mt-',
nFeature_RNA.limit = 200,
percent.mt.limit = 20,
scale.factor = 10000,
nfeatures = 3000,
ndims = 10,
PCs = 1:10,
resolution = 0.4,
n.neighbors = 10,
# remove doublets
doublet.percentage = 0.04,
doublerFinderwraper.PCs = 1:10,
doublerFinderwraper.pN = 0.25,
doublerFinderwraper.pK = 0.1,
# phateR
phate.knn = 10,
phate.npca = 10,
phate.t = 10,
phate.ndim = 2,
min.pct = 0.25,
logfc.threshold = 0.25,
Org = 'hsa',
tissuename = 'bone marrow',
loom.files.path = c( '/home/wangzy/HemaScopeR/Demo/SRR7881399.loom',
'/home/wangzy/HemaScopeR/Demo/SRR7881400.loom',
'/home/wangzy/HemaScopeR/Demo/SRR7881401.loom',
'/home/wangzy/HemaScopeR/Demo/SRR7881402.loom',
'/home/wangzy/HemaScopeR/Demo/SRR7881403.loom'
),
# cell chat
sorting = FALSE,
ncores = 10,
# activeEachStep
Whether_load_previous_results = FALSE,
Step1_Input_Data = TRUE,
Step1_Input_Data.type = 'Seurat',
Step2_Quality_Control = TRUE,
Step2_Quality_Control.RemoveBatches = FALSE,
Step2_Quality_Control.RemoveDoublets = TRUE,
Step3_Clustering = TRUE,
Step4_Identify_Cell_Types = TRUE,
Step4_Use_Which_Labels = 'clustering',
Step4_run_sc_CNV = TRUE,
Step5_Visualization = TRUE,
Step6_Find_DEGs = TRUE,
Step7_Assign_Cell_Cycle = TRUE,
Step8_Calculate_Heterogeneity = TRUE,
Step9_Violin_Plot_for_Marker_Genes = TRUE,
Step10_Calculate_Lineage_Scores = TRUE,
Step11_GSVA = TRUE,
Step11_GSVA.identify.cellType.features=FALSE,
Step11_GSVA.identify.diff.features=FALSE,
Step11_GSVA.comparison.design=NULL,
Step12_Construct_Trajectories = TRUE,
Step12_Construct_Trajectories.monocle = TRUE,
Step12_Construct_Trajectories.slingshot = TRUE,
Step12_Construct_Trajectories.scVelo = TRUE,
Step13_TF_Analysis = TRUE,
Step14_Cell_Cell_Interaction = TRUE,
Step15_Generate_the_Report = TRUE)