sequenceToLaTeX {BoolNet} | R Documentation |
Create LaTeX table of state sequences
Description
Exports tables of state sequences (corresponding to the plot generated by plotSequence
with mode="table"
) to a LaTeX document.
Usage
sequenceToLaTeX(network,
startState,
includeAttractorStates = c("all","first","none"),
sequence,
title = "",
grouping = list(),
plotFixed = TRUE,
onColor="[gray]{0.9}",
offColor="[gray]{0.6}",
highlightAttractor=TRUE,
reverse = FALSE,
file="sequence.tex")
Arguments
network |
An object of class |
startState |
The start state of the sequence |
includeAttractorStates |
Specifies whether the actual attractor states are included in the table or not (see also |
sequence |
The alternative call to |
title |
An optional title for the table |
plotFixed |
If this is true, genes with fixed values are included in the plot. Otherwise, these genes are not shown. |
grouping |
This optional parameter specifies a structure to form groups of genes in the table. This is a list with the following elements:
|
onColor |
An optional color value for the 1/ON values in the table. Defaults to dark grey. |
offColor |
An optional color value for the 0/OFF values in the table. Defaults to light grey. |
highlightAttractor |
If set to true, the attractor states are highlighted in the plot by drawing a line at the begin of the attractor and labeling the states correspondingly. Information on the attractor must be supplied in the attribute |
reverse |
Specifies the order of the genes in the plot. By default, the first gene is placed in the first row of the table. If |
file |
The file to which the LaTeX document is written. Defaults to "sequence.tex". |
Details
This function creates a LaTeX table that visualizes a sequence of states in a synchronous network.
The output file does not contain a document header and requires the inclusion of the packages tabularx
and colortbl
. The tables have the genes in the rows and the successive states of the sequence in the columns. If not specified otherwise, cells of the table are light grey for 0/OFF values and dark grey 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 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.
Value
Returns a matrix corresponding to the table. 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.
See Also
attractorsToLaTeX
, plotSequence
, plotAttractors
, getPathToAttractor
, getAttractorSequence
.
Examples
## Not run:
# load example data
data(cellcycle)
# alternative 1: supply network and start state
# and export sequence to LaTeX
sequenceToLaTeX(network=cellcycle,
startState=rep(1,10),
includeAttractorStates="all",
file="sequence.txt")
# alternative 2: calculate sequence in advance
sequence <- getPathToAttractor(cellcycle,
state=rep(1,10),
includeAttractorStates="all")
sequenceToLaTeX(sequence=sequence,
file="sequence.txt")
## End(Not run)