booldog.ode module

booldog.ode.ODE_factory(graph, transform, **kwargs)

Create a booldog.ode.ODE from RegulatoryNetwork.

Parameters
  • graph (RegulatoryNetwork or BooleanGraph) – Input graph.

  • transform (str) – One of accepted transforms. See booldog.ode.transforms or Notes for options.

  • **kwargs – Additional arguments and keyword arguments passed to specific parent class initializer.

Returns

ode – A ODE system

Return type

booldog.ode.ODE

Notes

For specific transforms, see the relevant parent class for keyword arguments (**kwargs).

The parent class per transform is defined in booldog.ode.ode_parent_classes.

If the parameter is an int or float, the value is assigned for all variables. Otherwise the parameter argument should be a dict with keys as node names and values for their initial state. In this case, if the initial state is not defined for all nodes, a default key with the default value should also be present in the dict.

Here follows a summary of the transform-specific keyword arguments

‘squad’

‘boolecube’

‘hillcube’

‘normalisedhillcube’

class booldog.ode.BoolCubeODE(transform, tau=1, n=3, k=0.5, **kwargs)

Bases: object

An ODE parent class.

Use of multivariate polynomial interpolation for the transformation of a Boolean graph to a system of ODEs.

dxdt
Type

function

param_tau

life-time of species

Type

arraylike

param_n

Hill coefficient

Type

arraylike

param_k

Hill dissociation constant

Type

arraylike

param_dict

track parameters

Type

dict

Initialise BoolCube ODE system.

Parameters
  • transform (str) –

  • tau (int, float, or dict, optional) – life-time of species

  • n (int, float, or dict, optional) – Hill coefficient

  • k (int, float, or dict, optional) – Hill dissociation constant

Notes

Only used as Parent class.

tau_i = zero –> dx_i/dt = 0

References

[1] Wittmann, D. M., Krumsiek, J., Saez-Rodriguez, J., Lauffenburger, D., A., Klamt, S., & Theis, F. J. (2009). Transforming Boolean models to continuous models: Methodology and application to T-cell receptor signaling. BMC Systems Biology, 3(1), 98. https://doi.org/10.1186/1752-0509-3-98

hill(x_array)
normalised_hill(x_array)
identity(x_array)
homologue_b1(verbose=False)

Create function to calculate the multivariate polynomial interpolation of Boolean functions

Returns

B1

Return type

function

class booldog.ode.SquadODE(transform, gamma=1, h=10, **kwargs)

Bases: object

An ODE parent class.

Use of SQUAD for the transformation of a Boolean graph to a system of ODEs.

dxdt
Type

function

param_gamma

decay rate

Type

arraylike

param_h

sigmoidal gain

Type

arraylike

Act

activator matrix

Type

arraylike

Inh

inhibitor matrix

Type

arraylike

Transform a Activation/Inhibition Boolean network into an ODE system via SQUAD transform.

Parameters
  • transform (str) –

  • gamma (int, float, or dict, optional) – decay rate

  • h (int, float, or dict, optional) – sigmoidal gain

Notes

Only used as Parent class.

References

[1] Di Cara, A., Garg, A., De Micheli, G., Xenarios, I., & Mendoza, L. (2007). Dynamic simulation of regulatory networks using SQUAD. BMC Bioinformatics, 8(1), 1–10. https://doi.org/10.1186/1471-2105-8-462

class booldog.ode.ShaoODE(graph, **kwargs)

Bases: object

Source: From Boolean Network Model to Continuous Model Helps in Design of Functional Circuits

class booldog.ode.RacipeODE(graph, transform, gamma=1, h=10, **kwargs)

Bases: object

Transform a Activation/Inhibition Boolean network into an ODE system via the RACIPE transform.

If ODE parameters are passed as an int or float, the value is assigned for all variables other wise a dict with a ‘default’ key and value, and key value pairs for all others.

Parameters
  • gamma (float, dict) – decay rate

  • h (float, dict) – gain(?)

booldog.ode.ode_parent_classes = {'boolecube': <class 'booldog.ode.BoolCubeODE'>, 'hillcube': <class 'booldog.ode.BoolCubeODE'>, 'normalisedhillcube': <class 'booldog.ode.BoolCubeODE'>, 'shao': <class 'booldog.ode.ShaoODE'>, 'squad': <class 'booldog.ode.SquadODE'>}

transform to parent class translation

Type

dict

class booldog.ode.ODE(graph, transform, **kwargs)

Bases: booldog.ode.ShaoODE, booldog.ode.BoolCubeODE, booldog.ode.SquadODE

Generic ODE class produced by factory.

Parent class is a variable, and defined by transform argument.

Initialise ODE

Parameters
  • graph (booldog.BooleanGraph) –

  • transform (str) –

  • **kwargs – In the case graph is not a BooleanGraph instance, additional keyword arguments passed to booldog.BooleanGraph.

event_function(t, x, event_t, *args)

Event function for events of scipy.integrate.solve_ivp.

Parameters
  • t (float) – Time-point of simulation

  • x (narray) –

  • event_t (float) – Time-point of event

  • *args – ignored

terminal
Type

True

hill(x_array)
homologue_b1(verbose=False)

Create function to calculate the multivariate polynomial interpolation of Boolean functions

Returns

B1

Return type

function

identity(x_array)
normalised_hill(x_array)
update(off_nodes=None)

Resets dxdt

Shortcut to parent class’s _get_system method.

Parameters

off_nodes (list of int, optional) – List of node indices to set derivative to 0, i.e. these nodes will remain constant in simulation.

booldog.ode.transforms = {'boolecube', 'hillcube', 'normalisedhillcube', 'shao', 'squad'}

list of accepted ODE transforms

Type

set