View source: R/pipeline_functions.R
update_SJAracne.network | R Documentation |
update_SJAracne.network
updates the network object created by get.SJAracne.network
, using constraints like statistical thresholds and interested gene list.
update_SJAracne.network(
network_list = NULL,
all_possible_drivers = NULL,
all_possible_targets = NULL,
force_all_drivers = TRUE,
force_all_targets = TRUE,
min_MI = 0,
max_p.value = 1,
min_spearman_value = 0,
min_pearson_value = 0,
spearman_sign_use = c(1, -1),
pearson_sign_use = c(1, -1),
directed = TRUE,
weighted = TRUE
)
network_list |
list, the network list object created by |
all_possible_drivers |
a vector of characters, all possible drivers used to filter the network.
If NULL, will use drivers from |
all_possible_targets |
a vector of characters, all possible target genes used to filter the network.
If NULL, will use targets from |
force_all_drivers |
logical, if TRUE, will include all drivers from |
force_all_targets |
logical, if TRUE, will include all genes from |
min_MI |
numeric, minimum threshold for "MI (mutual information)". Default is 0. |
max_p.value |
numeric, maximum threshold for P-value. Default is 1. |
min_spearman_value |
numeric, minimum threshold for spearman absolute value. Default is 0. |
min_pearson_value |
numeric, minimum threshold for pearson absolute value. Default is 0. |
spearman_sign_use |
a vector of numerics, users can choose from 1, -1 and c(1, -1). 1 means only positve spearman values will be used. -1 means only negative spearman values will be used. Default is c(1,-1). |
pearson_sign_use |
a vector of numerics, users can choose from 1, -1 and c(1, -1). 1 means only positve pearson values will be used. -1 means only negative pearson values will be used. Default is c(1,-1). |
directed |
logical, if TRUE, the network is a directed graph. Default is TRUE. |
weighted |
logical, if TRUE, the network is weighted. Default is TRUE. |
Return a list containing three elements, network_dat
, target_list
and igraph_obj
.
if(exists('analysis.par')==TRUE) rm(analysis.par)
network.dir <- sprintf('%s/demo1/network/',system.file(package = "NetBID2")) # use demo
network.project.name <- 'project_2019-02-14' # demo project name
project_main_dir <- 'test/'
project_name <- 'test_driver'
analysis.par <- NetBID.analysis.dir.create(project_main_dir=project_main_dir,
project_name=project_name,
network_dir=network.dir,
network_project_name=network.project.name)
analysis.par$tf.network <- get.SJAracne.network(network_file=analysis.par$tf.network.file)
analysis.par$sig.network <- get.SJAracne.network(network_file=analysis.par$sig.network.file)
all_possible_drivers <- c(names(analysis.par$tf.network$target_list)[1:1000],
'addition_driver_1','addition_driver_2')
tf.network.update <- update_SJAracne.network(network_list=analysis.par$tf.network,
all_possible_drivers=all_possible_drivers,
force_all_drivers=TRUE,
force_all_targets=FALSE,
pearson_sign_use=1)
print(base::intersect(c('addition_driver_1','addition_driver_2'),
names(V(tf.network.update$igraph_obj)))) ## check
## Not run:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.