plotSequence | R Documentation |
Visualizes sequences of states in synchronous Boolean networks, either by drawing a table of the involved states in two colors, or by drawing a graph of transitions between the successive states.
plotSequence(network,
startState,
includeAttractorStates = c("all","first","none"),
sequence,
title = "",
mode=c("table","graph"),
plotFixed = TRUE, grouping = list(),
onColor="#4daf4a",
offColor = "#e41a1c",
layout,
drawLabels=TRUE,
drawLegend=TRUE,
highlightAttractor=TRUE,
reverse = FALSE,
borderColor = "black",
eps=0.1,
attractor.sep.lwd = 2,
attractor.sep.col = "blue",
...)
network |
An object of class |
startState |
The start state of the sequence |
includeAttractorStates |
Specifies whether the actual attractor states are included in the plot or not (see also |
sequence |
The alternative call to |
title |
An optional title for the plot |
mode |
Switches between two kinds of attractor plots. See Details for more information. Default is "table". |
plotFixed |
This optional parameter is only used if |
grouping |
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 |
highlightAttractor |
If set to true, the attractor states are highlighted in the plot. If |
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 |
attractor.sep.lwd |
Specifies the line width of the attractor separator. Defaults to |
attractor.sep.col |
Specifies the line color of the attractor separator. Defaults to |
... |
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 sequence. The figure is a table with the genes in the rows and the successive states of the sequence 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 sequence and the edges are state transitions among these states.
The function can be called with different types of inputs: The user can specify the parameters network
, startState
and includeAttractorStates
), in which case getPathToAttractor
is called to obtain the sequence. Alternatively, the sequence can be supplied directly as a data frame in the sequence
parameter.
If mode="table"
, a matrix corresponding to the table is returned. The matrix has the genes in the rows and the states of the attractors in the columns. If sequence
was supplied, this corresponds to the transposed input whose rows may be rearranged if grouping
was set.
If mode="graph"
, an object of class igraph
describing the graph for the sequence is returned.
sequenceToLaTeX
, plotAttractors
, attractorsToLaTeX
, getPathToAttractor
, getAttractorSequence
, simulateSymbolicModel
## Not run:
# load example data
data(cellcycle)
# alternative 1: supply network and start state
# and plot sequence as a table
plotSequence(network=cellcycle,
startState=rep(1,10),
includeAttractorStates="all")
# alternative 2: calculate sequence in advance
sequence <- getPathToAttractor(cellcycle,
state=rep(1,10),
includeAttractorStates="all")
# plot sequence as a graph
plotSequence(sequence=sequence,
mode="graph")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.