Running Vertex Based Crypt Simulations
On this page
This tutorial is automatically generated from TestRunningVertexBasedCryptSimulationsTutorial.hpp at revision 409e06cb314b. Note that the code is given in full at the bottom of the page.
Examples showing how to create, run and visualize vertex-based simulations on periodic meshes with different cell-cycle models
Introduction
In this tutorial we show how Chaste can be used to create, run and visualize vertex-based simulations. This mechanical model was originally proposed by T. Nagai and H. Honda, 2000, “A dynamic cell model for the formation of epithelial tissues”, Philosophical Magazine Part B 81:699-719, doi:10.1103/PhysRevLett.69.2013.
The test
As in previous cell-based Chaste tutorials, we begin by including the necessary header files.
The remaining header files define classes that will be used in the cell population simulation test. We have encountered some of these header files in previous cell-based Chaste tutorials.
The next three header files define two different types of cell-cycle model, one with fixed cell-cycle times and one where the cell-cycle time depends on the Wnt concentration.
The next header file defines a helper class for generating a suitable mesh.
The next header file defines a helper class for generating a periodic vertex mesh.
The next header file defines the class that simulates the evolution of a crypt CellPopulation
for a vertex mesh.
The next header file defines a vertex-based CellPopulation
class.
The next header file defines a force law for describing the mechanical interactions between neighbouring cells in the cell population, subject to each vertex.
In conjunction with the NagaiHondaForce
, we choose to use a child class
of AbstractTargetAreaModifier
to model cell growth between divisions.
Here, we use the SimpleTargetAreaModifier
.
Next, we define the test class.
Test 1 - create a vertex-based crypt simulation
The first test generates a crypt, in which we use a cylindrical vertex mesh, give each cell a fixed cell-cycle model, and enforce sloughing at the top of the crypt.
Create a cylindrical mesh, and get the cell location indices. To enforce
periodicity at the left and right hand sides of the mesh, we use a subclass
called Cylindrical2dMesh
, which has extra methods for maintaining
periodicity.
Having created a mesh, we now create a std::vector
of CellPtr
s.
To do this, we the CryptCellsGenerator
helper class, which is templated over the type
of cell model required (here FixedG1GenerationalCellCycleModel
)
and the dimension. We create an empty vector of cells and pass this into the
method along with the mesh. The third argument ’true’ indicates that the cells
should be assigned random birth times, to avoid synchronous division. The
cells
vector is populated once the method Generate
is
called.
The last four arguments represent the height below which cells belong to generations 0,
1, 2, 3 and 4, respectively.
Create a cell population, as before.
Create a simulator as before (except setting a different output directory).
Before running the simulation, we add a one or more force laws, which determine the mechanics of
the cell population. For this test, we use a NagaiHondaForce
.
We next add a child class of AbstractTargetAreaModifier
to the
simulation. This modifier assigns and updates target areas to each
cell throughout the simulation, modelling cell growth between
divisions. The target areas are in turn used by the force law to
determine the pressure forces on each vertex.
Before running the simulation, we add a cell killer. This object
dictates conditions under which cells die. For this test, we use
a SloughingCellKiller
, which kills cells above a certain height.
To run the simulation, we call Solve()
.
To visualize the results, open a new terminal, cd
to the Chaste directory,
then cd
to anim
. Then do: java Visualize2dVertexCells $CHASTE_TEST_OUTPUT/VertexCrypt/results_from_time_0
.
You may have to do: javac Visualize2dVertexCells.java
beforehand to create the
java executable.
When we visualize the results, we should see three colours of cells: a row of blue stem cells, 3 rows of yellow transit cells, and 5 rows of pink differentiated cells. Cells above 6.0 will be sloughed off immediately.
Test 2 - create a vertex-based crypt simulation with a simple wnt dependent cell-cycle model
The next test generates a crypt, in which we use a cylindrical vertex mesh, and impose a linearly decreasing concentration gradient of Wnt. Cells detect the level of Wnt at their centre and those that are in a region of sufficient Wnt are defined to be transit cells, whilst those above this Wnt threshold are defined to be differentiated. The cell cycle length of transit cells is then assigned randomly from a uniform distribution.
Create a cylindrical mesh, and get the cell location indices, as before.
Create a std::vector
of CellPtr
s.
Generate cells, which are assigned a SimpleWntCellCycleModel
using
the CryptCellsGenerator
. The final boolean argument ’true’ indicates
to assign randomly chosen birth times.
Create a cell population, as before.
Define the crypt length; this will be used for sloughing and calculating the Wnt gradient.
Set up a WntConcentration
object, as in the tutorial Running Mesh Based Simulations.
Create a simulator as before, and add a force law, the target area modifier and a sloughing cell killer to it.
Here we impose a boundary condition at the base: that cells at the bottom of the crypt are repelled if they move past 0.
Run the simulation, by calling Solve()
.
To visualize the results, open a new terminal, cd
to the Chaste directory,
then cd
to anim
. Then do: java Visualize2dVertexCells $CHASTE_TEST_OUTPUT/VertexCryptWithSimpleWntCellCycleModel/results_from_time_0
.
You may have to do: javac Visualize2dVertexCells.java
beforehand to create the
java executable.
When we visualize the results, we should see two colours of cells: yellow transit cells and pink differentiated cells. Cells above 6.0 will be sloughed off immediately.