edge_proposal: Markov Chain conventional single edge proposal move

View source: R/NET_manipulation_func.R

edge_proposalR Documentation

Markov Chain conventional single edge proposal move

Description

edge_proposal This function samples a conventional single edge proposal moves (identify those edges that are possible to change in given network structure)

Usage

edge_proposal(net, candidates, layers_def, ge_nodes, omics, B_prior_mat)

Arguments

net

adajcency matrix of given network.

candidates

numeric vector with IDs of potential edge to be changed.

layers_def

data.frame containing the modality ID, corresponding layer in BN and maximal number of parents from given layer to GE nodes.

ge_nodes

character vector with GE node names

omics

named list containing the gene expression (possibly copy number variation and methylation data). Each component of the list is a matrix with samples in rows and features in columns.

B_prior_mat

a biological prior matrix.

Value

List of 6 elements needed to define candidates for conventional single edge proposal move

Examples

data(list=c("PK", "TFtarg_mat", "annot", "layers_def", "omics"),
package="IntOMICS")
OMICS_mod_res <- OMICS_module(omics = omics, PK = PK, 
    layers_def = layers_def, TFtargs = TFtarg_mat, annot = annot, 
    r_squared_thres = 0.3, lm_METH = TRUE)
first.adapt.phase_net <- first_adapt_phase(omics = OMICS_mod_res$omics, 
    B_prior_mat = OMICS_mod_res$B_prior_mat, len = 5, prob_mbr = 0.07,
    energy_all_configs_node = OMICS_mod_res$pf_UB_BGe_pre$energy_all_configs_node,
    layers_def = OMICS_mod_res$layers_def, 
    BGe_score_all_configs_node = OMICS_mod_res$pf_UB_BGe_pre$BGe_score_all_configs_node, 
    parent_set_combinations = OMICS_mod_res$pf_UB_BGe_pre$parents_set_combinations, 
    annot = OMICS_mod_res$annot)
source_net <- first.adapt.phase_net$nets[[length(
    first.adapt.phase_net$nets)]]
ge_nodes <- rownames(source_net$adjacency)[regexpr("ENTREZ",
    rownames(source_net$adjacency))>0]
vec <- seq_len(length(c(source_net$adjacency)))
vec <- vec[c(OMICS_mod_res$B_prior_mat)>0]
edge_proposal(net = source_net$adjacency, candidates = vec, 
    layers_def = OMICS_mod_res$layers_def, ge_nodes = ge_nodes, 
    omics = OMICS_mod_res$omics, B_prior_mat = OMICS_mod_res$B_prior_mat)
                       

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