stateTransition {BoolNet} | R Documentation |
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,
timeStep = 0)
Arguments
network |
A network structure of class |
state |
The current state of the network, encoded as a vector with one 0-1 element for each gene. If |
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 parameter If set to "probabilistic", one transition function is chosen for each gene, and the genes are updated synchronously. The functions are either chosen randomly depending on their probabilities, or they are supplied in parameter Default is "synchronous" for objects of class |
geneProbabilities |
An optional vector of probabilities for the genes if |
chosenGene |
If |
chosenFunctions |
If |
timeStep |
An optional parameter that specifies the current time step associated with |
Value
The subsequent state of the network, encoded as a vector with one 0-1 element for each gene.
See Also
loadNetwork
, generateRandomNKNetwork
, generateState
Examples
## Not run:
# 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"))
## End(Not run)