Learn R Programming

BoolNet (version 1.44)

attractorsToLaTeX: Create LaTeX state table of attractors

Description

Exports state tables of attractors (corresponding to the plot generated by plotAttractors with mode="table") to a LaTeX document.

Usage

attractorsToLaTeX(attractorInfo, 
                  subset, 
                  title = "", 
                  grouping = list(), 
                  plotFixed = TRUE,
                  onColor = "[gray]{0.9}",
                  offColor = "[gray]{0.6}", 
                  file = "attractors.tex")

Arguments

attractorInfo
An object of class AttractorInfo, as returned by getAttractors
subset
An subset of attractors to be exported. This is a vector of attractor indices in attractorInfo.
grouping
An optional structure to form groups of genes in the plot. This is a list with the following elements: [object Object],[object Object]
title
An optional title for the plot
plotFixed
If this is true, genes with fixed values are included in the plot. Otherwise, these genes are not drawn.
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.
file
The file to which the LaTeX document is written. Defaults to "attractors.tex".

Value

  • A list of matrices corresponding to the plots is returned. Each of these matrices has the genes in the rows and the states of the attractors in the columns.

Details

This function creates LaTeX tables that visualize the states of synchronous attractors. Asynchronous attractors are ignored. Attractors in attractorInfo are first grouped by length. Then, a LaTeX table environment is created 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.). 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 states of the attractors 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.

See Also

getAttractors, plotAttractors

Examples

Run this code
library(BoolNet)

# load example data
data(cellcycle)

# get attractors
attractors <- getAttractors(cellcycle)

# output LaTeX document
attractorsToLaTeX(attractors, file="attractors.tex")

Run the code above in your browser using DataLab