Skip to content

Yeast cell-cycle network

The Boolean network of the budding yeast cell cycle of Li et al.

  • Class: YeastCellCycleSystem
  • Import: from skcomplex.systems.biology.systems_biology import YeastCellCycleSystem
  • Field: biology/systems_biology
  • Topics: boolean network, gene regulation, discrete map, cell cycle
  • References:
    • Li et al. 2004
    • Gros 2015

Use this system

The block imports the class and simulates the system with its default parameters and its tuned run settings.

from skcomplex.systems.biology.systems_biology import YeastCellCycleSystem

trajectory = YeastCellCycleSystem().prepare().simulate()

Parameters

The model parameters take these defaults, and set_params changes them.

Parameter Default
active ('Cln3', 'Cdh1', 'Sic1')
solver 'auto'
backend 'auto'

Tags

The system with its default parameters has these capability tags, which solvers and analyses check.

Tag Values
Time discrete
Space none
Laws update
Randomness deterministic
Domains boolean
Structure fixed

Class

The source of the class shows how it builds its components from its model parameters.

class YeastCellCycleSystem(BaseSystem):
    """The Boolean network of the budding yeast cell cycle of Li et al.

    It holds eleven proteins and their regulation.

    Every protein turns on or off with the sign of the summed activations and inhibitions by the active proteins, and
    the proteins Cln3, Cln1,2, Swi5, Cdc20, and Mcm1 decay without input. Started from the G1 state with Cln3 on, the
    cell size signal, the network runs through the phases of the cycle into the stationary G1 state. The system has the
    values `<protein>.x`.

    Args:
        active:
            The proteins that are on at the start, among `Cln3`, `MBF`, `SBF`, `Cln1_2`, `Cdh1`, `Swi5`, `Cdc20`,
            `Clb5_6`, `Sic1`, `Clb1_2`, and `Mcm1`.

        label:
            The label of the system, which names it when it is nested in another one.

        solver:
            The solver of the problem, or `'auto'` for the one the system chooses.

        backend:
            The backend that evaluates the compiled functions, or `'auto'` for the one the system chooses.

    Examples:
        >>> from skcomplex.systems.biology.systems_biology import YeastCellCycleSystem
        >>> [node.label for node in YeastCellCycleSystem().prepare().system_.elements if node.x]
        ['Cln3', 'Cdh1', 'Sic1']
    """

    field = 'biology/systems_biology'
    topics = ('boolean network', 'gene regulation', 'discrete map', 'cell cycle')
    references = ('Li et al. 2004', 'Gros 2015')
    until = 15
    dt = 1

    def __init__(
        self,
        active: Sequence[str] = YEAST_START,
        *,
        label: str = 'system',
        solver: BaseSolver | str = 'auto',
        backend: BaseBackend | str = 'auto',
    ) -> None:
        super().__init__(label, solver=solver, backend=backend)
        self.active = active

    def _prepare(self, context: Sequence[Observable] | None = None) -> None:
        """Set the system of the Boolean network of the yeast cell cycle of Li et al.

        Args:
            context:
                The observables to compile with the problem, or `None` for none.
        """
        super()._prepare(context)
        nodes = [BooleanNodeElement(name, x=int(name in self.active)) for name in YEAST_NODES]
        functions = [
            ThresholdFunctionInteraction(
                f'regulation_{name}',
                target=name,
                inputs=tuple(source for source, _ in YEAST_INPUTS[name]),
                weights=[float(weight) for _, weight in YEAST_INPUTS[name]],
                decays=name in YEAST_DECAYING,
            )
            for name in YEAST_NODES
        ]
        self.system_ = System(self.label, elements=nodes, interactions=functions)

Components

The system uses these element and interaction classes, each with its nearest class of the core.

Elements:

Interactions:

  • ThresholdFunctionInteraction, from Interaction
class BooleanNodeElement(Element):
    """Node of a Boolean network, a gene or protein that is on or off.

    Args:
        label:
            The label of the node.

        x:
            The initial value, 0 or 1.

    Examples:
        >>> from skcomplex.systems.biology.systems_biology import BooleanNodeElement
        >>> BooleanNodeElement('Sic1', x=1).x
        1
    """

    def __init__(
        self,
        label: str,
        *,
        x: Annotated[float, FiniteEnumeratedSet([0, 1])] = 0,
    ) -> None:
        super().__init__(label)
        self.x = x

class ThresholdFunctionInteraction(Interaction):
    """Synchronous update of a node by the sign of the weighted sum of its active inputs.

    The update follows Li et al.

    The node turns on when the sum `w_0 x_0 + w_1 x_1 + ...` over its inputs is positive and off when it is negative.
    When the sum is zero, a node that decays turns off and any other node keeps its value.

    Args:
        label:
            The label of the interaction.

        target:
            The path of the updated node.

        inputs:
            The paths of the input nodes.

        weights:
            The weight of every input, positive for activation and negative for inhibition.

        decays:
            Whether the node turns off without net input.

    Examples:
        >>> from skcomplex.systems.biology.systems_biology import ThresholdFunctionInteraction
        >>> ThresholdFunctionInteraction('sic1', target='Sic1', inputs=['Swi5', 'Cln1_2'], weights=[1.0, -1.0]).weights
        [1.0, -1.0]
    """

    law_classes = (UpdateLaw,)

    def __init__(
        self,
        label: str,
        *,
        target: Role,
        inputs: tuple[Role, ...],
        weights: Sequence[float] = (),
        decays: bool = False,
    ) -> None:
        super().__init__(label)
        self.target = target
        self.inputs = inputs
        self.weights = weights
        self.decays = decays

    def _prepare(self, context: SimpleNamespace) -> None:
        """Set the next value of a node from its weighted input.

        The value is 1 for a positive weighted input, 0 for a negative one, and the held or decayed value for none.

        Args:
            context:
                The namespace of the node and its inputs.
        """
        super()._prepare(context)
        weights = context.weights if self.inputs else ()
        total = sum((weight * item.x for weight, item in zip(weights, context.inputs, strict=True)), start=SR(0))
        unchanged = 0 if self.decays else context.target.x
        self.laws_: list[BaseLaw] = [
            UpdateLaw(context.target.x, where(total > 0, 1, where(total < 0, 0, unchanged))),
        ]

Equations

The equations are those that symbolic returns for the system with its default parameters.

Cln3.x: x_Cln3(t + 1) == 0
MBF.x: x_MBF(t + 1) == where(weights_regulation_MBF_1*x_Clb1_2(t) + weights_regulation_MBF_0*x_Cln3(t) > 0, 1, where(weights_regulation_MBF_1*x_Clb1_2(t) + weights_regulation_MBF_0*x_Cln3(t) < 0, 0, x_MBF(t)))
SBF.x: x_SBF(t + 1) == where(weights_regulation_SBF_1*x_Clb1_2(t) + weights_regulation_SBF_0*x_Cln3(t) > 0, 1, where(weights_regulation_SBF_1*x_Clb1_2(t) + weights_regulation_SBF_0*x_Cln3(t) < 0, 0, x_SBF(t)))
Cln1_2.x: x_Cln1_2(t + 1) == where(weights_regulation_Cln1_2_0*x_SBF(t) > 0, 1, 0)
Cdh1.x: x_Cdh1(t + 1) == where(weights_regulation_Cdh1_3*x_Cdc20(t) + weights_regulation_Cdh1_2*x_Clb1_2(t) + weights_regulation_Cdh1_1*x_Clb5_6(t) + weights_regulation_Cdh1_0*x_Cln1_2(t) > 0, 1, where(weights_regulation_Cdh1_3*x_Cdc20(t) + weights_regulation_Cdh1_2*x_Clb1_2(t) + weights_regulation_Cdh1_1*x_Clb5_6(t) + weights_regulation_Cdh1_0*x_Cln1_2(t) < 0, 0, x_Cdh1(t)))
Swi5.x: x_Swi5(t + 1) == where(weights_regulation_Swi5_2*x_Cdc20(t) + weights_regulation_Swi5_0*x_Clb1_2(t) + weights_regulation_Swi5_1*x_Mcm1(t) > 0, 1, 0)
Cdc20.x: x_Cdc20(t + 1) == where(weights_regulation_Cdc20_0*x_Clb1_2(t) + weights_regulation_Cdc20_1*x_Mcm1(t) > 0, 1, 0)
Clb5_6.x: x_Clb5_6(t + 1) == where(weights_regulation_Clb5_6_1*x_Cdc20(t) + weights_regulation_Clb5_6_0*x_MBF(t) + weights_regulation_Clb5_6_2*x_Sic1(t) > 0, 1, where(weights_regulation_Clb5_6_1*x_Cdc20(t) + weights_regulation_Clb5_6_0*x_MBF(t) + weights_regulation_Clb5_6_2*x_Sic1(t) < 0, 0, x_Clb5_6(t)))
Sic1.x: x_Sic1(t + 1) == where(weights_regulation_Sic1_3*x_Cdc20(t) + weights_regulation_Sic1_2*x_Clb1_2(t) + weights_regulation_Sic1_1*x_Clb5_6(t) + weights_regulation_Sic1_0*x_Cln1_2(t) + weights_regulation_Sic1_4*x_Swi5(t) > 0, 1, where(weights_regulation_Sic1_3*x_Cdc20(t) + weights_regulation_Sic1_2*x_Clb1_2(t) + weights_regulation_Sic1_1*x_Clb5_6(t) + weights_regulation_Sic1_0*x_Cln1_2(t) + weights_regulation_Sic1_4*x_Swi5(t) < 0, 0, x_Sic1(t)))
Clb1_2.x: x_Clb1_2(t + 1) == where(weights_regulation_Clb1_2_2*x_Cdc20(t) + weights_regulation_Clb1_2_3*x_Cdh1(t) + weights_regulation_Clb1_2_0*x_Clb5_6(t) + weights_regulation_Clb1_2_1*x_Mcm1(t) + weights_regulation_Clb1_2_4*x_Sic1(t) > 0, 1, where(weights_regulation_Clb1_2_2*x_Cdc20(t) + weights_regulation_Clb1_2_3*x_Cdh1(t) + weights_regulation_Clb1_2_0*x_Clb5_6(t) + weights_regulation_Clb1_2_1*x_Mcm1(t) + weights_regulation_Clb1_2_4*x_Sic1(t) < 0, 0, x_Clb1_2(t)))
Mcm1.x: x_Mcm1(t + 1) == where(weights_regulation_Mcm1_1*x_Clb1_2(t) + weights_regulation_Mcm1_0*x_Clb5_6(t) > 0, 1, 0)