draw.network.QC: QC Tables and Plots for Network Object

View source: R/pipeline_functions.R

draw.network.QCR Documentation

QC Tables and Plots for Network Object

Description

draw.network.QC creates tables and plots for showing some basic statistics, driver statistics and scale-free checking of the target network.

Usage

draw.network.QC(
  igraph_obj,
  outdir = NULL,
  prefix = "",
  directed = TRUE,
  weighted = FALSE,
  generate_html = TRUE,
  html_info_limit = TRUE
)

Arguments

igraph_obj

igraph object, created by get.SJAracne.network.

outdir

character, the output directory for saving QC tables and plots.

prefix

character, the prefix of output QC figures names. Default is "".

directed

logical, if TRUE, this network will be treated as a directed network. Default is TRUE.

weighted

logical, if TRUE, this network will be treated as a weighted network. Default is FALSE.

generate_html

logical, if TRUE, a html file will be created by R Markdown. If FALSE, plots will be save as separated PDFs. Default is TRUE.

html_info_limit

logical, if TRUE, the statistics for network QC html will be limited. Default is TRUE.

Value

Return a logical value. If TRUE, success in creating QC tables and plots.

Examples

## Not run: 
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$out.dir.PLOT <- getwd() ## directory for saving the pdf files
draw.network.QC(analysis.par$tf.network$igraph_obj,
                outdir=analysis.par$out.dir.QC,prefix='TF_net_')

## End(Not run)

jyyulab/NetBID documentation built on Dec. 23, 2024, 6:34 a.m.