-
Notifications
You must be signed in to change notification settings - Fork 11
Example_Cell_Sorting
Step-by-step example of running a simulation with PhysiBoSS: spontaneous cell sorting due to differences in cell adhesion strength
In this example, we showed all the steps required to simulate the mechanical sorting of cell from two different cell lines, with the necessary files provided so that it can be reproduced by the user.
We are simulating here a spheroid of active cells from two cell lines (blue and red), surrounded by extra-cellular-matrix represented as passive spheres (transparent grey). The two cell lines are identical, except that their adhesion strength parameters are different. Here, we ignored cell cycling and no boolean network is needed.
First the simulation folder must be prepared. We used a precise organization of the simulation to be able to automatize the creation, running and analyse of numerous simulations. The main folder (called in this example example_hello_world
) contains:
- the
runs
folders: each run folder contain an individual simulation. This is especially usefull to simulate a similar condition, with only one parameter changing in each run folder, or all the same to repeat it for robutness. In this example, we did two runs (run0, run1
folder). Inrun0
, the first cell line doesn't adhere to the matrix (parametersecm_adhesion_min =0
andecm_adhesion_max = 0
), while in the second folderrun1
, those values are put to 10, so the cell can attach to the matrix.
Arun
folder must contain the parameter XML file. It can also contains the initial configuration file, as in this exampleinit.txt
. It was created with thePhysiBoSS_CreateInitTxtFile
executable. The two output subfoldersoutput
andmicroutput
that will be used byPhysiBoSS
to write the results files must be present.
To run the simulation, open a Terminal window in the (here run0
) folder of the simulation and call PhysiBoSS
executable:
path_to_PhysiBoSS/bin/PhysiBoSS -p parameters.xml
During the simulations, summary informations are printed to the terminal (initialisation, number of cells dividing, dying, time spent...). It can be more convenient to redirect it to an other file to supress any output when running multiple simulations at once:
path_to_PhysiBoSS/bin/PhysiBoSS -p parameters.xml > msg.txt
Output files are written in the two output folders, and svg snaphots can be written at given frequency to directly visualize the simulation evolution.
To visualize 3D+t results of the simulations, we used the software Paraview
which allows for high flexibility and intereactive viewing options. In the files available for this example, the state file example_hello_world.pvsm
contains the setting-up of paraview to draw the output files in 3D view. To use it, open Paraview
, click on ( File -> Load State...) and select the state file
example_cell_sorting.pvsm
. Then a window to choose the files to visualize will pop up, select in the output folder of the simulation the passive cells files stack first, then the active cells stack.
Below are snapshots of the simulation that you should obtain by re-running it and visualizing it with our customized paraview state file. Cells of the first cell line (the most adhesive one) are in blue, cells of the second cell line are in red. Transparent grey spheres are the passive spheres.