trace_plots: Trace plots of MCMC simulation & resulting network definition

View source: R/Evaluation_func.R

trace_plotsR Documentation

Trace plots of MCMC simulation & resulting network definition

Description

trace_plots Create trace plots of MCMC simulation and filter low reliable edges based on the edge_freq_thres parameter. Defines the resulting network structure and determines the color scale for each modality.

Usage

trace_plots(
  mcmc_res,
  burn_in,
  thin,
  figures_dir,
  gene_annot,
  PK,
  OMICS_mod_res,
  edge_weights = "MCMC_freq",
  edge_freq_thres = NULL,
  gene_ID,
  TFtargs
)

Arguments

mcmc_res

list output from the BN_module function.

burn_in

numeric vector the minimal length of burn-in period of the MCMC simulation.

thin

numeric vector thinning frequency of the resulting MCMC simulation.

figures_dir

character vector the path of the folder to save figures.

gene_annot

data.frame containing the entrez ID and corresponding gene symbol for conversion.

PK

data.frame with known interactions.

OMICS_mod_res

list output from the OMICS_module function.

edge_weights

character vector includes either "MCMC_freq" to reflect the edge weights frequency over the final set of network structures or "empB" to reflect the empirical biological knowledge estimated by IntOMICS.

edge_freq_thres

numerical vector the quantile of all edge weights used to filter the most reliable edges.

gene_ID

character vector includes either "gene_symbol" or "entrezID" to reflect gene identifiers used in the final figure.

TFtargs

matrix containing the direct interactions between TFs (columns) and their targets (rows).

Value

List of 7 elements needed to plot the final regulatory network

Examples

data(list=c("PK", "TFtarg_mat", "annot", "gene_annot", "layers_def",
"omics"), package="IntOMICS")
OMICS_mod_res <- OMICS_module(omics = omics, PK = PK, annot = annot, 
       layers_def = layers_def, TFtargs = TFtarg_mat,
       r_squared_thres = 0.3, lm_METH = TRUE)
BN_mod_res <- BN_module(burn_in = 100000, thin = 500, len = 5, 
       OMICS_mod_res = OMICS_mod_res, minseglen = 50000, prob_mbr = 0.07)
res_weighted <- trace_plots(mcmc_res = BN_mod_res, figures_dir = "figures/", 
       burn_in = 100000, thin = 500, gene_annot = gene_annot, 
       PK = PK, OMICS_mod_res = OMICS_mod_res, gene_ID = "gene_symbol", 
       edge_freq_thres = 0.3, TFtargs = TFtarg_mat) 


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