sample.chain: Random initial network edge generation

View source: R/NET_manipulation_func.R

sample.chainR Documentation

Random initial network edge generation

Description

sample.chain This function is used to sample random initial network. The edges are sampled only between GE nodes.

Usage

sample.chain(empty_net, omics_ge)

Arguments

empty_net

adjacency matrix of an empty network/graph (all values are 0).

omics_ge

matrix with gene expression data (samples in rows and features in columns).

Value

BN object with conditional probabilities

Examples

data(list=c("PK", "TFtarg_mat", "annot", "layers_def", "omics"),
package="IntOMICS")
B <- B_prior_mat(omics = omics, PK = PK, layers_def = layers_def, 
     annot = annot, lm_METH = TRUE, r_squared_thres = 0.3,
     p_val_thres = 0.05, TFtargs = TFtarg_mat, TFBS_belief = 0.75, 
     nonGE_belief = 0.5, woPKGE_belief = 0.5)
empty.net <- matrix(0, nrow = sum(mapply(ncol,B$omics)), ncol =
sum(mapply(ncol,B$omics)), dimnames = list(unlist(mapply(colnames,B$omics)),
unlist(mapply(colnames,B$omics))))
sample.chain(empty_net = empty.net, 
     omics_ge = B$omics[[layers_def$omics[1]]])


anna-pacinkova/intomics_package documentation built on Aug. 13, 2022, 11:38 a.m.