Title: | Pathway Enrichment Analysis Based on Bayesian Network |
---|---|
Description: | Maleknia et al. (2020) <doi:10.1101/2020.01.13.905448>. A novel pathway enrichment analysis package based on Bayesian network to investigate the topology features of the pathways. firstly, 187 kyoto encyclopedia of genes and genomes (KEGG) human non-metabolic pathways which their cycles were eliminated by biological approach, enter in analysis as Bayesian network structures. The constructed Bayesian network were optimized by the Least Absolute Shrinkage Selector Operator (lasso) and the parameters were learned based on gene expression data. Finally, the impacted pathways were enriched by Fisher’s Exact Test on significant parameters. |
Authors: | Samaneh Maleknia [aut, cre], Mohsen Namazi [aut], Kaveh Kavousi [ctb], Ali Sharifi-Zarchi [ctb], Vahid Rezaei-Tabar [ctb] |
Maintainer: | Samaneh Maleknia <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.1 |
Built: | 2025-02-26 04:45:53 UTC |
Source: | https://github.com/samaneh-bioinformatics/bnrich |
Construct BNs structures using unified signaling pathways
BN_struct(mapkG1)
BN_struct(mapkG1)
mapkG1 |
A list contains unified signaling pathways |
A list contains Bayesian networks structures
#All the 187 preprocessed signaling pathways can be entered in analysis by fetch_data_file(). #But here you enter a subset of those pathways to see how this package works. files <- system.file("extdata", "test_files_to_start.RData", package = "BNrich", mustWork = TRUE) load(files) Data <- system.file("extdata", "Test_DATA.RData", package = "BNrich", mustWork = TRUE) load(Data) uni_Result <- unify_path(dataH, dataD, MapkG = sub_mapkG, Pathway.id = path.id) M1 <- uni_Result$mapkG1 BN <- BN_struct(M1)
#All the 187 preprocessed signaling pathways can be entered in analysis by fetch_data_file(). #But here you enter a subset of those pathways to see how this package works. files <- system.file("extdata", "test_files_to_start.RData", package = "BNrich", mustWork = TRUE) load(files) Data <- system.file("extdata", "Test_DATA.RData", package = "BNrich", mustWork = TRUE) load(Data) uni_Result <- unify_path(dataH, dataD, MapkG = sub_mapkG, Pathway.id = path.id) M1 <- uni_Result$mapkG1 BN <- BN_struct(M1)
Fisher's exact test applied to PEA on final BNs
BNrich(Ttest_Results, Pathway.id1, PathName_Final, fdr.value = 0.05)
BNrich(Ttest_Results, Pathway.id1, PathName_Final, fdr.value = 0.05)
Ttest_Results |
A data frame contains T-test results for all parameters |
Pathway.id1 |
A vector contains modified KEEG pathway IDs |
PathName_Final |
A data frame contains is IDs and names of KEEG pathways |
fdr.value |
A numeric threshold to determine significant parameters |
A data frame contains fisher test results for any final pathways
#All the 187 preprocessed signaling pathways can be entered in analysis by fetch_data_file(). #But here you enter a subset of those pathways to see how this package works. files <- system.file("extdata", "test_files_to_start.RData", package = "BNrich", mustWork = TRUE) load(files) Data <- system.file("extdata", "Test_DATA.RData", package = "BNrich", mustWork = TRUE) load(Data) uni_Result <- unify_path(dataH, dataD, MapkG = sub_mapkG, Pathway.id = path.id) M1 <- uni_Result$mapkG1 BN <- BN_struct(M1) data_h1 <- uni_Result$data_h data_d1 <- uni_Result$data_d LASSO_Result <- LASSO_BN(BN = BN , data_h = data_h1 , data_d = data_d1) BN_h1 <- LASSO_Result$BN_h BN_d1 <- LASSO_Result$BN_d esti_result <- esti_par(BN_H = BN_h1, BN_D = BN_d1, data_h = data_h1, data_d = data_d1) BNs_H <- esti_result$BNs_h BNs_D <- esti_result$BNs_d coef_h <- esti_result$coef_h coef_d <- esti_result$coef_d var_result <- var_mat(data_h1, coef_h, BNs_H, data_d1, coef_d, BNs_D) Var_H = var_result$var_mat_Bh Var_D = var_result$var_mat_Bd path.id1 <- uni_Result$pathway.id1 Ttest_result <- parm_Ttest(data_h1, coef_h, BNs_H, data_d1, coef_d, BNs_D, Var_H, Var_D, path.id1) BNrich_result <- BNrich(Ttest_result, path.id1, Path.Name)
#All the 187 preprocessed signaling pathways can be entered in analysis by fetch_data_file(). #But here you enter a subset of those pathways to see how this package works. files <- system.file("extdata", "test_files_to_start.RData", package = "BNrich", mustWork = TRUE) load(files) Data <- system.file("extdata", "Test_DATA.RData", package = "BNrich", mustWork = TRUE) load(Data) uni_Result <- unify_path(dataH, dataD, MapkG = sub_mapkG, Pathway.id = path.id) M1 <- uni_Result$mapkG1 BN <- BN_struct(M1) data_h1 <- uni_Result$data_h data_d1 <- uni_Result$data_d LASSO_Result <- LASSO_BN(BN = BN , data_h = data_h1 , data_d = data_d1) BN_h1 <- LASSO_Result$BN_h BN_d1 <- LASSO_Result$BN_d esti_result <- esti_par(BN_H = BN_h1, BN_D = BN_d1, data_h = data_h1, data_d = data_d1) BNs_H <- esti_result$BNs_h BNs_D <- esti_result$BNs_d coef_h <- esti_result$coef_h coef_d <- esti_result$coef_d var_result <- var_mat(data_h1, coef_h, BNs_H, data_d1, coef_d, BNs_D) Var_H = var_result$var_mat_Bh Var_D = var_result$var_mat_Bd path.id1 <- uni_Result$pathway.id1 Ttest_result <- parm_Ttest(data_h1, coef_h, BNs_H, data_d1, coef_d, BNs_D, Var_H, Var_D, path.id1) BNrich_result <- BNrich(Ttest_result, path.id1, Path.Name)
Estimate parameters of BNs in control and disease states
esti_par(BN_H, BN_D, data_h, data_d)
esti_par(BN_H, BN_D, data_h, data_d)
BN_H |
A list contains simplified BNs structures for control objects |
BN_D |
A list contains simplified BNs structures for disease objects |
data_h |
A list contains data frames related to control objects for any BN |
data_d |
A list contains data frames related to disease objects for any BN |
A listcontains four lists BNs_h, BNs_d, coef_h and coef_d
#All the 187 preprocessed signaling pathways can be entered in analysis by fetch_data_file(). #But here you enter a subset of those pathways to see how this package works. files <- system.file("extdata", "test_files_to_start.RData", package = "BNrich", mustWork = TRUE) load(files) Data <- system.file("extdata", "Test_DATA.RData", package = "BNrich", mustWork = TRUE) load(Data) uni_Result <- unify_path(dataH, dataD, MapkG = sub_mapkG, Pathway.id = path.id) M1 <- uni_Result$mapkG1 BN <- BN_struct(M1) data_h1 <- uni_Result$data_h data_d1 <- uni_Result$data_d LASSO_Result <- LASSO_BN(BN = BN , data_h = data_h1 , data_d = data_d1) BN_h1 <- LASSO_Result$BN_h BN_d1 <- LASSO_Result$BN_d esti_result <- esti_par(BN_H = BN_h1, BN_D = BN_d1, data_h = data_h1, data_d = data_d1)
#All the 187 preprocessed signaling pathways can be entered in analysis by fetch_data_file(). #But here you enter a subset of those pathways to see how this package works. files <- system.file("extdata", "test_files_to_start.RData", package = "BNrich", mustWork = TRUE) load(files) Data <- system.file("extdata", "Test_DATA.RData", package = "BNrich", mustWork = TRUE) load(Data) uni_Result <- unify_path(dataH, dataD, MapkG = sub_mapkG, Pathway.id = path.id) M1 <- uni_Result$mapkG1 BN <- BN_struct(M1) data_h1 <- uni_Result$data_h data_d1 <- uni_Result$data_d LASSO_Result <- LASSO_BN(BN = BN , data_h = data_h1 , data_d = data_d1) BN_h1 <- LASSO_Result$BN_h BN_d1 <- LASSO_Result$BN_d esti_result <- esti_par(BN_H = BN_h1, BN_D = BN_d1, data_h = data_h1, data_d = data_d1)
Download necessary data file to start BNrich
fetch_data_file(destfile, verbose = FALSE)
fetch_data_file(destfile, verbose = FALSE)
destfile |
A directory in user's own computer for save preprocessed data file |
verbose |
A logical argument to show verbose results |
A list contain mapkG, PathName_final and pathway.id. The mapkG is a list contains imported 187 preprocessed signaling pathways, PathName_final is a data.frame includes names and IDs of all 187 pathways and pathway.id is a character vector of pathways IDs
destfile = tempfile("files", fileext = ".rda") files <- fetch_data_file() load(destfile)
destfile = tempfile("files", fileext = ".rda") files <- fetch_data_file() load(destfile)
LASSO regression – second step of simplification of BNs structures
LASSO_BN(BN, data_h, data_d)
LASSO_BN(BN, data_h, data_d)
BN |
A list of Bayesian networks achieved by BN_struct function |
data_h |
A list contains data frames related to control objects |
data_d |
A list contains data frames related to disease objects |
A list contains two lists.BN_h and BN_d are simplified BNs
#All the 187 preprocessed signaling pathways can be entered in analysis by fetch_data_file(). #But here you enter a subset of those pathways to see how this package works. files <- system.file("extdata", "test_files_to_start.RData", package = "BNrich", mustWork = TRUE) load(files) Data <- system.file("extdata", "Test_DATA.RData", package = "BNrich", mustWork = TRUE) load(Data) uni_Result <- unify_path(dataH, dataD, MapkG = sub_mapkG, Pathway.id = path.id) M1 <- uni_Result$mapkG1 BN <- BN_struct(M1) data_h1 <- uni_Result$data_h data_d1 <- uni_Result$data_d LASSO_Result <- LASSO_BN(BN = BN , data_h = data_h1 , data_d = data_d1)
#All the 187 preprocessed signaling pathways can be entered in analysis by fetch_data_file(). #But here you enter a subset of those pathways to see how this package works. files <- system.file("extdata", "test_files_to_start.RData", package = "BNrich", mustWork = TRUE) load(files) Data <- system.file("extdata", "Test_DATA.RData", package = "BNrich", mustWork = TRUE) load(Data) uni_Result <- unify_path(dataH, dataD, MapkG = sub_mapkG, Pathway.id = path.id) M1 <- uni_Result$mapkG1 BN <- BN_struct(M1) data_h1 <- uni_Result$data_h data_d1 <- uni_Result$data_d LASSO_Result <- LASSO_BN(BN = BN , data_h = data_h1 , data_d = data_d1)
t-test for equality the corresponging parameters in any BN
parm_Ttest( Data_h, coef_H, BNs_H, Data_d, coef_D, BNs_D, Var_mat_Bh, Var_mat_Bd, Pathway.id1 )
parm_Ttest( Data_h, coef_H, BNs_H, Data_d, coef_D, BNs_D, Var_mat_Bh, Var_mat_Bd, Pathway.id1 )
Data_h |
A list contains data frames related to control objects for any BN |
coef_H |
A list contains parameters of BN_h |
BNs_H |
A list contains BNs learned by control objects data |
Data_d |
A list contains data frames related to disease objects for any BN |
coef_D |
A list contains parameters of BN_d |
BNs_D |
A list contains BNs learned by disease objects data |
Var_mat_Bh |
A list contains covariance matrixes for any node of BN_h |
Var_mat_Bd |
A list contains covariance matrixes for any node of BN_d |
Pathway.id1 |
A vector contains modified KEEG pathway IDs |
A data frame contains T-test results for all parameters in final BNs
#All the 187 preprocessed signaling pathways can be entered in analysis by fetch_data_file(). #But here you enter a subset of those pathways to see how this package works. files <- system.file("extdata", "test_files_to_start.RData", package = "BNrich", mustWork = TRUE) load(files) Data <- system.file("extdata", "Test_DATA.RData", package = "BNrich", mustWork = TRUE) load(Data) uni_Result <- unify_path(dataH, dataD, MapkG = sub_mapkG, Pathway.id = path.id) M1 <- uni_Result$mapkG1 BN <- BN_struct(M1) data_h1 <- uni_Result$data_h data_d1 <- uni_Result$data_d LASSO_Result <- LASSO_BN(BN = BN , data_h = data_h1 , data_d = data_d1) BN_h1 <- LASSO_Result$BN_h BN_d1 <- LASSO_Result$BN_d esti_result <- esti_par(BN_H = BN_h1, BN_D = BN_d1, data_h = data_h1, data_d = data_d1) BNs_H <- esti_result$BNs_h BNs_D <- esti_result$BNs_d coef_h <- esti_result$coef_h coef_d <- esti_result$coef_d var_result <- var_mat(data_h1, coef_h, BNs_H, data_d1, coef_d, BNs_D) Var_H = var_result$var_mat_Bh Var_D = var_result$var_mat_Bd path.id1 <- uni_Result$pathway.id1 Ttest_result <- parm_Ttest(data_h1, coef_h, BNs_H, data_d1, coef_d, BNs_D, Var_H, Var_D, path.id1)
#All the 187 preprocessed signaling pathways can be entered in analysis by fetch_data_file(). #But here you enter a subset of those pathways to see how this package works. files <- system.file("extdata", "test_files_to_start.RData", package = "BNrich", mustWork = TRUE) load(files) Data <- system.file("extdata", "Test_DATA.RData", package = "BNrich", mustWork = TRUE) load(Data) uni_Result <- unify_path(dataH, dataD, MapkG = sub_mapkG, Pathway.id = path.id) M1 <- uni_Result$mapkG1 BN <- BN_struct(M1) data_h1 <- uni_Result$data_h data_d1 <- uni_Result$data_d LASSO_Result <- LASSO_BN(BN = BN , data_h = data_h1 , data_d = data_d1) BN_h1 <- LASSO_Result$BN_h BN_d1 <- LASSO_Result$BN_d esti_result <- esti_par(BN_H = BN_h1, BN_D = BN_d1, data_h = data_h1, data_d = data_d1) BNs_H <- esti_result$BNs_h BNs_D <- esti_result$BNs_d coef_h <- esti_result$coef_h coef_d <- esti_result$coef_d var_result <- var_mat(data_h1, coef_h, BNs_H, data_d1, coef_d, BNs_D) Var_H = var_result$var_mat_Bh Var_D = var_result$var_mat_Bd path.id1 <- uni_Result$pathway.id1 Ttest_result <- parm_Ttest(data_h1, coef_h, BNs_H, data_d1, coef_d, BNs_D, Var_H, Var_D, path.id1)
Unifying nodes based imported signaling pathways and GE data
unify_path(dataH, dataD, MapkG, Pathway.id)
unify_path(dataH, dataD, MapkG, Pathway.id)
dataH |
A data frame contains (healthy) control objects data |
dataD |
A data frame contains disease objects data |
MapkG |
A list contains imported 187 signaling pathways |
Pathway.id |
A vector contains 187 KEEG pathway IDs |
A list contain data_h,data_d,mapkG1 and pathway.id1
#All the 187 preprocessed signaling pathways can be entered in analysis by fetch_data_file(). #But here you enter a subset of those pathways to see how this package works. files <- system.file("extdata", "test_files_to_start.RData", package = "BNrich", mustWork = TRUE) load(files) Data <- system.file("extdata", "Test_DATA.RData", package = "BNrich", mustWork = TRUE) load(Data) uni_Result <- unify_path(dataH, dataD, MapkG = sub_mapkG, Pathway.id = path.id)
#All the 187 preprocessed signaling pathways can be entered in analysis by fetch_data_file(). #But here you enter a subset of those pathways to see how this package works. files <- system.file("extdata", "test_files_to_start.RData", package = "BNrich", mustWork = TRUE) load(files) Data <- system.file("extdata", "Test_DATA.RData", package = "BNrich", mustWork = TRUE) load(Data) uni_Result <- unify_path(dataH, dataD, MapkG = sub_mapkG, Pathway.id = path.id)
Estimate variance-covariance matrixes for any parameters of
var_mat(Data_h, coef_H, BNs_H, Data_d, coef_D, BNs_D)
var_mat(Data_h, coef_H, BNs_H, Data_d, coef_D, BNs_D)
Data_h |
A list contains data frames related to control objects for any BN |
coef_H |
A lists of parameters of BN_h achieved |
BNs_H |
A list of BNs learned by control objects data |
Data_d |
A list contains data frames related to disease objects for any BN |
coef_D |
A lists of parameters of BN_d |
BNs_D |
A list of BNs learned by disease objects data |
A listcontains two lists var_mat_Bh and var_mat_Bd
#All the 187 preprocessed signaling pathways can be entered in analysis by fetch_data_file(). #But here you enter a subset of those pathways to see how this package works. files <- system.file("extdata", "test_files_to_start.RData", package = "BNrich", mustWork = TRUE) load(files) Data <- system.file("extdata", "Test_DATA.RData", package = "BNrich", mustWork = TRUE) load(Data) uni_Result <- unify_path(dataH, dataD, MapkG = sub_mapkG, Pathway.id = path.id) M1 <- uni_Result$mapkG1 BN <- BN_struct(M1) data_h1 <- uni_Result$data_h data_d1 <- uni_Result$data_d LASSO_Result <- LASSO_BN(BN = BN , data_h = data_h1 , data_d = data_d1) BN_h1 <- LASSO_Result$BN_h BN_d1 <- LASSO_Result$BN_d esti_result <- esti_par(BN_H = BN_h1, BN_D = BN_d1, data_h = data_h1, data_d = data_d1) BNs_H <- esti_result$BNs_h BNs_D <- esti_result$BNs_d coef_h <- esti_result$coef_h coef_d <- esti_result$coef_d var_result <- var_mat(data_h1, coef_h, BNs_H, data_d1, coef_d, BNs_D)
#All the 187 preprocessed signaling pathways can be entered in analysis by fetch_data_file(). #But here you enter a subset of those pathways to see how this package works. files <- system.file("extdata", "test_files_to_start.RData", package = "BNrich", mustWork = TRUE) load(files) Data <- system.file("extdata", "Test_DATA.RData", package = "BNrich", mustWork = TRUE) load(Data) uni_Result <- unify_path(dataH, dataD, MapkG = sub_mapkG, Pathway.id = path.id) M1 <- uni_Result$mapkG1 BN <- BN_struct(M1) data_h1 <- uni_Result$data_h data_d1 <- uni_Result$data_d LASSO_Result <- LASSO_BN(BN = BN , data_h = data_h1 , data_d = data_d1) BN_h1 <- LASSO_Result$BN_h BN_d1 <- LASSO_Result$BN_d esti_result <- esti_par(BN_H = BN_h1, BN_D = BN_d1, data_h = data_h1, data_d = data_d1) BNs_H <- esti_result$BNs_h BNs_D <- esti_result$BNs_d coef_h <- esti_result$coef_h coef_d <- esti_result$coef_d var_result <- var_mat(data_h1, coef_h, BNs_H, data_d1, coef_d, BNs_D)