Launch the BayesNetBP Shiny App
runBayesNetApp(launch.browser = TRUE)
logical(1)
whether launch the App in browser
The function runBayesNetApp
lauches the Shiny App
accompanied
with this package. The app loads the toytree
example by default and allows users
to load customized clustertree
object. In order to use this feature, a
clustertree
oject should be built, propagated and named tree.init.p
, and
then saved as a .RDATA
file. This file can be read in by the app.
The console of BayesNetBP
Shiny App comprises three panels. The first
part controls the model loading and network layouts. It also allows user to subset the
network to faciliate visualization. The Expand
function can trace the ancestors of
a selected node in a stepwise manner. The expanded nodes will be colored orange. By clicking
Add to list
, the expanded nodes will be selected and be purple. The user can continue
selecting other nodes by using Expand
and Add to list
functions at this stage. After
selecting desired node sets, the user can subset the graph by the Subset
function. The nodes in
subsetted graph retain all properties before subsetting, including their colors and notes.
The second panel is used for absorption of fixed and hard evidences.
The users can add multiple pieces of evidence to a list and absorb them into the model simultaneously.
The nodes with evidence absorbed will be colored green when the absorption is complete. Marginals of the nodes can be quried as
density or bar plots by node types. If a set of evidence has been absorbed, the marginals both
before and after absorption will be returned to facilitate comparison. To query the marginals, the user can
select the node of interest in the graph, and then click Plot Marginals
. The Shift in Marginals
function computes the signed and symmetric Kullback-Liebler divergence for all applicable nodes
in the network, and colors the nodes in a similar manner as the function PlotCGBN
.
The function for systematic assessment of variable marginal shifts is provided in the third panel.
It allows user to specify which node to absorb the spectrum of evidence in a menu, and to select whose
divergence to be calculated by firstly selecting the node on the graph and then clicking Add to Plot List
.
Alternatively, the user can use Add All
function to select all applicable nodes into the plotting list.
The result is visualized in an interactive plot.
# load or install required packages to run App
library("shiny")
library("devtools")
devtools::install_github("cytoscape/r-cytoscape.js")
install.packages("googleVis")
# run the App in browser
runBayesNetApp(launch.browser=TRUE)
Run the code above in your browser using DataLab