API
CellularPotts.jl includes the following core functions.
Index
CellularPotts.AdhesionPenaltyCellularPotts.CellPottsCellularPotts.MigrationPenaltyCellularPotts.PenaltyCellularPotts.PerimeterPenaltyCellularPotts.VolumePenaltyCellularPotts.countcellsCellularPotts.countcelltypes
Full docs
CellularPotts.AdhesionPenalty — TypeAdhesionPenalty(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.
CellularPotts.CellPotts — TypeCellPotts(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 usingCellSpace().initialCellState– a table where rows are cells and columns are cell properties, generated usingCellTable().penalties– a vector of penalties to append to the model.
CellularPotts.MigrationPenalty — TypeMigrationPenalty(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).
CellularPotts.Penalty — TypePenaltyAn 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.
CellularPotts.PerimeterPenalty — TypePerimeterPenalty(λᵥ::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.
CellularPotts.VolumePenalty — TypeVolumePenalty(λᵥ::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.
CellularPotts.countcells — Methodcountcells(cpm::CellPotts)
countcells(df::CellTable)Count the number of cells in the model
CellularPotts.countcelltypes — Methodcountcelltypes(cpm::CellPotts)
countcelltypes(df::CellTable)Count the number of cell types in the model