CS 420/527 — Biologically Inspired Computation
NetLogo Simulation


This page was automatically generated by NetLogo 5.0beta2. Questions, problems? Contact feedback@ccl.northwestern.edu.

The applet requires Java 5 or higher. Java must be enabled in your browser settings. Mac users must have Mac OS X 10.4 or higher. Windows and Linux users may obtain the latest Java from Sun's Java site. If the display appear cut off with Firefox, then try another browser (Safari works).

powered by NetLogo

view/download model file: Segmentation-cells.nlogo


Humans have 33 vertebrae, chickens have 55, mice have 65, and the corn snake has 315. How does a developing embryo "count" the number of vertebrae it should produce, which is characteristic of its species? This NetLogo model is based on the best contemporary explanation of this morphogenetic (form-producing) process, called the "clock and wavefront model" of embryological segmentation (Cooke & Zeeman, 1976; see References for recent work).

The vertebrae (and muscles and organs associated with them) develop from a series of somites that develop in order from the front (anterior) of the embryo to its tail (posterior). In this process previously uncommitted cells differentiate into somite cells with definite boundaries between distinct somites. The process is controlled by the concentrations of three different chemicals or "morphogens." The Anterior or A morphogen (probably retinoic acid in embryos) is produced by the cells that have already committed to be in somites, and it diffuses toward the tail of the embryo, forming a decreasing gradient from the somites to the tail. The Posterior or P morphogen (e.g., FGF, Wnt) is produced by the embryo’s tail bud, and it diffuses toward the head of the embryo, forming a decreasing gradient from the tail toward the head. Where the P concentration falls below a certain threshold (called P_upb in this model) is called the "determination front," since somites form in front of it.

Since the determination front is at a fixed distance in front of the tail bud, as the embryo grows the determination front moves rearward. As a consequence there is an increasing gap between the determination front and the region of high A concentration near the most recently formed somites. Since this region of low A and P concentrations is where the new somite will form, its size determines the size of the resulting somite, and therefore the embry’s growth rate also has an effect on somite size. (The large number of vertebrae in the corn snake results from a comparatively slow growth rate; see Gomez et al., 2008.)

The tail bud contains a biochemical "segmentation clock" that periodically produces a pulse of chemical that is a segmentation signal (Notch & HES proteins, called the "S morphogen" here); biologists are still elucidating the exact nature of this clock (Dequ"ant & Pourqui", 2008). The clock period is 1.5 hours in chickens, 1.7 hours in corn snakes, and 2 hours in mice, but 4-5 hours in humans. The uncommitted cells form an "excitable medium," which means that if the concentration of S around a cell is sufficiently high, the cell is stimulated to produce its own pulse of S. As a consequence, when the clock cells produces a pulse of S, it causes a cascade of S production, which propagates in a wave from the tailbud toward the front of the embryo. Since a cell enters an insensitive "refractory period" after it emits a pulse, the wave cannot go backward, but propagates in a single direction (another characteristic of excitable media).

When the S (segmentation) signal reaches cells in the region between the determination front and the previously formed somites (i.e., the region of low A and P concentrations), it triggers the cells in this region to commit to being somite cells. Thus the amount of space that has opened between the A and P gradients (as determined by growth) between clock pulses defines the size of the new somite. As the cells commit to becoming somite cells they use local chemical signals to decide whether they are at the anterior or posterior boundary of the somite (so, for example, they know whether to form the anterior or posterior end of a vertebra, thus establishing their polarity).

In real embryos, not all the somites are the same size, because the growth rate varies according to the developmental program of the species.


After setup the model displays the initial state of the embryo in a band in the middle, the A gradient in the upper band, and the P gradient in the lower. Furthermore, the central band has a green circle at the left end, representing the embryo’s head, and a blue circle at the right end, representing the embryo’s tail bud.

When the simulation is started, operation proceeds as follows. On each time step the head circle set its A concentration to the maximum 100 and the tail bud sets its P concentration to the maximum (P-max, initially 100). One-dimensional diffusion and decay of the A and P morphogens is simulated, and the resulting gradients are displayed.

The embryo grows to the right at the specified rate, and as it moves it sets the S morphogen of its patch to the maximum value (300) whenever its clock resets, which decays at a fixed rate. The axis cells implement an excitable medium. The S morphogen diffuses and decays at fixed rates, but if it exceeds a specified threshold in a cell that is not in its refractory period, then that cell will "fire" by adding 100 to its S concentration and enter its refractory period. Due to the refractory property, the wave of S activity tends to propogate in one direction, from the tail bud toward the head.

In order for a patch to differentiate into a somite, both the A and P morphogens must be less than specified upper bounds (A_upb, P_upb), and the segmentation morphogen must be above a threshold (S_lwb). Normally this occurs in a band to the right of the last differentiated somite, and so this is where the new somite forms.

When a patch differentiates into a somite it looks at the patch to its left (anterior side). If it is already a somite, then the patch differentiates into an anterior boundary cell (yellow) of the new somite, otherwise it differentiates into a posterior compartment cell (brown). Thus the yellow-brown segments are the somites.

When the embryo reaches its growth limit, the P-max value begins to decay toward 0, and so the P gradient eventually decays to 0. Although the tail bud pacemaker continues to cycle, the segment structure is stable.


DEFAULT sets the parameters to default values at which segmentation occurs. They are a good place to begin investigation of the effects of the parameters.

SETUP initializes the simulation based on the specified parameters. (Most parameters can be changed during a simulation run, however.)

RUN starts the simulation running.

Growth_Rate sets the number of fractions of a unit of length (one patch) that the embryo grows during each clock tick.

Clock_Rate defines the number of ticks between clock pulses from the tail bud.

A_diff, A_decay, P_diff, P_decay set the diffusion rate and decay rate for the anterior and posterior morphogens. Each is defined as a percentage of the quantity at a patch that is distributed to adjacent patches (for diffusion) or eliminated (for decay). To help in setting these parameters, monitors A_const and P_const display the length constant determined by the diff/decay ratio. The length constant is the length, in patch units, over which the concentration decreases to 1/e = 37% of its maximum value. (The diffusion rate determines how quickly the gradient is established.)

Initial_Length, Max_Length are the initial and maximum length (in patch units) of the embryo. When it reaches the maximum length (or the right-hand boundary of the display), it stops growing.

A_upb, P_upb, S_lwb sets the morphogen thresholds at which cells will differentiate into somites. The segmentation signal must be greater than S_lwb and the anterior and posterior gradients must be below A_upb and P_upb, respectively, in order for differentiation to occur. This occurs in the region between the already differentiated somites and the determination boundary when a segmentation peak passes through.

Refractory Period is the period during which undifferentiated cells are insensitive to S (the segmentation morphogen) after they have emitted a pulse of S. Thus the Refractory Period determines the maximum wave frequency.

Threshold is the minimum S (segmentation morphogen) level in adjacent cells in order for a cell to fire and emit its own pulse of S.


[This section will some ideas of things for the user to notice while running the model.]


[This section will give some ideas of things for the user to try to do (move sliders, switches, etc.) with the model. This is all there is for now.]

With the clock_period set to 500, try different growth_rates from 500 to 5000 and oberve how it affects the size and number of segments.

Mutations can effect the stability of a morphogen and the concentrations of chemicals that break it down, thus altering the decay rate. Other mutations can alter morphogens so as to affect their diffusion rates in embryonic tissue. Keeping in mind that the space constant of the gradient is determined by the diff/decay ratio, experiment with the effects of different diffusion and decay rates on the pattern of segmentation.

To observe the wave propagation of the S (segmentation) signal, do the following. Start with the Default parameters and set A_upb and P_upb to 0; this will prevent somite formation. Set the growth_rate to 0 and the initial_length to something large, such as 100. This will allow you to observe the wave propagating from the tail to the head of a relatively large, fixed-size embryo. When you Run the simulation, watch the tail bud. When it turns orange, it has generated a pulse of S. The leading edge of the wave is orange, showing a high S concentration, while the trailing edge decays back to black. Try a variety of different clock_periods longer than the refractory_period. Then try setting the clock_period to less than the refractory_period. Observe carefully what happens and try to explain it.


This section will give some ideas of things to add or change in the procedures tab to make the model more complicated, detailed, accurate, etc.


This model implements approximate one-dimensional diffusion directly, rather than using NetLogo’s built-in diffusion commands, which are two-dimensional.

Agent sets (in particular patch sets) that vary with the growing embryo are used to address the patches in the various display regions and the patches involved in diffusion and wave front computations.

The scale-color operators have a lower bound of 1 (rather than 0), because a lower bound of 0 caused artifacts to appear in the gradient display. It appears that certain values very near to 0 (and thus colors that should have been near white) were translated to black.


For recent research on segmentation in embryological morphognesis, on which this model is based, see:

Dequ"ant, M.-L., & Pourqui", O. (2008). Segmental patterning of the vertebrate embryonic axis. Nature Reviews Genetics 9: 370"82.

Gomez, C., "zbudak, E.M., Wunderlich, J., Baumann, D., Lewis, J., & Pourqui", O. (2008). Control of segment number in vertebrate embryos. Nature 454: 335"9.

The original statement of the "clock and wavefront model" is:

Cooke, J., & Zeeman, E.C. (1976). A clock and wavefront model for control of the number of repeated structures during animal morphogenesis. J. Theor. Biol. 58: 455"76.

To refer to this model in academic publications, please use: MacLennan, B.J. (2008). NetLogo Segmentation model. http://www.cs.utk.edu/~mclennan. Dept. of Electrical Engineering & Computer Science, Univ. of Tennessee, Knoxville.

In other publications, please use: Copyright 2008 Bruce MacLennan. All rights reserved. See http://www.cs.utk.edu/~mclennan/420/NetLogo4.0/Segmentation.html for terms of use.


globals [
  half-width      ; half-width of axis row
  AG-half-width   ; half-width of anterior gradient row
  PG-half-width   ; half-width of posterior gradient row
  separation      ; separation between rows
  AG-offset       ; offset to row with anterior gradient
  PG-offset       ; offset to row with posterior gradient
  axis-row        ; the row on which the axis is displayed
  AG-row          ; the row on which the anterior gradient is displayed
  PG-row          ; the row on which the posterior gradient is displayed
  A_const         ; A gradient space constant
  P_const         ; P gradient space constant
  head-col        ; column position of head
  P-max           ; maximum P signal (decreases when growth limit reached)
  recording-movie?; set if recording a movie

breed [ tailbuds tailbud ]
breed [ heads head ]
breed [ somite-cells somite-cell ]

tailbuds-own [
  cycle           ; phase in clock cycle
  cell-cycle      ; phase in growth cycle
turtles-own [
  phase           ; phase of cell activity
  future-somite?  ; true if destined to become somite
  somite?         ; true if cell is in a somite

patches-own [
  activity        ; S activity (segmentation signal) of a cell
  A_signal        ; anterior signal
  A_new           ; new value of A (temp)
  P_signal        ; posterior signal
  P_new           ; new value of P (temp)
  occupied?       ; set if space occupied by somite-cell

to setup ; Initialize Simulation
  ;; (for this model to work with NetLogo's new plotting features,
  ;; __clear-all-and-reset-ticks should be replaced with clear-all at
  ;; the beginning of your setup procedure and reset-ticks at the end
  ;; of the procedure.)
  ; compute coordinates of display regions
  set half-width 8
  set AG-half-width 1
  set PG-half-width 1
  set separation 1
  set AG-offset 1 + half-width + separation + AG-half-width
  set PG-offset -1 - half-width - separation - PG-half-width
  set axis-row 0
  set AG-row axis-row + AG-offset
  set PG-row axis-row + PG-offset
  set head-col min-pxcor + 1
  ask patches [
    set activity 0
    set A_signal 0
    set P_signal 0
    set occupied? false
    set pcolor grey + 3                            ; light grey
  create-tailbuds 1 [ init-tailbud ]               ; one tailbud at right (posterior) end of embryo
  create-heads 1 [ init-head ]                     ; one head cell at left (anterior) end of embryo
  ask turtles [
    set phase 0
    set future-somite? false
    set somite? false
  ask heads [ set somite? true ]                   ; head acts like somite
  set P-max 100                                    ; tail bud emits this so long as growth continues
  set A_const sqrt (A_diff / (2 * A_decay))        ; space constant of A gradient
  set P_const sqrt (P_diff / (2 * P_decay))        ; space constant of P gradient
  display-axis                                     ; display initial state of embryo
  display-AG                                       ; display 0 A gradient
  display-PG                                       ; display 0 P gradient
  set recording-movie? false

to reset_defaults  ; Reset parameters to default values
  set growth_rate 2000
  set clock_period 500
  set A_diff 50
  set A_decay 10
  set P_diff 50
  set P_decay 5
  set A_upb 70
  set P_upb 10
  set S_lwb 95
  set initial_length 4
  set max_length max-pxcor
  set refractory_period 100
  set threshold 10

to init-tailbud
  set initial_length min list (max-pxcor - head-col - 1) initial_length ; ensure initial length in bounds
  setxy (head-col + initial_length) axis-row
  set shape "circle"
  set color blue
  set size 4
  set cycle 0
  set cell-cycle 0
  set heading 90

to init-head
  setxy head-col axis-row
  set shape "circle"
  set color green
  set size 4

to simulate ; Main simulation cycle
  ask tailbuds [ oscillate grow ] ; there is only one tailbud
  if recording-movie? and ticks mod frame-skip = 0 [movie-grab-view]

to oscillate ; Advance cycle of pacemaker with color changes
  set cycle cycle + 1
  ifelse cycle >= clock_period
  [ set cycle 0
    set color orange            ; orange indicates S has been emitted
    set activity 300 ]          ; 300 units of S emitted from tailbud
  [ if cycle > clock_period / 4 ; for visibility, tailbud stays orange for 1/4 cycle
    [ set color blue ]

to grow ; Tailbud grows (moves right) until limit reached
  ifelse xcor < (min list max_length max-pxcor) - 1 ; grow so long as less than limit
    [ fd growth_rate / 100000 ]                     ; grow at specified rate
    [ set P-max max list 0 (P-max - 1) ]            ; P-max decays when limit reached
  add-somite-cells                                  ; add somite-cells in unoccupied space

to add-somite-cells ; add somite-cells to left of tailbud
  ask patches with [ abs(pycor - axis-row) < half-width - 0.5 and pxcor >= head-col and pxcor < [xcor] of tailbud 0
                     and not occupied? ]
  [ if random 50 = 0 [sprout-somite-cells 1 [ init-somite-cell ] ] ]

to init-somite-cell
  set color white
  set shape "circle" 
  set size 1
  set somite? false
  set future-somite? false
  set activity 0
  set occupied? true
  setxy (xcor - 0.25 + random-float 0.5) (ycor - 0.25 + random-float 0.5)

to propagate-wave ; Implement propagation of S in excitable medium
  ; activity (S morphogen) at tailbud decays
  ask tailbuds [ set activity activity * 0.95 ]
  diffuse activity 0.75
  ; following addresses all patches on axis between head and tailbud (exclusive)
  ask somite-cells with [ abs(ycor - axis-row) <= half-width
        and xcor >= head-col and xcor < [xcor] of tailbud 0 ] [
    ; approximate diffusion and decay of S:
;    set activity activity
;     + (([activity / 4] of patch-at -1 0) + ([activity / 4] of patch-at 1 0)
;        + ([activity / 4] of patch-at 0 -1) + ([activity / 4] of patch-at 0 1) - activity)
;      * 0.75
    set activity activity * 0.95
    if phase >= 0 [                         ; REDUNDANT? (always >= 0)
      ifelse phase = 0                      ; refractory period is past
        [ if activity > threshold [         ; if threshold exceeded, cell fires
            set phase refractory_period     ; enter new refractory period
            set activity activity + 100 ] ] ; emit pulse of S
        [ set phase phase - 1               ; activity continues to decay during refractory period
          set activity max list 0 (activity - int (100 / refractory_period + 1) ) ] ]
    if not somite? and activity > S_lwb          ; four conditions for triggering somite formation
     and [ A_signal < A_upb ] of patch xcor axis-row
     and [ P_signal < P_upb ] of patch xcor axis-row
      [ set future-somite? true ]
  ; following addresses all patches involved in axis display
  ask somite-cells with [ abs(ycor - axis-row) <= half-width and xcor >= head-col and xcor < [pxcor] of tailbud 0 ] [
    if future-somite? ; if the cell on axis will be a new somite
    [ ; if cell to left is already a somite, then this is anterior boundary of new somite
      ifelse any? turtles-at -1 0 and [somite?] of one-of turtles-at -1 0
        [ set color yellow ] ; anterior compartment of somite
        [ set color brown ]  ; posterior compartment of somite
  ask somite-cells with [future-somite?] [ set future-somite? false set somite? true ] ; future somites commit

to diffuse-AG ; Diffuse anterior morphogen and set to maximum in somites
  ask patches with [ pycor = axis-row and pxcor > head-col and pxcor < [xcor] of tailbud 0 ]
  [ set A_new A_signal
     + (([A_signal / 2] of patch-at -1 0) + ([A_signal / 2] of patch-at 1 0) - A_signal) * A_diff / 100
    set A_new A_new * (1 - A_decay / 100) 
  ask patches with [ pycor = axis-row and pxcor > head-col and pxcor < [xcor] of tailbud 0 ]
   [ set A_signal A_new ]
;  diffuse A_signal (A_diff / 100)
  ask turtles with [somite?] [ ask patch-at 0 axis-row [set A_signal 100] ]

to diffuse-PG ; Diffuse posterior morphogen and set to P_max at tail bud.
  ask patch ([pxcor] of tailbud 0) axis-row [ set P_signal P-max ]
  ask patches with [ pycor = axis-row and pxcor > head-col and pxcor < [xcor] of tailbud 0 ]
  [ set P_new P_signal
     + (([P_signal / 2] of patch-at -1 0) + ([P_signal / 2] of patch-at 1 0) - P_signal) * P_diff / 100
    set P_new P_new * (1 - P_decay / 100) 
  ask patches with [ pycor = axis-row and pxcor > head-col and pxcor < [xcor] of tailbud 0 ]
  [ set P_signal P_new ]

to display-AG ; Display Anterior Gradient
  ; The lower bound is 1 because 0 seems to cause incorrect colors (black instead of white)
  ; for certain values near 0
  ask patches with [ abs(pycor - AG-row) <= AG-half-width and pxcor >= head-col and pxcor <= [xcor] of tailbud 0 ]
  [ set pcolor scale-color green ([A_signal] of patch pxcor axis-row) 150 1 ]

to display-PG ; Display Posterior Gradient
  ; The lower bound is 1 because 0 seems to cause incorrect colors (black instead of white)
  ; for certain values near 0
  ask patches with [ abs(pycor - PG-row) <= PG-half-width and pxcor >= head-col and pxcor <= [xcor] of tailbud 0 ]
  [ set pcolor scale-color blue ([P_signal] of patch pxcor axis-row) 150 1 ]

to display-axis ; Display segmentation (S) concentration of undifferentiated cells
;  ask patches with [ abs(pycor - axis-row) <= half-width and pxcor >= head-col and pxcor < [xcor] of tailbud 0 ]
;  [ if not [somite?] of patch pxcor axis-row
;     [ set pcolor scale-color orange ([activity] of patch pxcor axis-row) 0 150 ] ]
  ask somite-cells with [ abs(ycor - axis-row) <= half-width and xcor >= head-col and xcor < [xcor] of tailbud 0 ]
  [ if not somite?
     [ set color scale-color orange activity 0 150 ] ]

Return to COSC 420/527 home page

Return to MacLennan's home page

Send mail to Bruce MacLennan / MacLennan@utk.edu

Valid HTML 4.01!This page is web.eecs.utk.edu/~mclennan/Classes/420/NetLogo/Segmentation-cells.html
Last updated: 2012-02-02.