Back to the Classics: Cell Sorting

How do cells orient themselves into organised structures while a tissue grows? This explorable describes the very first Cellular Potts Model (CPM): the cell sorting model of François Graner and James Glazier. After a bit of history, the interactive model will illustrate how cells can sort themselves into ordered spatial patterns—a key ability for processes like embryogenesis and tissue development.

This explorable was published in: Wortel & Textor. eLife 2021;10:e61288. doi:10.7554/eLife.61288.

A Brief History of the CPM

The first version of a CPM was developed in the early nineties by François Graner and James Glazier (Graner and Glazier, 1992). At the time, developmental biologists had found that when two different types of embryonic cells were mixed, they would sort into large, homogeneous same-cell patches—spontaneously! Experimental studies suggested that this sorting process arose from differences in adhesion between the cell types. To understand how this might work, Graner and Glazier wanted to model the phenomenon and see if they could indeed reproduce sorting based on such "differential adhesion" alone (in other words: they wanted to test the so-called differential adhesion hypothesis).

Inspiring Magnets

Their model was an extension of the existing Potts model, originally developed by physicists to simulate magnets. The Potts model simulates the interaction between so-called "spins" on a crystalline lattice.

The idea is simple: we have a grid with a bunch of pixels, representing points on the crystal lattice. These points all have a property called their spin, which can be either "down" (0) or "up" (1). They then interact as follows:

For more details on the model, see this tutorial; the model below is essentially the model from that tutorial with Adhesion only. For now though, let's just look at the result (with red and gray representing the "up" and "down" spins):

While the Potts model does not much look like a cell, Graner and Glazier noticed that it does have an interesting property: the spins on the lattice automatically sort into large patches of same-spin sites. And even the mechanism somewhat resembled their differential adhesion hypothesis: the energetic cost for having adjacent pixels with opposite spin could be interpreted as a "contact energy" or "adhesion". Could they apply a similar principle to the cell sorting question?

The Cellular Potts Model

A problem with the Potts model is that pixels can only have one of two states, since magnetic spins can only be "up" or "down". While you could interpret this as "cell" or "empty background" instead, Graner and Glazier needed to model many different cells for their differential adhesion simulation—not just a single cell on an empty background. Their model replaced the binary spin property with a "cell identity", a number indicating the cell to which a grid point belonged. (The trick here is that in contrast to the spin, the cell identity number could be any integer $\geq$0 rather than only 0 or 1—allowing the co-existence of multiple cells on the same grid).

A second problem is that the patches formed in the Potts model can be of any size and shape, unlike cells. Graner and Glazier therefore extended the energy equations so that "cells" would roughly keep the same size (number of grid points), by assigning energetic penalties for any deviations from this "target volume" (see this tutorial for details; Graner and Glazier, 1992, Glazier et al, 2007).

They then used this to model their differential adhesion hypothesis. They did this in a similar way as the original Potts model described earlier, but now:

The result was pretty magical:

Here, the black and gray cells start out randomly mixed, but automatically sort themselves into large, same-cell patches. This simulation supported the differential adhesion hypothesis: apparently, cells could find each other based on adhesion alone, because this model contained no other mechanism for cells to find each other.

Let's now explore the cell sorting behaviour in more detail, using an interactive model.

Try It Yourself

Below, you'll find Graner and Glaziers model of cells sorting through differential adhesion. You can adjust the different adhesion parameters using the sliders below.


  1. Click play (►) and let the simulation run for a while. You should see that most of the cells on the outside of the "blob" are red; this is because the gray cells have a higher contact penalty with the background than the red cells do, so the gray cells prefer to "hide" behind the red ones.
  2. Set Jbg,gray to 6 and Jbg,red to 12. What happens and why?
  3. Now increase Jbg,red further, to 30. You'll see that the gray cells on the outside stretch out; preventing the red cells from contacting the background becomes more important than preventing the gray cells from falling apart.
  4. Set both Jbg,red and Jbg,gray to 8, and increase Jgray,red to 12. You should see that cells start sorting. Once they have, you can click on "blender" to see them do it again (just to make sure it wasn't a fluke...)
  5. What happens when you set Jgray,red to its maximum value?
  6. Now set both Jbg,red and Jbg,gray to 8, Jred,red and Jgray,gray to 14, and Jred,gray to 6. What do you see?


The CPM was developed in the nineties as an extension of an existing model of magnetism, in which dynamics arise from an energetic optimization process. The model of Graner and Glazier considered only energies associated with cell-cell adhesion and with cell size, and was designed to answer a specific question: can cells of different types sort themselves in space based on "differential adhesion" alone? Indeed, spatial patterning arose spontaneously in the Graner-Glazier model, showing that differential adhesion was sufficient to explain the cell sorting process.

This was the first "cellular" Potts model, or CPM. After Graner and Glazier showed how the central energy equation of the original Potts model could be extended to incorporate processes relevant to cells, others quickly followed with their own variations to the cellular Potts model. In particular, Paulien Hogeweg developed important extensions to generalize the CPM—which is why it is also referred to as the Glazier-Graner-Hogeweg (GGH) model (Glazier et al, 2007).


Glazier, Balter, Poplawski. Magnetization to Morphogenesis: A Brief History of the Glazier-Graner-Hogeweg Model.. Single-Cell-Based Models in Biology and Medicine. Mathematics and Biosciences in Interaction, 2007.