booldog ======= .. py:module:: booldog .. autoapi-nested-parse:: `booldog`: A Python package for analyses of Boolean and semi-quantitative Boolean networks Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/booldog/boolean/index /autoapi/booldog/classes/index /autoapi/booldog/continuous/index /autoapi/booldog/io/index /autoapi/booldog/network/index /autoapi/booldog/resources/index /autoapi/booldog/simulation_result/index /autoapi/booldog/utils/index Attributes ---------- .. autoapisummary:: booldog.__version__ booldog.logger Classes ------- .. autoapisummary:: booldog.BoolDogModel booldog.BooleanStateSpace Functions --------- .. autoapisummary:: booldog.get_pkg_version booldog.setup_logger Package Contents ---------------- .. py:function:: get_pkg_version() Get version of booldog package :returns: **version** -- Version of booldog package :rtype: str .. py:function:: setup_logger(level=logging.INFO) Set up logger for BoolDog .. py:class:: BoolDogModel(nodes=None, primes=None, modelinfo=None) Bases: :py:obj:`booldog.boolean.BooleanNetworkMixin`, :py:obj:`booldog.boolean.BooleanNetworkModificationMixin`, :py:obj:`booldog.continuous.ContinuousMixin`, :py:obj:`booldog.io.BoolDogModelIOFromMixin`, :py:obj:`booldog.io.BoolDogModelIOToMixin` A class to represent a Boolean network. .. attribute:: n The number of nodes/variables in the network :type: int .. attribute:: primes Prime implicants of the Boolean network. See `PyBoolNet:prime implicants `_ for more information. :type: dict .. attribute:: nodes List of `booldog.network.BoolDogNode` objects representing the nodes :type: tuple of str .. attribute:: index Dictionary of node name to integer index for indexing arrays :type: dict .. py:attribute:: nodes .. py:attribute:: _primes_cached :value: True .. py:attribute:: modifications :value: [] .. py:method:: _set_node_ids_and_index() Set the sorted node identifiers and index mapping to integers. .. py:property:: n Number of nodes in the network .. py:property:: primes Prime implicants of the Boolean network. See `PyBoolNet:prime implicants` for more information. .. py:method:: __repr__() .. py:method:: __len__() .. py:class:: BooleanStateSpace(network, state_space) Class to contain a subspace of a Boolean Network. .. py:attribute:: network .. py:attribute:: state_space .. py:method:: set_node_state(node_id, state) Set the state of a node in all states of the state space. :param node_id: The identifier of the node to set the state for. :type node_id: str :param state: The state to set for the node (0 or 1). :type state: int :raises ValueError: If `node_id` is not a valid node identifier in the network, or if `state` is not 0 or 1. .. py:method:: plot_state_space(title='State Heatmap', cmap=None) Plot the states of the Boolean network as a heatmap. :param title: Title of the heatmap, default is "State Heatmap". :type title: str, optional :param cmap: Colormap to use for the heatmap. Default is binary with green (1) and grey (0). :type cmap: ListedColormap, optional .. py:method:: __repr__() .. py:data:: __version__ .. py:data:: logger