simulateParallelInSilicoSystem: Simulates an in silico system in parallel.

Description Usage Arguments Value Examples

View source: R/stochastic_simulation.R

Description

Simulates (stochastically) the behaviour of an in silico system over time using parallelisation, i.e. the expression of the different genes.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
simulateParallelInSilicoSystem(
  insilicosystem,
  insilicopopulation,
  simtime,
  nepochs = -1,
  ntrials = 1,
  simalgorithm = "Direct",
  writefile = F,
  filepath = NULL,
  filename = "simulation",
  no_cores = parallel::detectCores() - 1,
  ev = getJuliaEvaluator()
)

Arguments

insilicosystem

The in silico system to be simulated (see createInSilicoSystem).

insilicopopulation

The in silico population to be simulated (see createInSilicoPopulation).

simtime

The final time of the simulation (in seconds).

nepochs

The number of times to record the state of the system during the simulation.

ntrials

The number of times the simulation must be replicated (for each individual).

simalgorithm

The name of the simulation algorithm to use in the Julia function simulate from the module BioSimulator. Possible values are: "Direct", "EnhancedDirect", "SortingDirect", "FirstReaction", "NextReaction", "TauLeapingDG2001", "TauLeapingDGLP2003", "StepAnticipation", "HybridSAL". See https://alanderos91.github.io/BioSimulator.jl/dev/man/algorithms/ for details about the algorithms.

writefile

Does the julia function write the species and reactions lists in a text file?

filepath

If writefile = TRUE, path to the folder in which the files will be created (default: current working directory).

filename

If writefile = TRUE, prefix of the files created to store the lists of species and reactions.

no_cores

The number of cores to use for the simulation. By default use the function detectCores from the parallel package to detect the number of available cores, and use this number - 1 for the simulation.

ev

A Julia evaluator. If none provided select the current evaluator or create one if no evaluator exists.

Value

A list composed of:

Examples

1
2
3
4
5
6
mysystem = createInSilicoSystem(G = 5, regcomplexes = "none", ploidy = 2)
mypop = createInSilicoPopulation(15, mysystem)
sim = simulateParallelInSilicoSystem(mysystem, mypop, 1000)
head(sim$Simulation)
## Visualising the result
plotSimulation(sim$Simulation)

sismonr documentation built on Feb. 11, 2020, 9:07 a.m.