User Tools

Site Tools


examples:cellular_potts

Cellular Potts models

Differential Adhesion: cell sorting in two dimensions

Yellow cells engulf the red cells as a result of differential adhesion

Introduction

This model shows the original cellular Potts model (a.k.a. Glazier-Graner model) of cell sorting based on the Steinberg's differential adhesion hypothesis.

Model description

Two CellTypes are defined, each of which has a VolumeConstraint specifying the cell's target area/volume. In the CPM element, the MetropolisKinetics can be configured and the Interaction energies between cell types are specified.

Although cells can be initialized as single points using e.g. the InitCircle plugin, in this example, the Nodes of each Cell in the CellPopulations are given explicitly. In fact, these Populations are restored results of a previous simulation.

The simulation shows two populations of spatially resolved cells that initially organized in a mosaic fashion. Through differential adhesion, the motile cells sort out and re-organize into an distribution in which one cell type engulfes the other.

Snapshots of the simulation are saved to files named [Title][Time].xml.gz. These files containing intermediate and result states can be opened and used as initial conditions for new simulations. Remember to change StartTime and StopTime accordingly.

Model

CellSorting_2D.xml

<MorpheusModel version="3">
    <Description>
        <Title>Example-CellSorting-2D</Title>
        <Details>Reference:
Graner and Glazier, Simulation of biological cell sorting using a two-dimensional extended Potts model, Phys. Rev. Lett. 69, 2013–2016 (1992) </Details>
    </Description>
    <Global>
        <Variable symbol="boundary" value="0.0" name="Boundary length of CT1 with other cell types"/>
        <Constant symbol="b" value="0.0"/>
        <Constant symbol="b2" value="0.0"/>
    </Global>
    <Space>
        <SpaceSymbol symbol="l"/>
        <Lattice class="square">
            <Size symbol="size" value="200, 200, 0"/>
            <BoundaryConditions>
                <Condition boundary="x" type="periodic"/>
                <Condition boundary="y" type="periodic"/>
            </BoundaryConditions>
            <Neighborhood>
                <Order>2.0</Order>
            </Neighborhood>
        </Lattice>
    </Space>
    <Time>
        <StartTime value="0"/>
        <StopTime value="2.5e4"/>
        <!--    <Disabled>
        <SaveInterval value="5e3"/>
    </Disabled>
-->
        <RandomSeed value="0"/>
        <TimeSymbol symbol="time"/>
    </Time>
    <CellTypes>
        <CellType class="biological" name="ct1">
            <VolumeConstraint target="200" strength="1"/>
            <NeighborhoodReporter>
                <Input scaling="length" value="cell.type == celltype.ct2.id"/>
                <Output symbol-ref="boundary" mapping="sum"/>
            </NeighborhoodReporter>
            <Property symbol="b" value="0"/>
            <NeighborhoodReporter>
                <Input scaling="cell" value="cell.type == celltype.ct2.id"/>
                <Output symbol-ref="b" mapping="sum"/>
            </NeighborhoodReporter>
            <NeighborhoodReporter>
                <Input scaling="length" value="cell.type == celltype.ct2.id"/>
                <Output symbol-ref="b2" mapping="sum"/>
            </NeighborhoodReporter>
            <Property symbol="b2" value="0" name="Interface with ct2"/>
        </CellType>
        <CellType class="biological" name="ct2">
            <VolumeConstraint target="200" strength="1"/>
            <Property symbol="b" value="0"/>
            <NeighborhoodReporter>
                <Input scaling="cell" value="cell.type == celltype.ct1.id"/>
                <Output symbol-ref="b" mapping="sum"/>
            </NeighborhoodReporter>
            <Property symbol="b2" value="0" name="Interface with ct1"/>
            <NeighborhoodReporter>
                <Input scaling="length" value="cell.type == celltype.ct1.id"/>
                <Output symbol-ref="b2" mapping="sum"/>
            </NeighborhoodReporter>
        </CellType>
        <CellType class="medium" name="medium"/>
    </CellTypes>
    <CPM>
        <Interaction default="0.0">
            <Contact type1="ct1" type2="medium" value="12"/>
            <Contact type1="ct2" type2="medium" value="6"/>
            <Contact type1="ct1" type2="ct1" value="6"/>
            <Contact type1="ct2" type2="ct2" value="6"/>
            <Contact type1="ct1" type2="ct2" value="16"/>
        </Interaction>
        <MonteCarloSampler stepper="edgelist">
            <MCSDuration value="1"/>
            <Neighborhood>
                <Order>2</Order>
            </Neighborhood>
            <MetropolisKinetics temperature="2"/>
        </MonteCarloSampler>
        <ShapeSurface scaling="norm">
            <Neighborhood>
                <Order>6</Order>
            </Neighborhood>
        </ShapeSurface>
    </CPM>
    <CellPopulations>
        <Population size="0" type="ct1">
            <InitCircle mode="random" number-of-cells="50">
                <Dimensions radius="size.x/3" center="size.x/2, size.y/2, 0"/>
            </InitCircle>
        </Population>
        <Population size="0" type="ct2">
            <InitCircle mode="random" number-of-cells="50">
                <Dimensions radius="size.x/3" center="size.x/2, size.y/2, 0"/>
            </InitCircle>
        </Population>
    </CellPopulations>
    <Analysis>
        <Gnuplotter time-step="100" decorate="false">
            <Terminal name="png"/>
            <Plot>
                <Cells flooding="true" value="cell.type"/>
            </Plot>
            <Plot>
                <Cells flooding="true" value="b">
                    <ColorMap>
                        <Color value="2" color="red"/>
                        <Color value="1" color="yellow"/>
                        <Color value="0" color="white"/>
                    </ColorMap>
                </Cells>
                <CellLabels precision="0" fontsize="10" value="b"/>
            </Plot>
            <Plot>
                <Cells per-frame-range="true" value="b2">
                    <ColorMap>
                        <Color value="2" color="red"/>
                        <Color value="1" color="yellow"/>
                        <Color value="0" color="white"/>
                    </ColorMap>
                </Cells>
                <CellLabels precision="0" fontsize="10" value="b2"/>
            </Plot>
        </Gnuplotter>
        <Logger time-step="10.0">
            <Input>
                <Symbol symbol-ref="boundary"/>
                <Symbol symbol-ref="b"/>
                <Symbol symbol-ref="b2"/>
            </Input>
            <Output>
                <TextOutput/>
            </Output>
            <Plots>
                <Plot time-step="500">
                    <Style style="linespoints"/>
                    <Terminal terminal="png"/>
                    <X-axis>
                        <Symbol symbol-ref="time"/>
                    </X-axis>
                    <Y-axis>
                        <Symbol symbol-ref="boundary"/>
                    </Y-axis>
                </Plot>
            </Plots>
        </Logger>
    </Analysis>
</MorpheusModel>

In Morpheus GUI: Examples → CPM → CellSorting_2D.xml

Reference

Graner F, Glazier J. Simulation of Biological Cell Sorting Using a Two-Dimensional Extended Potts Model. Phys. Rev. Lett. 69 (13): 2013–2016, 1992.


Proliferation in two dimensions

Growing cell population

Introduction

This model show a simulation of a growing cell population, using the cellular Potts model.

Model description

This model specifies CellType which has a VolumeConstraint and a Proliferation plugin.

In the Proliferation plugin, the Conditions for a cell to divide are given. Here, each cell that has more than 90% of the target volume has a small probability to divide. Once a division has taken place, the Equation defined in the Triggers elements are triggered.

Model

Proliferation_2D.xml

<?xml version='1.0' encoding='UTF-8'?>
<MorpheusModel version="3">
    <Description>
        <Title>Example-Proliferation2D</Title>
        <Details></Details>
    </Description>
    <Global>
        <Variable symbol="c" value="0.0"/>
    </Global>
    <Space>
        <Lattice class="hexagonal">
            <Size symbol="size" value="500 500 0"/>
            <BoundaryConditions>
                <Condition boundary="x" type="periodic"/>
                <Condition boundary="y" type="periodic"/>
            </BoundaryConditions>
            <Neighborhood>
                <Order>1</Order>
            </Neighborhood>
        </Lattice>
        <SpaceSymbol symbol="space"/>
    </Space>
    <Time>
        <StartTime value="0"/>
        <StopTime symbol="stoptime" value="4e4"/>
        <TimeSymbol symbol="time"/>
    </Time>
    <CellTypes>
        <CellType class="biological" name="cells">
            <Property symbol="p" value="5e-5" name="proliferation rate"/>
            <Property symbol="d" value="0" name="divisions"/>
            <Property symbol="c" value="0" name="color"/>
            <VolumeConstraint target="500" strength="1"/>
            <SurfaceConstraint target="0.9" mode="aspherity" strength="1"/>
            <System solver="euler" time-step="1.0">
                <Rule symbol-ref="c">
                    <Expression>if( c > 0, c-1, 0)</Expression>
                </Rule>
            </System>
            <CellDivision division-plane="random">
                <Condition>rand_uni(0,1) &lt; p</Condition>
                <Triggers>
                    <Rule symbol-ref="d">
                        <Expression>d+1</Expression>
                    </Rule>
                    <Rule symbol-ref="c" name="color after division">
                        <Expression>1000</Expression>
                    </Rule>
                </Triggers>
            </CellDivision>
        </CellType>
    </CellTypes>
    <CPM>
        <Interaction default="0">
            <Contact type1="cells" type2="cells" value="-4"/>
        </Interaction>
        <MonteCarloSampler stepper="edgelist">
            <MCSDuration value="1.0"/>
            <Neighborhood>
                <Order>1</Order>
            </Neighborhood>
            <MetropolisKinetics temperature="3" yield="0.1"/>
        </MonteCarloSampler>
        <ShapeSurface scaling="norm">
            <Neighborhood>
                <Order>3</Order>
            </Neighborhood>
        </ShapeSurface>
    </CPM>
    <CellPopulations>
        <Population size="1" type="cells">
            <InitCircle mode="regular" number-of-cells="20">
                <Dimensions radius="35" center="250, 250, 0"/>
            </InitCircle>
        </Population>
    </CellPopulations>
    <Analysis>
        <Gnuplotter time-step="1000" decorate="false">
            <Terminal name="png"/>
            <Plot>
                <Cells value="c" min="0.0" max="1">
                    <ColorMap>
                        <Color value="1" color="red"/>
                        <Color value="0.0" color="green"/>
                    </ColorMap>
                </Cells>
                <CellLabels fontsize="8" value="d"/>
            </Plot>
        </Gnuplotter>
        <Logger time-step="100">
            <Input>
                <Symbol symbol-ref="celltype.cells.size"/>
            </Input>
            <Output>
                <TextOutput/>
            </Output>
            <Plots>
                <Plot log-commands="true" time-step="10000">
                    <Style point-size="0.5" grid="true" style="linespoints"/>
                    <Terminal terminal="png"/>
                    <X-axis minimum="0" maximum="stoptime">
                        <Symbol symbol-ref="time"/>
                    </X-axis>
                    <Y-axis minimum="0" maximum="100">
                        <Symbol symbol-ref="celltype.cells.size"/>
                    </Y-axis>
                </Plot>
            </Plots>
        </Logger>
    </Analysis>
</MorpheusModel>

In Morpheus GUI: Examples → CPM → Proliferation_2D.xml


Persistence

Persistence of individual cells causes self-organized collective motion

Introduction

This example shows self-organized collective motion of cells as a result of persistence ('cellular inertia'). A similar model has recently been used in (Czirok et al., 2013).

Description

The model uses the Persistence plugin that causes cells to prefer to move in their current direction. The direction is stored in a PropertyVector that is used to plot the color and arrows in Gnuplotter.

The model is simulated in a circular domain with constant boundary conditinos, which can be set up in Lattice / Domain / Circle. The value for the constant boundary is specified in CPM / BoundaryValue.

Try it!

  • Change the boundary conditions from circular=constant to x/y=periodic and observe the resulting collective motion.
  • Change the decay-time of Persistence (specifying the 'memory').

Model

Persistence_2D.xml

<MorpheusModel version="3">
    <Description>
        <Title>Example-Persistence</Title>
        <Details></Details>
    </Description>
    <Global>
        <VariableVector symbol="d" value="0.0, 0.0, 0.0" name="Moving direction"/>
        <Constant symbol="density" value="0.012"/>
    </Global>
    <Space>
        <Lattice class="square">
            <Size symbol="size" value="200, 200, 0"/>
            <Neighborhood>
                <Order>2</Order>
            </Neighborhood>
            <Domain boundary-type="constant">
                <Circle diameter="200"/>
            </Domain>
        </Lattice>
        <SpaceSymbol symbol="space"/>
    </Space>
    <Time>
        <TimeSymbol symbol="time"/>
        <StartTime value="0"/>
        <StopTime value="5000"/>
        <RandomSeed value="4"/>
    </Time>
    <CellTypes>
        <CellType class="biological" name="ct1">
            <PropertyVector symbol="d" value="0.0, 0.0, 0.0" name="Moving direction"/>
            <Property symbol="s" value="5"/>
            <VolumeConstraint target="100" strength="1"/>
            <SurfaceConstraint target="0.9" mode="aspherity" strength="1"/>
            <PersistentMotion protrusion="true" decay-time="50" strength="s"/>
            <MotilityReporter time-step="50">
                <Velocity symbol-ref="d"/>
            </MotilityReporter>
        </CellType>
        <CellType class="medium" name="medium"/>
        <CellType class="biological" name="obstacle">
            <FreezeMotion>
                <Condition>1</Condition>
            </FreezeMotion>
        </CellType>
    </CellTypes>
    <CPM>
        <Interaction>
            <Contact type1="ct1" type2="medium" value="16"/>
            <Contact type1="ct1" type2="ct1" value="1"/>
        </Interaction>
        <MonteCarloSampler stepper="edgelist">
            <MCSDuration value="1"/>
            <Neighborhood>
                <Order>2</Order>
            </Neighborhood>
            <MetropolisKinetics temperature="10"/>
        </MonteCarloSampler>
        <ShapeSurface scaling="norm">
            <Neighborhood>
                <Distance>3</Distance>
            </Neighborhood>
        </ShapeSurface>
    </CPM>
    <CellPopulations>
        <Population size="0" type="ct1">
            <InitCircle mode="regular" number-of-cells="400">
                <Dimensions radius="100" center="100, 100, 0"/>
            </InitCircle>
        </Population>
        <Population size="1" type="obstacle">
            <InitCellObjects mode="distance">
                <Arrangement repetitions="1, 1, 1" displacements="1, 1, 1">
                    <Object>
                        <Box size="20,30,0" origin="130,100,0"/>
                    </Object>
                </Arrangement>
            </InitCellObjects>
        </Population>
    </CellPopulations>
    <Analysis>
        <Gnuplotter time-step="100">
            <Terminal size="1000 600 0" name="png"/>
            <Plot>
                <Cells value="cell.id"/>
                <!--    <Disabled>
        <CellArrows style="1" orientation="3 * d / d.abs"/>
    </Disabled>
-->
            </Plot>
            <Plot>
                <Cells value="d.phi" min="0.0" max="6.28">
                    <ColorMap>
                        <Color value="6.28" color="red"/>
                        <Color value="3.14" color="blue"/>
                        <Color value="0.0" color="red"/>
                    </ColorMap>
                </Cells>
                <CellArrows style="1" orientation="3 * d / d.abs"/>
            </Plot>
        </Gnuplotter>
        <Logger time-step="10">
            <Input>
                <Symbol symbol-ref="cell.center.x"/>
                <Symbol symbol-ref="cell.center.y"/>
            </Input>
            <Output>
                <TextOutput file-separation="cell"/>
            </Output>
            <Plots>
                <Plot time-step="50">
                    <Style style="lines" line-width="2.0"/>
                    <Terminal terminal="png"/>
                    <X-axis minimum="0.0" maximum="size.x">
                        <Symbol symbol-ref="cell.center.x"/>
                    </X-axis>
                    <Y-axis minimum="0.0" maximum="size.y">
                        <Symbol symbol-ref="cell.center.y"/>
                    </Y-axis>
                    <Color-bar>
                        <Symbol symbol-ref="time"/>
                    </Color-bar>
                    <Range>
                        <Time mode="history" history="50"/>
                    </Range>
                </Plot>
            </Plots>
        </Logger>
    </Analysis>
</MorpheusModel>

In Morpheus GUI: Examples → CPM → Persistence_2D.xml

Reference

Czirók A, Varga K, Mehes E, Szabo A, Collective cell streams in epithelial monolayers depend on cell adhesion. New J. Phys. 15 075006, 2013.


Proliferation in three dimensions

Cell population grown from single initial cell

Introduction

This model show a CPM simulation of a growing cell population in 3D.

Model description

This model specifies CellType which has a VolumeConstraint and a Proliferation plugin. In the Proliferation plugin, the Conditions for a cell to divide are given. Here, each cell that has more than 90% of the target volume has a small probability to divide. Once a division has taken place, the Equation defined in the Triggers elements are triggered.

In this model, two medium cell types have been defined. One of these (called matrix) is used to represent a matrix with higher adhesivity. This is done by (1) defining the 'matrix' cell type as a BoundaryCondition of the -z boundary in the CPM and (2) providing lower contact energy for cell-matrix interaction than for cell-medium interactions.

The simulation is visualized using the TiffPlotter that saves TIFF image stacks that can be loaded by image analysis software such as Fiji and displayed using Fiji's 3D Viewer plugin.

Model

Proliferation_3D.xml

<?xml version='1.0' encoding='UTF-8'?>
<MorpheusModel version="3">
    <Description>
        <Title>Example-Proliferation3D</Title>
        <Details></Details>
    </Description>
    <Global/>
    <Space>
        <Lattice class="cubic">
            <Size symbol="size" value="100 100 100"/>
            <BoundaryConditions>
                <Condition boundary="x" type="periodic"/>
                <Condition boundary="y" type="periodic"/>
                <Condition boundary="z" type="noflux"/>
                <Condition boundary="-z" type="noflux"/>
            </BoundaryConditions>
            <Neighborhood>
                <Order>2</Order>
            </Neighborhood>
        </Lattice>
        <MembraneLattice>
            <Resolution symbol="memsize" value="20"/>
            <SpaceSymbol symbol="m"/>
        </MembraneLattice>
        <SpaceSymbol symbol="space"/>
    </Space>
    <Time>
        <StartTime value="0"/>
        <StopTime value="2500"/>
        <TimeSymbol symbol="time"/>
        <RandomSeed value="1456688742"/>
    </Time>
    <CellTypes>
        <CellType class="medium" name="medium"/>
        <CellType class="medium" name="matrix"/>
        <CellType class="biological" name="cell">
            <Property symbol="Vt" value="500" name="Target Volume"/>
            <Property symbol="divisions" value="0"/>
            <VolumeConstraint target="Vt" strength="1.0"/>
            <SurfaceConstraint target="1.0" mode="aspherity" strength="1.0"/>
            <CellDivision division-plane="major">
                <Condition>rand_uni(0,1) &lt; 0.0025 and cell.volume > Vt*0.9</Condition>
                <Triggers>
                    <Rule symbol-ref="divisions">
                        <Expression>divisions + 0.5</Expression>
                    </Rule>
                </Triggers>
            </CellDivision>
            <MembraneProperty symbol="c" value="1">
                <Diffusion rate="0.0"/>
            </MembraneProperty>
        </CellType>
    </CellTypes>
    <CPM>
        <Interaction default="0">
            <Contact type1="cell" type2="cell" value="-6"/>
            <Contact type1="cell" type2="medium" value="0"/>
            <Contact type1="cell" type2="matrix" value="-2"/>
        </Interaction>
        <MonteCarloSampler stepper="edgelist">
            <MCSDuration value="1"/>
            <Neighborhood>
                <Order>2</Order>
            </Neighborhood>
            <MetropolisKinetics temperature="0.5"/>
        </MonteCarloSampler>
        <ShapeSurface scaling="norm">
            <Neighborhood>
                <Distance>2.5</Distance>
            </Neighborhood>
        </ShapeSurface>
    </CPM>
    <CellPopulations>
        <Population size="0" type="cell">
            <InitCellObjects mode="distance">
                <Arrangement repetitions="1, 1, 1" displacements="1, 1, 1">
                    <Object>
                        <Sphere radius="5" center="50,50,50"/>
                    </Object>
                </Arrangement>
            </InitCellObjects>
        </Population>
        <BoundaryValue boundary="x" value="matrix"/>
        <BoundaryValue boundary="-x" value="matrix"/>
        <BoundaryValue boundary="y" value="matrix"/>
        <BoundaryValue boundary="-y" value="matrix"/>
        <BoundaryValue boundary="z" value="matrix"/>
        <BoundaryValue boundary="-z" value="matrix"/>
    </CellPopulations>
    <Analysis>
        <TiffPlotter timelapse="true" format="8bit" OME-header="true" compression="false" time-step="100">
            <Channel symbol-ref="cell.id" exclude-medium="true"/>
            <Channel symbol-ref="c" exclude-medium="true" celltype="cell" outline="true"/>
        </TiffPlotter>
        <Gnuplotter time-step="100" decorate="true">
            <Plot>
                <Cells value="cell.id" slice="50"/>
            </Plot>
            <Terminal name="png"/>
        </Gnuplotter>
        <Logger time-step="100">
            <Input>
                <Symbol symbol-ref="celltype.cell.size"/>
            </Input>
            <Output>
                <TextOutput/>
            </Output>
            <Plots>
                <Plot time-step="500">
                    <Style style="linespoints"/>
                    <Terminal terminal="png"/>
                    <X-axis>
                        <Symbol symbol-ref="time"/>
                    </X-axis>
                    <Y-axis>
                        <Symbol symbol-ref="celltype.cell.size"/>
                    </Y-axis>
                </Plot>
            </Plots>
        </Logger>
    </Analysis>
</MorpheusModel>

In Morpheus GUI: Examples → CPM → Proliferation_3D.xml


Run and Tumble

Modeling cell movements as a Levy walk

Introduction

This example models a single cell that moves according to a Levy walk: a random walk with occassional occurrence of long straight walks.

Model description

The model defines a CPM cell that has two properties:

  • A PropertyVector that gives the direction of movement and
  • A Property that defines the time when this direction of movement is changed.

The change in direction is using a VectorRule. In this case, it specifies a new random direction for each of the 3 x,y,z coordinates separately: move_dir = sin(angle), cos(angle), 0 where angle = rand_uni(0, 2*pi).

This is calculated with an Event. Upon triggering, this sets the new direction and a waiting time until the next change of direction. To model a superdiffusive Levy walk, this waiting time is chosen from an exponential distribution: change_time = time + 20 * rand_gamma(0.5, 5)

Finally, the cell is made to move in the chosen direction using DirectedMotion that takes the PropertyVector as input.

Model

RunAndTumble.xml

<?xml version='1.0' encoding='UTF-8'?>
<MorpheusModel version="3">
    <Description>
        <Title>Example-RunAndTumble</Title>
        <Details>Models a Levy walk - a random walk strategy that is superior for searching due to it's high spatial coverage.

Shows how to manipulate PropertyVectors (x,z,y) using the VectorRule. An expression for each of the three coordinates must be given, separated by a comma ",".</Details>
    </Description>
    <Global>
        <Constant symbol="tumble.run_duration" value="0"/>
    </Global>
    <Space>
        <Lattice class="hexagonal">
            <Size symbol="size" value="300 300 0"/>
            <Neighborhood>
                <Order>1</Order>
            </Neighborhood>
            <BoundaryConditions>
                <Condition boundary="x" type="periodic"/>
                <Condition boundary="y" type="periodic"/>
            </BoundaryConditions>
        </Lattice>
        <SpaceSymbol symbol="space"/>
    </Space>
    <Time>
        <StartTime value="0"/>
        <StopTime value="10000"/>
        <TimeSymbol symbol="time"/>
    </Time>
    <CellTypes>
        <CellType class="biological" name="amoeba">
            <VolumeConstraint target="200" strength="1"/>
            <ConnectivityConstraint/>
            <PropertyVector symbol="move_dir" value="0.0, 0.0, 0.0"/>
            <Property symbol="tumble.run_duration" value="0.0" name="run duration"/>
            <Property symbol="tumble.last" value="0" name="last tumble event"/>
            <Function symbol="tumble.time_left" name="time left">
                <Expression>tumble.last + tumble.run_duration - time</Expression>
            </Function>
            <DirectedMotion direction="move_dir" strength="0.2"/>
            <Event trigger="when true" time-step="5">
                <Condition>time >= tumble.last + tumble.run_duration</Condition>
                <Rule symbol-ref="tumble.last">
                    <Expression>time</Expression>
                </Rule>
                <Rule symbol-ref="tumble.run_duration" name="new update time">
                    <Expression>20 * rand_gamma(0.5, 5)</Expression>
                </Rule>
                <Function symbol="angle">
                    <Expression>rand_uni(0, 2*pi)</Expression>
                </Function>
                <VectorRule symbol-ref="move_dir" spherical="true">
                    <Expression>angle, 0 , 1</Expression>
                </VectorRule>
            </Event>
        </CellType>
        <CellType class="medium" name="medium"/>
    </CellTypes>
    <CPM>
        <Interaction>
            <Contact type1="amoeba" type2="medium" value="4"/>
        </Interaction>
        <MonteCarloSampler stepper="edgelist">
            <MCSDuration value="1"/>
            <Neighborhood>
                <Order>1</Order>
            </Neighborhood>
            <MetropolisKinetics temperature="0.6"/>
        </MonteCarloSampler>
        <ShapeSurface scaling="norm">
            <Neighborhood>
                <Distance>2.5</Distance>
            </Neighborhood>
        </ShapeSurface>
    </CPM>
    <CellPopulations>
        <Population size="1" type="amoeba">
            <Cell name="">
                <Nodes>50,100,0</Nodes>
            </Cell>
        </Population>
    </CellPopulations>
    <Analysis>
        <Gnuplotter time-step="200" decorate="false">
            <Terminal name="png"/>
            <Plot>
                <Cells min="0.0">
                    <ColorMap>
                        <Color value="0" color="red"/>
                        <Color value="2" color="blue"/>
                    </ColorMap>
                </Cells>
                <CellArrows orientation="5 * move_dir"/>
            </Plot>
        </Gnuplotter>
        <Logger time-step="20">
            <Input>
                <Symbol symbol-ref="cell.center.x"/>
                <Symbol symbol-ref="cell.center.y"/>
            </Input>
            <Output>
                <TextOutput/>
            </Output>
            <Plots>
                <Plot time-step="5000">
                    <Style style="lines" line-width="2.0"/>
                    <Terminal terminal="png"/>
                    <X-axis>
                        <Symbol symbol-ref="cell.center.x"/>
                    </X-axis>
                    <Y-axis>
                        <Symbol symbol-ref="cell.center.y"/>
                    </Y-axis>
                    <Color-bar>
                        <Symbol symbol-ref="tumble.run_duration"/>
                    </Color-bar>
                </Plot>
            </Plots>
        </Logger>
    </Analysis>
</MorpheusModel>

In Morpheus GUI: Examples → CPM → RunAndTumble.xml


Stem cells in the intestinal crypt

Asymmetric cell division and changing cell type

Introduction

This illustrative example shows the emergence of clonal populations from stem cells in an intestinal crypt. Stem cells in the bottom of the crypt divide asymmetrically and produce a population of transit amplifying (TA) cells. For each of the TA cells, the color indicates the stem cell is it derived from.

Model description

This model shows several new modeling features, available as of Morpheus 1.2.

Loading domain from image

The crypt-like domain is specified by loading an external 8-bit TIFF image file using Lattice/Domain/Image.

Asymmetric cell division

Stem cells divide asymmetrically using the new ChildID handles in the Proliferation plugin. This sets a user-defined symbol (here called daughter) to either 1 or 2. This symbol can then be used to distinguish both daughter cells and treat them differently. In this example, it used to set the stemness (s) of one daughter to 1 and the stemness of the other daughter cell to 0.

Conditionally changing cell types

When a cell looses its stemness s, it is moved to the TA cell type. This is done using the new ChangeCellType plugin.

Upon satisfyiug its Condition, ChangeCellType moves the cell to the specified new cell type. By default, all the properties of a cell that exist in both cell type context are maintained and unspecified ones are set to their default values. This default behavior can be overridden using Triggers that specify Rules stating how to deal with specific properties.

PopulationReporter

The new PopulationReporter allows the collection of statistical data about the cell population. Here, it is used to count the sizes of the various clonal populations. This number of reported into a Global and subsequently written to file and plotted using a Logger.

Model

Crypt.xml

<?xml version='1.0' encoding='UTF-8'?>
<MorpheusModel version="3">
    <Description>
        <Title>Example-Crypt</Title>
        <Details>Illustrative model of stem cells in intestinal crypt

Shows the following features of Morpheus:

- Assymetric cell division (Proliferation)

- Conditionally change cell type (ChangeCellType)

- Loading simulation domain from image (Lattice/Domain)</Details>
    </Description>
    <Global>
        <Variable symbol="w_d" value="3000" name="wait time division"/>
        <Variable symbol="num_A" value="0.0" name="Clone A"/>
        <Variable symbol="num_B" value="0.0" name="Clone B"/>
        <Variable symbol="num_C" value="0.0" name="Clone C"/>
        <Variable symbol="num_D" value="0.0" name="Clone D"/>
        <Variable symbol="num_E" value="0.0" name="Clone E"/>
        <Constant symbol="s" value="0.0"/>
        <Constant symbol="clone" value="0.0"/>
    </Global>
    <Space>
        <Lattice class="square">
            <Size symbol="size" value="600 600 0"/>
            <BoundaryConditions>
                <Condition boundary="x" type="periodic"/>
                <Condition boundary="y" type="periodic"/>
            </BoundaryConditions>
            <Neighborhood>
                <Order>2</Order>
            </Neighborhood>
            <Domain boundary-type="noflux">
                <Image path="crypt.tif"/>
            </Domain>
        </Lattice>
        <SpaceSymbol symbol="l"/>
    </Space>
    <Time>
        <StartTime value="0"/>
        <StopTime value="50000"/>
        <TimeSymbol symbol="time"/>
    </Time>
    <CellTypes>
        <CellType class="biological" name="stem_cells">
            <Property symbol="clone" value="0.0"/>
            <Property symbol="t_d" value="0.0" name="time of division"/>
            <Property symbol="s" value="1" name="stemness"/>
            <VolumeConstraint target="800" strength="1"/>
            <SurfaceConstraint target="1" mode="aspherity" strength="1"/>
            <ChangeCellType newCellType="TA_cells">
                <Condition>s==0</Condition>
                <Triggers/>
            </ChangeCellType>
            <DirectedMotion direction="0, -1,  0" strength="0.5"/>
            <CellDivision daughterID="daughter" division-plane="random">
                <Condition>time > t_d</Condition>
                <Triggers>
                    <Rule symbol-ref="s">
                        <Expression>if( daughter == 1, 1, 0 )</Expression>
                    </Rule>
                    <Rule symbol-ref="t_d">
                        <Expression>time + rand_norm(w_d,200)</Expression>
                    </Rule>
                </Triggers>
            </CellDivision>
        </CellType>
        <CellType class="biological" name="TA_cells">
            <Property symbol="clone" value="0.0"/>
            <Property symbol="t_d" value="0" name="time of division"/>
            <Property symbol="d" value="0" name="divisions"/>
            <VolumeConstraint target="600 " strength="1"/>
            <SurfaceConstraint target="0.9" mode="aspherity" strength="1"/>
            <CellDivision daughterID="daughter" division-plane="random">
                <Condition>time > t_d</Condition>
                <Triggers>
                    <Rule symbol-ref="d">
                        <Expression>d+0.5</Expression>
                    </Rule>
                    <Rule symbol-ref="t_d">
                        <Expression>time + rand_norm(w_d,500)</Expression>
                    </Rule>
                </Triggers>
            </CellDivision>
            <CellDeath>
                <Condition>if( cell.center.y > size.y - 20, 1, 0)</Condition>
            </CellDeath>
            <Mapper name="Count Clone A">
                <Input value="clone==1"/>
                <Output symbol-ref="num_A" mapping="sum"/>
            </Mapper>
            <Mapper name="Count Clone B">
                <Input value=" clone==2"/>
                <Output symbol-ref="num_B" mapping="sum"/>
            </Mapper>
            <Mapper name="Count Clone C">
                <Input value="clone==3"/>
                <Output symbol-ref="num_C" mapping="sum"/>
            </Mapper>
            <Mapper name="Count Clone D">
                <Input value="clone==4"/>
                <Output symbol-ref="num_D" mapping="sum"/>
            </Mapper>
            <Mapper name="Count Clone E">
                <Input value="clone==5"/>
                <Output symbol-ref="num_E" mapping="sum"/>
            </Mapper>
        </CellType>
    </CellTypes>
    <CPM>
        <Interaction default="0">
            <Contact type1="stem_cells" type2="stem_cells" value="-10"/>
            <Contact type1="stem_cells" type2="TA_cells" value="10"/>
        </Interaction>
        <MonteCarloSampler stepper="edgelist">
            <MCSDuration value="1.0"/>
            <Neighborhood>
                <Order>2</Order>
            </Neighborhood>
            <MetropolisKinetics temperature="3" yield="0.1"/>
        </MonteCarloSampler>
        <ShapeSurface scaling="norm">
            <Neighborhood>
                <Distance>2.5</Distance>
            </Neighborhood>
        </ShapeSurface>
    </CPM>
    <CellPopulations>
        <Population size="0" type="stem_cells">
            <InitRectangle mode="regular" number-of-cells="5">
                <Dimensions size="100,30,0" origin="250.0, 75.0, 0.0"/>
            </InitRectangle>
            <InitProperty symbol-ref="clone">
                <Expression>cell.id</Expression>
            </InitProperty>
            <InitProperty symbol-ref="t_d">
                <Expression>rand_uni(0,w_d)</Expression>
            </InitProperty>
        </Population>
        <Population size="0" type="TA_cells">
            <InitRectangle mode="regular" number-of-cells="500">
                <Dimensions size="600, 490, 0" origin="0,80, 0"/>
            </InitRectangle>
            <InitProperty symbol-ref="t_d">
                <Expression>rand_uni(0,w_d)</Expression>
            </InitProperty>
        </Population>
    </CellPopulations>
    <Analysis>
        <Gnuplotter time-step="250" decorate="false">
            <Terminal name="png"/>
            <Plot>
                <Cells value="clone">
                    <ColorMap>
                        <Color value="20" color="gold"/>
                        <Color value="19" color="dark-pink"/>
                        <Color value="18" color="dark-khaki"/>
                        <Color value="17" color="dark-goldenrod"/>
                        <Color value="16" color="cyan"/>
                        <Color value="15" color="coral"/>
                        <Color value="14" color="chartreuse"/>
                        <Color value="13" color="brown4"/>
                        <Color value="12" color="bisque"/>
                        <Color value="11" color="beige"/>
                        <Color value="10" color="light-red"/>
                        <Color value="9" color="light-green"/>
                        <Color value="8" color="light-blue"/>
                        <Color value="7" color="gray"/>
                        <Color value="6" color="black"/>
                        <Color value="5" color="yellow"/>
                        <Color value="4" color="blue"/>
                        <Color value="3" color="green"/>
                        <Color value="2" color="red"/>
                    </ColorMap>
                </Cells>
            </Plot>
        </Gnuplotter>
        <Logger time-step="100">
            <Input>
                <Symbol symbol-ref="num_A"/>
                <Symbol symbol-ref="num_B"/>
                <Symbol symbol-ref="num_C"/>
                <Symbol symbol-ref="num_D"/>
                <Symbol symbol-ref="num_E"/>
            </Input>
            <Output>
                <TextOutput/>
            </Output>
            <Plots>
                <Plot title="Clone numbers" time-step="5000">
                    <Style point-size="1" grid="true" style="linespoints" line-width="3.0"/>
                    <Terminal terminal="png"/>
                    <X-axis>
                        <Symbol symbol-ref="time"/>
                    </X-axis>
                    <Y-axis>
                        <Symbol symbol-ref="num_A"/>
                        <Symbol symbol-ref="num_B"/>
                        <Symbol symbol-ref="num_C"/>
                        <Symbol symbol-ref="num_D"/>
                        <Symbol symbol-ref="num_E"/>
                    </Y-axis>
                </Plot>
            </Plots>
        </Logger>
        <DependencyGraph format="svg" exclude-plugins="Gnuplotter"/>
    </Analysis>
</MorpheusModel>

In Morpheus GUI: Examples → CPM → Crypt.xml


examples/cellular_potts.txt · Last modified: 10:02 13.11.2014 by Walter