draw.bn: Draws a Bayesian network

Description Usage Arguments Value Author(s) See Also Examples

View source: R/draw.bn.R

Description

Draws the BN using appropriate colors and font size.

Usage

1
2
3
4
draw.bn(BN, plotFile = NULL, inputType = "ENTREZIDat", edgeColor = "blue",
  DiseaseCol = "darkgreen", DiseaseFill = "red", DiseaseChildFill = "pink",
  nodeCol = "darkgreen", nodeFill = "yellow", moduleNamesFile = NULL,
  mainText = NULL, nodeFontSize = 14 * 1.1, verbose = 0)

Arguments

BN

An object of bn-class

plotFile

If not NULL, the plot will be saved here.

inputType

The type of gene IDs in BN

edgeColor

The color of edges

DiseaseCol

The color of the border of the Disease node

DiseaseFill

The color of the area inside the Disease node

DiseaseChildFill

The color of the area inside the children of the Disease node

nodeCol

The color of the border of the usual nodes excluding Disease and its children

nodeFill

The color of the area inside the usual nodes

moduleNamesFile

An optional csv file including the information to rename the nodes name. See coderename.node.

mainText

The main text shown at the top of the plot

nodeFontSize

Adjusts the size of nodes

verbose

The integer level of verbosity. 0 means silent and higher values produce more details of computation.

Value

A list with following components:

call

The call that created the results

BN

An echo of input BN argument

renamedBN

An object of bn-class when moduleNamesFile is provided

gr

The full output of graphviz.plot function

Author(s)

Habil Zare

See Also

bnlearn-package, Pigengene-package, learn.bn, graph-class

Examples

1
## See lear.bn function.

Example output

Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

Pigengene documentation built on Nov. 8, 2020, 6:47 p.m.