Stem Cells in the Intestinal Crypt

Persistent Identifier

Use this permanent link to cite or share this Morpheus model:

Demonstrates the Morpheus features asymmetric cell division (CellDivision), conditional change of cell type (ChangeCellType) and loading a simulation domain from an Image.

This model also requires the separate file crypt.tiff.


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 TA cell, the color indicates the stem cell from which it was derived.

Asymmetric cell division and changing cell type.
Asymmetric cell division and changing cell type.


The 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 crypt.tiff using the Image feature.

Asymmetric Cell Division

Stem cells divide asymmetrically using the new daughterID handles in the CellDivision element. 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 is 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 ChangeCellType element.

Upon satisfying 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 contexts 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.


Mappers allow the collection of statistical data about the cell population. Here, they are used to count the sizes of the various clonal populations. This number is reported into global Variables and subsequently written to a file and plotted using a Logger.


Get this model via:

  • Morpheus-Link or
  • Morpheus GUI: ExamplesCPMCrypt.xml or
  •  Download: Crypt.xml
  • XML Preview

    <?xml version='1.0' encoding='UTF-8'?>
    <MorpheusModel version="4">
            <Details>Model ID:
    Full title:	Stem Cells in the Intestinal Crypt
    Date:	01.03.2016
    Software:	Morpheus (open source). Download from:
    Comment:	Shows the following features of Morpheus: asymmetric cell division (proliferation), conditionally change cell type (ChangeCellType), loading simulation domain from image (Lattice/Domain).</Details>
            <Variable symbol="w_d" name="wait time division" value="3000"/>
            <Variable symbol="num_A" name="Clone A" value="0.0"/>
            <Variable symbol="num_B" name="Clone B" value="0.0"/>
            <Variable symbol="num_C" name="Clone C" value="0.0"/>
            <Variable symbol="num_D" name="Clone D" value="0.0"/>
            <Variable symbol="num_E" name="Clone E" value="0.0"/>
            <Constant symbol="s" value="0.0"/>
            <Constant symbol="clone" value="0.0"/>
            <Lattice class="square">
                <Size symbol="size" value="600 600 0"/>
                    <Condition type="periodic" boundary="x"/>
                    <Condition type="periodic" boundary="y"/>
                <Domain boundary-type="noflux">
                    <Image path="crypt.tiff"/>
            <SpaceSymbol symbol="l"/>
            <StartTime value="0"/>
            <StopTime value="50000"/>
            <TimeSymbol symbol="time"/>
            <CellType class="biological" name="stem_cells">
                <Property symbol="clone" value="0.0"/>
                <Property symbol="t_d" name="time of division" value="0.0"/>
                <Property symbol="s" name="stemness" value="1"/>
                <VolumeConstraint target="800" strength="1"/>
                <SurfaceConstraint target="1" strength="1" mode="aspherity"/>
                <ChangeCellType newCellType="TA_cells">
                <DirectedMotion direction="0, -1,  0" strength="0.5"/>
                <CellDivision division-plane="random" daughterID="daughter">
                    <Condition>time > t_d</Condition>
                        <Rule symbol-ref="s">
                            <Expression>if( daughter == 1, 1, 0 )</Expression>
                        <Rule symbol-ref="t_d">
                            <Expression>time + rand_norm(w_d,200)</Expression>
            <CellType class="biological" name="TA_cells">
                <Property symbol="clone" value="0.0"/>
                <Property symbol="t_d" name="time of division" value="0"/>
                <Property symbol="d" name="divisions" value="0"/>
                <VolumeConstraint target="600 " strength="1"/>
                <SurfaceConstraint target="0.9" strength="1" mode="aspherity"/>
                <CellDivision division-plane="random" daughterID="daughter">
                    <Condition>time > t_d</Condition>
                        <Rule symbol-ref="d">
                        <Rule symbol-ref="t_d">
                            <Expression>time + rand_norm(w_d,500)</Expression>
                    <Condition>if( > size.y - 20, 1, 0)</Condition>
                <Mapper name="Count Clone A">
                    <Input value="clone==1"/>
                    <Output symbol-ref="num_A" mapping="sum"/>
                <Mapper name="Count Clone B">
                    <Input value=" clone==2"/>
                    <Output symbol-ref="num_B" mapping="sum"/>
                <Mapper name="Count Clone C">
                    <Input value="clone==3"/>
                    <Output symbol-ref="num_C" mapping="sum"/>
                <Mapper name="Count Clone D">
                    <Input value="clone==4"/>
                    <Output symbol-ref="num_D" mapping="sum"/>
                <Mapper name="Count Clone E">
                    <Input value="clone==5"/>
                    <Output symbol-ref="num_E" mapping="sum"/>
            <Interaction default="0">
                <Contact type1="stem_cells" type2="stem_cells" value="-10"/>
                <Contact type1="stem_cells" type2="TA_cells" value="10"/>
            <MonteCarloSampler stepper="edgelist">
                <MCSDuration value="1.0"/>
                <MetropolisKinetics yield="0.1" temperature="3"/>
            <ShapeSurface scaling="norm">
            <Population type="stem_cells" size="0">
                <InitRectangle number-of-cells="5" mode="regular">
                    <Dimensions origin="250.0, 75.0, 0.0" size="100,30,0"/>
                <InitProperty symbol-ref="clone">
                <InitProperty symbol-ref="t_d">
            <Population type="TA_cells" size="0">
                <InitRectangle number-of-cells="500" mode="regular">
                    <Dimensions origin="0,80, 0" size="600, 490, 0"/>
                <InitProperty symbol-ref="t_d">
            <Gnuplotter time-step="250" decorate="false">
                <Terminal name="png"/>
                    <Cells value="clone">
                            <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"/>
            <Logger time-step="100">
                    <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"/>
                    <Plot time-step="5000" title="Clone numbers">
                        <Style grid="true" point-size="1" line-width="3.0" style="linespoints"/>
                        <Terminal terminal="png"/>
                            <Symbol symbol-ref="time"/>
                            <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"/>
            <ModelGraph format="svg" reduced="false" include-tags="#untagged"/>

    This model also requires the separate file crypt.tiff.
    Model Graph
    Model Graph


    Files associated with this model: