MaBoSS Client-Server example

[1]:
import maboss

Loading the simulation

[2]:
simulation = maboss.load("metastasis.bnd", "metastasis.cfg")
outputs = ['Metastasis', 'Migration', 'Invasion', 'EMT', 'Apoptosis', 'CellCycleArrest']
simulation.network.set_output(outputs)
simulation.network.set_istate('ECMicroenv', [0.5, 0.5])
simulation.network.set_istate('DNAdamage', [0.5, 0.5])

Simulating locally

[3]:
result = simulation.run()
[4]:
result.plot_piechart()
../_images/notebooks_Server_6_0.png

Simulating on the server

[5]:
server_host = "localhost"
server_port = 7777
[6]:
mbcli = maboss.MaBoSSClient(host=server_host, port=server_port)
result_server = mbcli.run(simulation)
[7]:
result_server.plot_piechart()
../_images/notebooks_Server_10_0.png