Learn R Programming

BoolNet (version 1.44)

stateTransition: Perform a transition to the next state

Description

Calculates the next state in a supplied network for a given current state

Usage

stateTransition(network,
                state,
                type = c("synchronous","asynchronous","probabilistic"),
                geneProbabilities, 
                chosenGene, 
                chosenFunctions)

Arguments

network
A network structure of class BooleanNetwork or ProbabilisticBooleanNetwork. These networks can be read from files by loadNetwork, generated by latex{ }
state
The current state of the network, encoded as a vector with one 0-1 element for each gene.
type
The type of transition to be performed. If set to "synchronous", all genes are updated using the corresponding transition functions. If set to "asynchronous", only one gene is updated. This gene is either chosen randomly or supplied in paramet
geneProbabilities
An optional vector of probabilities for the genes if type="asynchronous". By default, each gene has the same probability to be chosen for the next state transition. These probabilities can be modified by supplying a vector of probabilities fo
chosenGene
If type="asynchronous" and this parameter is supplied, no random update is performed. Instead, the gene with the supplied name or index is chosen for the next transition.
chosenFunctions
If type="probabilistic", this parameter can contain a set of function indices for each gene. In this case, transition functions are not chosen randomly, but the provided functions are used in the state transition.

Value

  • The subsequent state of the network, encoded as a vector with one 0-1 element for each gene.

See Also

loadNetwork, generateRandomNKNetwork

Examples

Run this code
library(BoolNet)

# load example network
data(cellcycle)

# calculate a synchronous state transition
print(stateTransition(cellcycle, c(1,1,1,1,1,1,1,1,1,1)))

# calculate an asynchronous state transition of gene CycA
print(stateTransition(cellcycle, c(1,1,1,1,1,1,1,1,1,1),
                      type="asynchronous", chosenGene="cyca"))
                      
# load probabilistic network
data(examplePBN)

# perform a probabilistic state transition
print(stateTransition(examplePBN, c(0,1,1),
                      type="probabilistic"))

Run the code above in your browser using DataLab