simulateNetwork {BoolFilter} | R Documentation |
Simulates a Boolean network and generates noise of user-defined model preference and paramters.
simulateNetwork(net, n.data, p, obsModel)
net |
A boolean Network object (specified in BoolNet vernacular) to be simulated |
n.data |
Length of time-series to simulate |
p |
Process noise to build into the simulation. Should be 0<p<0.5. |
obsModel |
Parameters for the chosen observation model. |
The simulateNetwork
function can simulate many observation models to create observational data. An overvoew of how to use the various types of observation models present in BoolFilter
is given below:
Bernoulli observation model requires only one parameter, aside from declaring the type, e.g.
obsModel = list(type = 'Bernoulli', q = 0.05)
Gaussian observation model requires a vector of the observation parameters, which include the mean and standard deviation of Boolean variables in inactivated and activated states. This will be defined as a vector, e.g.
mu0 = 1
sigma0 = 2
mu1 = 5
sigma1 = 2
obsModel = list(type = 'Gaussian', model = c(mu0, sigma0, mu1, sigma1))
Poisson observation model requires a list of parameters. This list will have 3 entries in addition to the type definition, for a total of 4 entries:
Sequencing depth s
Baseline espression in inactivated state, referred to as mu
The differential expression, referred to as delta
, which must be input as a vector of the same length as the number of genes in the network.
In this way, the user can define the exact observation parameter for each individual gene. For a 4-gene network, a potential obsModel
parameter for a Poisson distribution could be defined as:
obsModel = list(type = 'Poisson', s = 10.875, mu = 0.01, delta = c(2, 2, 2, 2))
Negative-Binomial observation models also require a list of parameters. This list will have 4 entries in addition to the type definition, for a total of 5 entries:
Sequencing depth s
Baseline espression in inactivated state, referred to as mu
Differential expression, referred to as delta
, which must be input as a vector of the same length as the number of genes in the network.
Inverse Dispersion, referred to as phi
, which must also be input as a vector of the same length as the number of genes in the network.
For a 4-gene network, a potential obsModel
parameter for a Negative-Binomial observation model could be defined as:
delta = c(2, 2, 2, 2)
phi = c(3, 3, 3, 3)
obsModel = list(type = 'NB', s = 10.875, mu = 0.01, delta, phi)
X |
Original Boolean state trajectory, without observation noise |
Y |
Observation trajectory |
data(p53net_DNAdsb1) #generate data from poisson observation model dataPoisson <- simulateNetwork(p53net_DNAdsb1, n.data = 100, p = 0.02, obsModel = list(type = 'Poisson', s = 10.875, mu = 0.01, delta = c(2,2,2,2))) #generate data from Bernoulli observation model dataBernoulli <- simulateNetwork(p53net_DNAdsb1, n.data = 100, p = 0.02, obsModel = list(type = 'Bernoulli', q = 0.05))