Visualizes attractors, either by drawing a table of the involved states in two colors, or by drawing a graph of transitions between the states of the attractor.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  plotAttractors(attractorInfo,
subset,
title = "",
mode = c("table","graph"),
grouping = list(),
plotFixed = TRUE,
onColor = "#4daf4a",
offColor = "#e41a1c",
layout = layout.circle,
drawLabels = TRUE,
drawLegend = TRUE,
ask = TRUE,
reverse = FALSE,
borderColor = "black",
eps = 0.1,
allInOnePlot = FALSE,
...)

attractorInfo 
An object of class 
subset 
An subset of attractors to be plotted. This is a vector of attractor indices in 
title 
An optional title for the plot 
mode 
Switches between two kinds of attractor plots. See Details for more information. Default is "table". 
grouping 
This optional parameter is only used if

plotFixed 
This optional parameter is only used if 
onColor 
This optional parameter is only used if 
offColor 
This optional parameter is only used if 
layout 
If 
drawLabels 
This parameter is only relevant if 
drawLegend 
Specifies whether a color key for the ON/OFF states is drawn if 
ask 
If set to true, the plot function will prompt for a user input for each new plot that is shown on an interactive device (see 
reverse 
Specifies the order of the genes in the plot. By default, the first gene is placed in the first row of the plot. If 
borderColor 
Specifies the border or seprating color of states in an attractor. Defaults to 
eps 
Specifies plotting margin for the sequence of states. Defaults to 
allInOnePlot 
If this is 
... 
Further graphical parameters to be passed to 
This function comprises two different types of plots:
The "table" mode visualizes the gene values of the states in the attractor and is only suited for synchronous or steadystate attractors. Complex asynchronous attractors are omitted in this mode. Attractors in attractorInfo
are first grouped by length. Then, a figure is plotted to the currently selected device for each attractor length (i.e. one plot with all attractors consisting of 1 state, one plot with all attractors consisting of 2 states, etc.). If ask=TRUE
and the standard X11 output device is used, the user must confirm that the next plot for the next attractor size should be shown.
The figure is a table with the genes in the rows and the states of the attractors in the columns. Cells of the table are (by default) red for 0/OFF values and green for 1/ON values. If grouping
is set, the genes are rearranged according to the indices in the group, horizontal separation lines are plotted between the groups, and the group names are printed.
The "graph" mode visualizes the transitions between different states. It creates a graph in which the vertices are the states in the attractor and the edges are state transitions among these states. This mode can visualize all kinds of attractors, including complex/loose attractors. One plot is drawn for each attractor. As before, this means that on the standard output device, only the last plot is displayed unless you set par(mfrow=c(...))
accordingly.
If mode="table"
, a list of matrices corresponding to the tables is returned. Each of these matrices has the genes in the rows and the states of the attractors in the columns.
If mode="graph"
, a list of objects of class igraph
is returned. Each of these objects describes the graph for one attractor.
getAttractors
, simulateSymbolicModel
, attractorsToLaTeX
, plotSequence
, sequenceToLaTeX
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25  # load example data
data(cellcycle)
# get attractors
attractors < getAttractors(cellcycle)
# calculate number of different attractor lengths,
# and plot attractors side by side in "table" mode
par(mfrow=c(1, length(table(sapply(attractors$attractors,
function(attractor)
{
length(attractor$involvedStates)
})))))
plotAttractors(attractors)
# plot attractors in "graph" mode
par(mfrow=c(1, length(attractors$attractors)))
plotAttractors(attractors, mode="graph")
# identify asynchronous attractors
attractors < getAttractors(cellcycle, type="asynchronous")
# plot attractors in "graph" mode
par(mfrow=c(1, length(attractors$attractors)))
plotAttractors(attractors, mode="graph")

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.