get_reached_states {pastboon}R Documentation

Obtain the reached states

Description

Obtains the reached states after simulating a Boolean network for a specified number of time-steps.

Usage

get_reached_states(net, method = c("BNp", "SDDS", "PEW"), params, steps,
                   repeats = NULL, initial_states = NULL, asynchronous = TRUE,
                   update_prob = NULL)

Arguments

net

A network structure of the class BooleanNetwork from the BoolNet package.

method

The parameterization method to be used. Options are:

  • "BNp": Boolean network with perturbations.

  • "SDDS": Stochastic discrete dynamical systems.

  • "PEW": Boolean network with probabilistic edge weights.

Each method requires a different format for the params argument.

params

The parameter values depending on method:

  • For method = "BNp", a single vector of probabilities, equal in length to the number of network nodes.

  • For method = "SDDS", a list of four equal-length vectors of probabilities: p00, p01, p10, and p11, each equal in length to the number of network nodes.

  • For method = "PEW", a list of two equal-length vectors of probabilities: p_on and p_off, each as long as the number of network edges, ordered according to extract_edges.

steps

The number of time-steps (non-negative integer) to simulate the network.

repeats

The number of repeats (positive integer). If two or more initial states are provided via initial_states, this argument is ignored. If NULL (default), then initial_states should not be NULL.

initial_states

The set of initial states as a matrix (where each row corresponds to the binary form of a state) or a vector (for the binary form of a single initial state). The number of matrix columns (or the length of the vector) should match the number of network nodes. The order of the nodes in the columns (or vector) is considered the same as net$genes. If NULL (default), initial states are chosen randomly for repeats number of times based on a uniform distribution, requiring repeats not to be NULL.

asynchronous

If TRUE, the asynchronous update scheme is used, where a single node is updated at each time-step. In this case, update_prob indicates update probabilities. If FALSE, the synchronous update scheme is utilized.

update_prob

The probability of updating each variable (node) in each time-step when asynchronous = TRUE. If NULL (default), nodes are updated randomly based on a uniform distribution. If asynchronous = FALSE, this argument is ignored.

Details

This function returns the reached states (the states in the last time-step) after simulating a network for steps time-steps and repeating it for repeats number of times. If initial_states is NULL, then the initial states are chosen randomly based on a uniform distribution for repeats number of times, resulting in repeats number of reached states. If two or more initial states are provided by the user, then the repeats argument is ignored, and one reached state is returned for each initial state. If repeats is NULL, the number of returned reached states equals the number of initial states (one reached state for each initial state). The arguments repeats and initial_states should not both be NULL simultaneously.

Value

A matrix where each row is the binary form of a reached state, and each column corresponds to a network node. The order of the nodes in the columns is the same as net$genes.

References

Golinelli, O., & Derrida, B. (1989). Barrier heights in the Kauffman model. Journal De Physique, 50(13), 1587-1601.

Shmulevich, I., Dougherty, E. R., & Zhang, W. (2002). Gene perturbation and intervention in probabilistic Boolean networks. Bioinformatics, 18(10), 1319-1331.

Trairatphisan, P., Mizera, A., Pang, J., Tantar, A. A., Schneider, J., & Sauter, T. (2013). Recent development and biomedical applications of probabilistic Boolean networks. Cell communication and signaling, 11, 1-25.

Murrugarra, D., Veliz-Cuba, A., Aguilar, B., Arat, S., & Laubenbacher, R. (2012). Modeling stochasticity and variability in gene regulatory networks. EURASIP Journal on Bioinformatics and Systems Biology, 2012, 1-11.

Deritei, D., Kunšič, N., & Csermely, P. (2022). Probabilistic edge weights fine-tune Boolean network dynamics. PLoS Computational Biology, 18(10), e1010536.

Examples


# >>>>>>>>>>>>>>>>  Load network and generate random initial states  <<<<<<<<<<<<<<<<<

# Load the example network
data(lac_operon_net)

# Generate a single initial state
initial_state <- sample(c(0, 1), length(lac_operon_net$genes), replace = TRUE)

# Generate multiple (10) initial states
initial_states <- matrix(sample(c(0, 1), 10 * length(lac_operon_net$genes),
    replace = TRUE), nrow = 10, ncol = length(lac_operon_net$genes))

# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  Method: BNp  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

# Define the parameters for the BNp method
params <- rep(0.05, length(lac_operon_net$genes))

# No initial states are provided
reached_states <- get_reached_states(lac_operon_net, method = "BNp", params = params,
    steps = 100, repeats = 10)

# A single initial state is provided
reached_states <- get_reached_states(lac_operon_net, method = "BNp", params = params,
    steps = 100, initial_states = initial_state, repeats = 10)

# Multiple initial states are provided
reached_states <- get_reached_states(lac_operon_net, method = "BNp", params = params,
    steps = 100, initial_states = initial_states)

# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  Method: SDDS  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

# Define the parameters for the SDDS method
props <- rep(0.95, length(lac_operon_net$genes))
params <- list(p00 = props, p01 = props, p10 = props, p11 = props)

# No initial states are provided
reached_states <- get_reached_states(lac_operon_net, method = "SDDS", params = params,
    steps = 100, repeats = 10)

# A single initial state is provided
reached_states <- get_reached_states(lac_operon_net, method = "SDDS", params = params,
    steps = 100, initial_states = initial_state, repeats = 10)

# Multiple initial states are provided
reached_states <- get_reached_states(lac_operon_net, method = "SDDS", params = params,
    steps = 100, initial_states = initial_states)

# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>  Method: PEW  <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

# Extract edges from the network
edges <- extract_edges(lac_operon_net)

# Define the parameters for the PEW method
p_on <- runif(nrow(edges))
p_off <- runif(nrow(edges))
params <- list(p_on = p_on, p_off = p_off)

# No initial states are provided
reached_states <- get_reached_states(lac_operon_net, method = "PEW", params = params,
    steps = 100, repeats = 10)

# A single initial state is provided
reached_states <- get_reached_states(lac_operon_net, method = "PEW", params = params,
    steps = 100, initial_states = initial_state, repeats = 10)

# Multiple initial states are provided
reached_states <- get_reached_states(lac_operon_net, method = "PEW", params = params,
    steps = 100, initial_states = initial_states)

[Package pastboon version 0.1.0 Index]