API

CellularPotts.jl includes the following core functions.

Index

Full docs

CellularPotts.AdhesionPenaltyType
AdhesionPenalty(J::Matrix{Int})

A concrete type that penalizes neighboring grid locations from different cells.

Requires a symmetric matrix J where J[n,m] gives the adhesion penality for cells with types n and m. J is zero-indexed meaning J[0,1] and J[1,0] corresponds to the :Medium:Cell1 adhesion penalty.

Note: J is automatically transformed to be a zero-indexed offset array.

source
CellularPotts.CellPottsType
CellPotts(space, initialCellState, penalties)

A data container that holds information to run the cellular potts simulation.

Requires three inputs:

  • space – a region where cells can exist, generated using CellSpace().
  • initialCellState – a table where rows are cells and columns are cell properties, generated using CellTable().
  • penalties – a vector of penalties to append to the model.
source
CellularPotts.MigrationPenaltyType
MigrationPenalty(maxAct, λ, gridSize)

A concrete type that encourages cells to protude and drag themselves forward.

Two integer parameters control how cells protude:

  • maxAct: A maximum activity a grid location can have
  • λ: A parameter that controls the strength of this penalty

Increasing maxAct will cause grid locations to more likely protrude. Increasing λ will cause those protusions to reach farther away.

MigrationPenalty also requires a list of cell types to apply the penalty to and the grid size (Space.gridSize).

source
CellularPotts.PenaltyType
Penalty

An abstract type representing a constraint imposed onto the cellular potts model.

To add a new penalty, a new struct subtyping Penalty needs to be defined and the addPenalty!() function needs to be extended to include the new penalty.

Note: variables associated with a new penalty may need to be offset such that index 0 maps to :Medium, index 1 maps to :Cell1, etc.

source
CellularPotts.PerimeterPenaltyType
PerimeterPenalty(λᵥ::Vector{Int})

A concrete type that penalizes cells that deviate from their desired perimeter.

Requires a vector λₚ with n penalties where n is the number of cell types. λₚ is zero-indexed meaning λₚ[0] corresponds to the :Medium perimeter penalty (which is set to zero).

Note: λₚ is automatically transformed to be a zero-indexed offset array and does not require the perimeter penalty for :Medium.

source
CellularPotts.VolumePenaltyType
VolumePenalty(λᵥ::Vector{Int})

A concrete type that penalizes cells that deviate from their desired volume.

Requires a vector λᵥ with n penalties where n is the number of cell types. λᵥ is zero-indexed meaning λᵥ[0] corresponds to the :Medium volume penalty (which is set to zero).

Note: λᵥ is automatically transformed to be a zero-indexed offset array and does not require the volume penalty for :Medium.

source