Learn R Programming

geneNetBP (version 1.0.0)

plot.gnbp: Plot a Genotype-Phenotype Network

Description

Plot method for gnbp objects. Plots genotype-phenotype network in which evidence has been absorbed and propagated and maps the beliefs or Jeffrey's signed information onto the network.

Usage

## S3 method for class 'gnbp':
plot(x, y="JSI",col.palette,col.length = 100, ncol = 1, 
                    fontsize=10, fontcolor="black",...)

Arguments

x
An object of class gnbp
y
A character string. Valid options are "JSI" (default) or "belief" for Conditional Gaussian network. For Discrete Bayesian networks, the argument will be ignored and the phenotype states with maximum probability will be plotted.
col.palette
A list of character strings. For Conditional Gaussian networks, a list of 6 elements specifying colors for colormap.All 6 elements should be character strings specifying the colour for pos_high= high end of gradient of positive values (defa
col.length
a positive integer (default = 100) specifying the resolution of the colormap (number of colors).
ncol
a positive integer specifying the column number of JSI / belief / FC to plot. By default, the first column will be plot
fontsize
fontsize for node labels
fontcolor
fontcolor for node labels
...
further arguments to the function plot. These will be ignored

Value

  • x is invisibly returned

Details

This function plots the genotype-phenotype network in which evidence has been absorbed and propagated. The plot method will convert the RHugin domain into an object of class "graphNEL" by using Rgraphviz package. The argument nodeAttrs to plot method for graph objects in Rgraphviz package is then used to customize the plot. Users can specify the colormap options such as end colors for the positive and negative gradients and the resolution of the colormap. The default node shapes are "ellipse" for the phenotype nodes and "box" for genotype nodes.The d-separated nodes are white while the colored nodes are d-connected, with the color indicating the strength and direction of change. The node for which evidence is absorbed is colored green (default color).

See Also

absorb.gnbp

Examples

Run this code
## Fit, absorb and plot a genotype-phenotype network
data(mouse)
network<-fit.gnbp(mousegeno,mousepheno,alpha=0.1)
network<-absorb.gnbp(network,node="Tlr12",evidence=matrix(-0.99))
plot(x=network)

Run the code above in your browser using DataLab