Skip to content

InheritanceEnsemble specification

Tim Vaughan edited this page Feb 27, 2017 · 14 revisions

The InheritanceEnsemble simulation is a trivial extension to the InheritanceTrajectory-specification that adds the capacity to generate multiple trajectories using a single MASTER execution. At the outermost level, it is defined using the following <run> element:

    <run spec='InheritanceEnsemble'
         nTraj="INTEGER"
         simulationTime="DOUBLE"
         samplePopulationSizes="BOOLEAN"
         nSamples="INTEGER"
         sampleAtNodesOnly="BOOLEAN"
         seed="INTEGER"
         recordTrajLogP="BOOLEAN"
         maxConditionRejects="INTEGER"
         verbosity="INTEGER">

      <!-- Model -->

      <!-- Initial State -->

      <!-- Population End Conditions-->

      <!-- Lineage End Conditions -->

      <!-- Leaf-count End Conditions -->

      <!-- Inheritance Post-Processors -->

      <!-- Leaf-count Post-Simulation Conditions -->

      <!-- Outputs-->

    </run>

The nTraj attribute specifies the number of independent inheritance trajectories to generate in this simulation run. Trajectories discarded due to a rejection end condition are not included in this count.

The simulationTime attribute specifies the length of time the simulation is run for. This becomes a maximum time when other explicit end conditions are included.

The samplePopulationSizes attribute determines whether population sizes will be recorded along with inheritance information. If set to true, the nSamples attribute sets a fixed number of evenly spaced times at which population size samples will be recorded. If nSamples is left undefined, population sizes are sampled following every simulated reaction - unless sampleAtNodesOnly is set to "true", in which case population sizes are sampled only when new nodes are created in the inheritance graph.

If provided, the values of the seed attribute is used to initialize the random number generator. If this is absent, a different seed is selected every time the simulation is run.

The optional recordTrajLogP attribute is used to tell MASTER to compute the probability density of each simulated population size trajectory. These densities will be approximate if an approximate stochastic integration stepper is used. Furthermore, be aware that these are trajectory densities rather than inheritance graph densities. The resulting density is recorded in any JSON output element. The default value of this attribute is "false".

The optional maxConditionRejects attribute is used to set a limit on the number of times each InheritanceTrajectory simulation is restarted due to a rejection condition (either a post-simulation condition or a simulation end condition). Additional rejections cause MASTER to skip that simulation.

The verbosity attribute determines the amount of descriptive output to send to the screen during the simulation, on a scale of 0-3 where 0 means no output causes a maximum amount of output to be displayed.

The following elements are described in detail on their own pages:

Note that only the nTraj, the model and the initial state are absolutely mandatory - all other elements and attributes are optional. However, certain combinations of elements and attributes do not make sense. In particular, an error will be raised if simulationTime is unspecified and no end conditions are included, as this will result in an unending calculation. Additionally, while it is possible to specify no output elements, there is no point to performing the calculation if at least one is not included.