Models
Here we provide a high-level overview of model development in LimbNET, from the overall model specification structure, restrictions, operators, and predefined variables and functions.
Model structure
Compartments
In general, model variables may exist in one of three compartments:
- The global compartment,
- The mesenchyme compartment,
- The ectoderm compartment.
Model variables defined in the global compartment are available in equations in all other compartments. However, variables defined in the mesenchyme or ectoderm compartments are only available in equations defined in the same compartment.
The global compartment is intended for use in defining parameters and other global variables that are not spatially-dependent. Global variables are one-dimensional i.e., they are not spatially-dependent, but may vary in time.
The mesenchyme and ectoderm compartments are intended for use in defining variables that are spatially-dependent.
For more information on the mesenchyme and ectoderm compartments, and spatio-temporal domains, see morphomovies.
Model variables
Throughout the model specification, we refer to variables or model variables as the quantities that are defined in the model specification, and whose values are computed by the model simulation. Unless otherwise specifically stated, these terms should be taken as referring to all variables defined in the model specification, including parameters, reactants, and other variables. Model variables are assumed to be continuous, and may take any real numerical value.
Global model variables
Global model variables are defined in the global compartment, and are available in equations in all other compartments. They can be of two types:
- Parameters are constant throughout the simulation. They correspond to a named numerical value.
- Variables may vary in time, and which are computed at each time step by the model simulation.
They are defined according to an equation that may include other global variables, parameters, and built-in functions.
Additionally, it is possible to use spatio-temporal variables from the mesenchyme and ectoderm compartments in the definition of global variables, if they are used as an argument to a "reducing" function that returns a single value, e.g.,
max(a)
ormin(a)
.
Mesenchyme compartment model variables
For a given spatio-temporal domain (see morphomovies), model variables defined in the mesenchyme compartment correspond to a spatio-temporal pattern, i.e., a function of space and time, in two spatial dimensions. Model variables defined here are available in equations in the mesenchyme compartment.
Three types of model variables may be defined in the mesenchyme compartment:
- Predefined patterns are spatio-temporal patterns that, as the name may suggest, are already defined in LimbNET. They may vary in both space and time, however they are "pre-baked" and can never be affected by other model variables; they essentially act as a premade "feed-forward" input to the model. Available predefined patterns can be browsed and previewed in the Molecular Field Sequences explorer in the LimbNET UI.
- Variables may vary in both space and time, and are computed at each time step by the model simulation. They are defined according to an equation that may include other model variables from the global and/or mesenchyme compartments, and built-in functions.
- Reactants may vary in both space and time, and are again computed at each time step, however they are defined according to both a reaction equation and optional diffusion and noise components. The equations for the reaction, diffusion, and noise may all be written as functions of other model variables from the global and/or mesenchyme compartments, and built-in functions. Additionally, it is possible to define initial conditions for reactants which may be constant, random, or a predefined pattern.
Ectoderm compartment variables
As with mesenchyme compartment model variables, model variables defined in the ectoderm compartment correspond to a spatio-temporal pattern, however as opposed to the mesenchyme compartment, they are only defined along the domain boundary. Model variables defined here are available in equations in the ectoderm compartment.
As in the mesenchyme compartment, three equivalent types of model variables may be defined in the ectoderm compartment. All three function similarly to the equivalent model variable types defined in the mesenchyme, however equations for model variables in the ectoderm compartment may only be defined in terms of other model variables from the global and/or ectoderm compartments, and built-in functions.
Intercompartmental (mesenchyme/ectoderm) connections
In order for model variables defined in the ectoderm compartment to be able to affect model variables defined in the mesenchyme compartment, or vice versa, it is necessary to define an intercompartmental connection between the two compartments. Currently, this is defined as a pair of reactants in each compartment, which are linked by a connection strength. The connection strength governs the rate of transfer of material between the two compartments per time step.
For example, if we have a reactant A
in the mesenchyme compartment, and a reactant B
in the ectoderm compartment, we would normally choose a symmetrical connection strength of 1.0
.
This can be used to emulate boundary conditions on the mesenchyme, for example by defining a reactant in the ectoderm compartment that is driven to a steady state, and which is connected to a reactant in the mesenchyme compartment with a connection strength of 1.0
.
Restrictions
There are some limitations to the model specification, and consequently some restrictions that must be observed when writing a model specification, and equations.
In particular, some keywords are reserved and may not be used for naming functions, parameters, variables, reactants or any other component or identifier definitions in the Reaction-Diffusion model specification.
Note
They may, however, of course still be referenced, e.g., a reserved built-in variable may be used directly in the right-hand-side definition of an equation.
Reserved keywords
The following keywords may not be used to name or define any parameter, variable, or reactant:
- All built-in variables
- All built-in functions
- Any keyword in the list of other restricted keywords, that are reserved for future use:
False, None, True, and,
as, break, continue, def,
elif, else, for, if,
in, is, not, or,
pass, return, while, with,
lambda
Naming variables
Variable names may consist of any combination of alphanumeric characters (a-z
, A-Z
, 0-9
), and the underscore (_
).
Names are case-sensitive.
Names may begin with an underscore, or a letter; they may not begin with a number.
For example, zeta
, _zeta
, _z3ta
, and zeta3
are all valid variable names; 3zeta
would not be valid.
Permitted and invalid symbols
A limited set of characters are permitted in equation definitions.
Aside from alphanumeric characters as detailed earlier in naming variables, only left/right parentheses - (
and )
- and the arithmetic and boolean operators defined below, are valid inside equation definitions.
Arithmetic operators
- Addition
+
- Subtraction/Unary Minus
-
- Multiplication
*
- Division
/
Note
Exponentiation (power) operation is accessed via the pow
function, defined below.
There is no exponentiation operator.
"Boolean" logical operators
- Less than
<
- Greater than
>
- Less than or equal
<=
- Greater than or equal
>=
Note
Boolean operations treat inputs as floating point values.
The output of a Boolean operation is likewise treated as a floating point value: i.e., an operation that evaluates to True
within an equation will be treated as 1.0
; likewise an operation that evaluates to False
will be treated as 0.0
.
Built-in variables
t
Simulation time, in units of minutes. Range of valid t in the limb bud timecourse is from 14960 minutes, to 17760 minutes (inclusive).
x
The spatial x-coordinate. Evaluated at the centroid of a given element. Only available in the mesenchyme compartment. See available morphomovies for details of spatial coordinates and the domain geometry for available domains.
y
The spatial y-coordinate. Evaluated at the centroid of a given element. Only available in the mesenchyme compartment. See available morphomovies for details of spatial coordinates and the domain geometry for available domains.
s
Distance along the domain boundary (e.g., the ectoderm).
Evaluated at the centroid of a given element.
Values in the range [0, 1]
.
Only available in the ectoderm compartment.
Built-in functions
LimbNET provides a number of built-in mathematical functions and operations that may be used as part of an equation for a variable or a reactant.
pow(a, b)
Power function; raises the first argument \(a\) to the power \(b\), i.e.,
Arguments:
- \(a\): a number, or any variable valid within the current compartment.
- \(b\): a number, or any variable valid within the current compartment.
exp(a)
Exponential function; raises the mathematical constant \(e\) to the power of the argument \(a\), i.e.,
Arguments:
- \(a\): a number, or any variable valid within the current compartment.
hillup(u, k, mu)
Monotonically increasing sigmoidal/Hill function representing upregulation as a function of an input concentration \([u]\), a steepness \(\mu\), and a half-max \(k\) (the value of \([u]\) at which the function's output is at 50% of its maximum).
Arguments:
- \([u]\): a spatio-temporal model variable defined in the current compartment (cannot be a global variable or parameter).
- \(k\): a number, or a global variable/parameter.
- \(\mu\): a number, or a global variable/parameter.
hilldn(u, k, mu)
Monotonically decreasing sigmoidal/Hill function representing inhibition/downregulation as a function of an input concentration \([u]\), a steepness \(\mu\), and a half-max \(k\) (the value of \([u]\) at which the function's output is at 50% of its maximum).
Arguments:
- \([u]\): a spatio-temporal model variable defined in the current compartment (cannot be a global variable or parameter).
- \(k\): a number, or a global variable/parameter.
- \(\mu\): a number, or a global variable/parameter.
max(a), max(a, b)
Maximum function; returns the maximum of its argument(s).
There are two variants of the max
function:
max(a)
computes the maximum of all values of the spatio-temporal variable \(a\) at the current time step. Returns a single value. May be used in any compartment: in a global variable definition this function will return a single value; in the definition of a variable or reactant in the mesenchyme or ectoderm compartments this function will return a single uniform value over the spatial domain for the current time step. The argument \(a\) must be a spatio-temporal variable defined in the current compartment, or in the case of an equation for a global variable \(a\) must be a spatio-temporal variable but may come from any compartment.max(a, b)
computes the maximum of its arguments \(a\) and \(b\). \(a\) and \(b\) may be either numbers, or spatio-temporal variables valid for the current compartment, or a combination. If both are numbers, returns a single value; this may be used in any compartment, including the global compartment, and the return value is treated as in form (1.) of the function above. If either \(a\) or \(b\) is a spatio-temporal variable, or both are, returns a spatio-temporal variable defined in the current compartment; this variant may not be used in the global compartment. In this case, \(a\) and \(b\) must be valid variables for the current compartment, and the return value is the maximum of the values of \(a\) and \(b\) at each point in the spatial domain, for the current time step.
min(a), min(a, b)
Minimum function; returns the minimum of its argument(s).
There are two variants of the min
function, and they behave as the max
function variants described above.
abs(a)
Absolute value function; returns the absolute value of its argument \(a\).
Arguments:
- \(a\): a number, or any variable valid within the current compartment.
sin(a)
Sine function; returns the sine of its argument \(a\).
Arguments:
- \(a\): a number, or any variable valid within the current compartment.
cos(a)
Cosine function; returns the cosine of its argument \(a\).
Arguments:
- \(a\): a number, or any variable valid within the current compartment.