specifying initial conditions for cells

33 views
Skip to first unread message

Randy Heiland

unread,
Nov 2, 2023, 5:18:37 AM11/2/23
to Morpheus users
Apologies if I missed it in the docs, but what options exist for specifying the initial positions (CPM lattice points) for cells? I saw that the "Cell" tag in the XML can define single points (Nodes) - rf. RunAndTumble.xml snippet below. Is it possible to easily specify multiple, contiguous nodes for a single Cell? Are there alternatives to XML, e.g., .csv files, for defining cells?

    <CellPopulations>
        <Population type="amoeba" size="1">
            <Cell name="1" id="1">
                <Nodes>50,100,0</Nodes>
            </Cell>
            <Cell name="2" id="2">
                <Nodes>150, 50,0</Nodes>
            </Cell>

thanks, Randy

Lutz Brusch

unread,
Nov 2, 2023, 6:27:46 AM11/2/23
to Morpheus users
Hi Randy,

true, initializing the spatial configuration of cells is a key step of every simulation and Morpheus offers all the flexibility for this:
- the model section CellPopulations/Population (in the GUI and xml) can declare geometrical rules incl.
  InitCellObjects/Arrangement(cell repetitions in (x,y,z), displacements in (x,y,z) and random_displacement) of different cell shapes with adjustable sizes and rotation angles (Point, Box, Sphere, Ellipsoid, Cylinder)
  InitCircle (seed cells in a circular subdomain), InitDistribute, InitHexLattice, InitPoissonDisc, InitRectangle, InitVoronoi
- you can overlay multiple CellPopulations/Population groups with the above constructs
- all these arrangements together can be masked by Lattice/Domain
- you may specify the initial cell shapes or just set single points that will inflate into cell shapes during an initial transient of the model simulation
- you can load a CellPopulations/Population from files, both CSV (for lists of nodes) or TIFF (for pixel-based spatial layout where pixel color is interpreted as CellID, so you can segment from microscopy images or draw arbitrary areas each with the same color)
- you can run a helper model that distributes the cells as you need and saves a snapshot of the spatial configuration with Time/SaveInterval (then load the snapshot model.xml and copy/paste its CellPopulations/Population from the snapshot model to your main model)

So there is a lot of flexibility for initializing the spatial configuration of cells and all this is defined in the same xml file as the model rules. So you can reproduce the exact same initialization from the model.xml.

For a 'realistic' epithelial arrangement, see https://morpheus.gitlab.io/post/2019/07/01/poisson-disc-sampling/

For inspirations, you may browse the >80 models in the repo (https://morpheus.gitlab.io/model/) and then see the CellPopulations section of interesting models. And the InApp-Docu explains all options and parameters context-sensitive when you load an interesting model and click on an initialization statement under CellPopulations.

Best,
Lutz

Randy Heiland

unread,
Nov 3, 2023, 10:04:52 AM11/3/23
to Lutz Brusch, Morpheus users
Thanks Lutz! I am particularly interested in "can load a CellPopulations/Population from files, both CSV". I downloaded the models repo and searched for "csv" but only saw that option for saving output files for the logger. Do you have an example of a model (and .csv) where it's used for CellPopulations?

thanks, Randy

--
You received this message because you are subscribed to a topic in the Google Groups "Morpheus users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/morpheus-users/5cDbTZbcJ_Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to morpheus-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/morpheus-users/af9e7b01-f26c-48aa-9c03-9d2225c33187n%40googlegroups.com.

Lutz Brusch

unread,
Nov 7, 2023, 9:12:56 AM11/7/23
to Morpheus users
Hi Randy,
thanks for this suggestion. We've now added such an example to the model repo: https://identifiers.org/morpheus/M5492
There, the file Population_M.csv provides a list of ID,x,y(,z) lattice coordinates where cells shall be seeded with one node each. The model loads this set (and for fun, merges it with a random set of another CellType) and runs some MCS.
Best,
Lutz

Randy Heiland

unread,
Nov 7, 2023, 10:10:44 AM11/7/23
to Morpheus users
Awesome - thank you! (and fwiw, I think you have a typo, "ragular", in the 2nd Population in the .xml).

Reply all
Reply to author
Forward
0 new messages