The download process should be achieved following the website:
https://github.com/aertslab/SCENIC
The required data files could be downloaded through the following website:
https://resources.aertslab.org/cistarget/databases/old/
Data transfer from Seurat
p_load(Seurat, tidyverse)
count_merge <- readRDS(file.choose())
exprMat <- as.matrix(count_merge@assays$RNA@data)
cellInfo <- count_merge@meta.data
cellInfo$celltype <- count_merge@active.ident
cellInfo <- cellInfo[,c("celltype","nCount_RNA","nFeature_RNA")]
colnames(cellInfo)=c('CellType', 'nGene', 'nUMI')
Initialize settings
p_load(SCENIC)
data(list="motifAnnotations_mgi_v9", package="RcisTarget")
motifAnnotations_mgi <- motifAnnotations_mgi_v9
rm(motifAnnotations_mgi_v9)
scenicOptions <- initializeScenic(org="mgi", dbDir="cisTarget_databases", nCores=48)
# mgi for mouse and hgnc for human
# dbDir indicates the directory of two 1G files mentioned above
Co-expression network
genesKept <- geneFiltering(exprMat, scenicOptions)
exprMat_filtered <- exprMat[genesKept, ]
runCorrelation(exprMat_filtered, scenicOptions)
exprMat_filtered_log <- log2(exprMat_filtered+1)
runGenie3(exprMat_filtered_log, scenicOptions)
Build and score the GRN
exprMat_log <- log2(exprMat+1)
scenicOptions@settings$dbs <- scenicOptions@settings$dbs["10kb"] # Toy run settings
scenicOptions <- runSCENIC_1_coexNetwork2modules(scenicOptions)
scenicOptions <- runSCENIC_2_createRegulons(scenicOptions,
coexMethod=c("top5perTarget")) # Toy run settings
library(doParallel)
scenicOptions <- runSCENIC_3_scoreCells(scenicOptions, exprMat_log )
scenicOptions <- runSCENIC_4_aucell_binarize(scenicOptions)
tsneAUC(scenicOptions, aucType="AUC") # choose settings`