plotModel | R Documentation |
This function can be used to plot a prior model network before any pre-processing step. However, additional information can be provided such as a CNOlist (see makeCNOlist and readMIDAS) or information related to the pre-processing steps (compression, NONC nodes, expansion gates). It can also be used to plot optimised model given the optimisation bitstring.
plotModel(model, CNOlist=NULL, bString=NULL, indexIntegr=NULL, signals=NULL,
stimuli=NULL, inhibitors=NULL, NCNO=NULL, compressed=NULL, output="STDOUT",
filename=NULL, graphvizParams=list(), show=TRUE, remove_dot=TRUE, removeEmptyAnds=TRUE)
model |
a model as returned by |
CNOlist |
output of makeCNOlist |
bString |
a sequence made of numbers between 0 and 1 of same length as the one returned by the Genetic Algorithm (GA). This is a generalisation of the bitString returned by the GA function: several bit strings can be averaged and used. |
indexIntegr |
additional indices to highlight some edge (optional). |
signals |
a list of nodes belonging to the signals class |
stimuli |
a list of nodes belonging to the stimuli class |
inhibitors |
a list of nodes belonging to the inhibitors class |
NCNO |
a list of NCNO nodes. |
compressed |
a list of compressed nodes |
filename |
the filename (without extension) used to write the dot file |
output |
the type of output (PNG, PDF, SVG accepted) |
graphvizParams |
a list of optional arguments dedicated to Rgraphviz to tune the layout:
|
show |
show the plot (default is True) |
remove_dot |
remove the dot file that has been created. Default is False |
removeEmptyAnds |
removes AND gates from plotted graph if the corresponding bit is 0 to give a compact view. Default is TRUE. |
This function plots the model and also saves it in a dot file that can be processed later on. However, you can also save the plot in PNG or PDF or SVG format (one at a time).
The CNOlist argument contains the signals/stimuli/inhibitors so if you provide a CNOlist there is no need to use these arguments. If you decide to use them they will overwrite the contents of the CNOlist argument.
optimRes is the output of gaBinary. One of its field is called bString and contains a list of 0 and 1 (the optimisation is perfomed with a binary procedure). This list of 0 and 1 is then used to plot or not the edges of the model. However, you can provide a bitString made of floats (e.g., average of several bitStrings). In such case, edges will appear in gray light or dark according to the bistring value (between 0 and 1).
a graph representation of the model
graph$g |
A graph representation of the model |
graph$attrs |
graph attributes |
graph$nodeAttrs |
nodes attributes |
graph$edgeAttrs |
edges attributes |
graph$clusters |
clusters of nodes |
This function depends on the Rgraphviz package.
T. Cokelaer
readMIDAS, readSIF, makeCNOlist, writeNetwork, writeDot, gaBinaryT1
data(CNOlistToy,package="CellNOptR")
data(ToyModel,package="CellNOptR")
res<-plotModel(ToyModel, CNOlist=CNOlistToy, compressed=c("TRAF6", "p38"),
graphvizParams=list(mode="classic", fontsize=30))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.