Simulation
The maboss module can call the MaBoSS software via the run method of
Simulation objects. This method writes a .cfg and a .bnd files and
run MaBoSS on them. Then, a Result object is created to interact with MaBoSS output files.
Simulation
- class maboss.simulation.Simulation(nt, parameters={}, command=None, mutations=[], mutationsTypes={}, **kwargs)[source]
Class that handles MaBoSS simulations.
- network
A Network object, that will be translated in a bnd file
- mutations
A list of nodes for which mutation can be triggered by modifying the cfg file
- palette
A mapping of nodes to color for plotting the results of the simulation.
- param
A dictionary that contains global variables (keys starting with a ‘$’), and simulation parameters (keys not starting with a ‘$’).
- __init__(nt, parameters={}, command=None, mutations=[], mutationsTypes={}, **kwargs)[source]
Initialize the Simulation object.
- Parameters:
nt (
Network) – the network associated with the simulation.kwargs (dict) – parameters of the simulation
- mutate(node, state)[source]
Trigger or untrigger mutation for a node.
- Parameters:
node (
Node) – TheNodeto be modifiedState (str) –
'ON'(always up)'OFF'(always down)'WT'(mutable but with normal behaviour)
The node will appear as a mutable node in the bnd file. This means that its rate will be of the form:
rate_up = $LowNode ? 0 :($HighNode ? 1: (@logic ? rt_up : 0))If the node is already mutable, this method will simply set $HighNode and $LowNode accordingly to the desired mutation.
- print_bnd(out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)[source]
Produce the content of the bnd file associated to the simulation.
- print_cfg(out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)[source]
Produce the content of the cfg file associated to the simulation.