simulateUGENE: Simulates an inferred gene regulatory network

Description Usage Arguments Value Examples

View source: R/simulateUGENE.R

Description

Given the output of inferNetwork (object of class "ugene"), simulates the network given the learned random forests for each node.

Usage

1
simulateUGENE(ugene, x0, tend = 100, dt = 0.1, stochastic = FALSE, mask = NULL)

Arguments

ugene

Required. Output of the inferNetwork() function.

x0

Required. A data.frame object with a single row, giving the initial concentrations of all the genes in the network. The order must be the same as that in the data provided to inferNetwork().

tend

Final simulation time. Defaults to 100. Positive numeric.

dt

Interval between two time steps. Defaults to 0.1. With tend=100, this implies a total of 1000 time steps, plus the initial concentrations. Positive numeric, must be smaller than tend.

stochastic

An optional logical argument specifying whether the outputs of random forests are treated as deterministic (FALSE) or as a distribution from which a sample is drawn (TRUE). Defaults to FALSE.

mask

Optional. Same format as the mask argument in tuneThreshold(). To simulate a sparse network where edges are removed according to tuneThreshold(), a mask must be provided.

Value

Returns an object of class "simulation" containing the time stamps in result.t and simulated values of all genes in result.x

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
  # deterministic
  x0 <- dynUGENE::Repressilator[1, 2:7]
  ugene <- inferNetwork(Repressilator, mtry = 3L)
  trajectory <- simulateUGENE(ugene, x0)
  plotTrajectory(trajectory, c("p3", "p2", "p1"))

  # stochastic
  trajectory <- simulateUGENE(ugene, x0, stochastic = TRUE)
  plotTrajectory(trajectory, c("p3", "p2", "p1"))

## End(Not run)

tianyu-lu/dynUGENE documentation built on Jan. 7, 2021, 6:27 p.m.