scGeneNet: Variational inference for Mixture Poisson Log-Normal graphial model in Single-cell gene regulatory network analysis with mixed cell populations
scGeneNet is a R package for cell-type-specifc gene regulatory inference for Single-cell RNA-seq data with mixed cell populations using a block-wise descent algorithm based on the variational inference .
scGeneNet is available on Github.
- For the development version, use the github install
remotes::install_github("https://github.com/XiDsLab/scGeneNet")
The package comes with a simulation example single-cell RNA-seq data to present the functionality of main function.
##1. Package loading
##-------------------------------------------------------------
library(scGeneNet)
library(Seurat)
library(glasso)
##-------------------------------------------------------------
##2. load reference dataset
##-------------------------------------------------------------
data("example_data")
##-------------------------------------------------------------
##-------------------------------------------------------------
gene_GRN <- rownames(example_data)
scGeneNet_list<-scGeneNet_init(expression_profile = example_data,
celltypes_num = 3,
celltypes_ref = NULL,
ls_est = "TSS",
gene_GRN = gene_GRN,
HVG_model_num = 0,
zero_GRN = NULL,
preprocess_Control = list(HVG_num = length(gene_GRN),npc = 50,
run_umap = TRUE,label_umap = NULL,
cluster_method = "Kmeans",resolution = 0.8),
core_num = 1)
##-------------------------------------------------------------
##-------------------------------------------------------------
gene_GRN <- rownames(example_data)
scGeneNet_list<-scGeneNet_init(expression_profile = example_data,
celltypes_num = 3,
celltypes_ref = NULL,
ls_est = "TSS",
gene_GRN = gene_GRN,
HVG_model_num = 0,
zero_GRN = NULL,
preprocess_Control = list(HVG_num = length(gene_GRN),npc = 50,
run_umap = TRUE,label_umap = NULL,
cluster_method = "Kmeans",resolution = 0.8),
core_num = 1)
##-------------------------------------------------------------
##-------------------------------------------------------------
scGeneNet_list_alongpath<-list()
for(l in 1:length(lambda_path)){
cat(paste(paste(rep("##",40),sep = "",collapse = ""),"\n",(paste(rep("##",40),sep = "",collapse = "")),"\n",sep = "",collapse = ""))
##
scGeneNet_list_alongpath[[l]]<-scGeneNet_main(scGeneNet_list = scGeneNet_list,lambda_use = lambda_path[l],
Theta_Control = list(penalize_diagonal = FALSE),
U_fix = FALSE,
verbose = TRUE,
core_num = 1)
}
names(scGeneNet_list_alongpath)<-paste("lambda: ",lambda_path,sep = "")
##-------------------------------------------------------------
All data used and corresponding source codes for simulation and real data analysis in paper "Single-cell gene regulatory network analysis for mixed cell populations" can be accessed at https://drive.google.com/drive/folders/1lmrtmGWcjq0JZIWjXO2iCi7qylRowuSf?usp=sharing.
Please cite our work using the following references: