Closed aminGhorbel93 closed 11 months ago
Hi @aminGhorbel93! Thank you for trying out my package. It looks like I need to update this example. Could you check that you're using the most recent version of the package? Some small fixes:
CellSpace
to be periodic
and diagonal
.CellTable
has been renamed CellState
initialCellState = CellState(
[:Epithelial],
[200],
[2]
)
Or even this would work because we only have one cell type:
initialCellState = CellState(:Epithelial, 200, 2)
After these small fixes your code should look like this:
using CellularPotts
const xdim = 100
const ydim = 100
space = CellSpace(xdim, ydim, periodic=false)
initialCellState = CellState(:Epithelial, 200, 2)
positions = [
(10, 10),
(90, 90)
]
initialCellState = addcellproperty(initialCellState, :positions, positions)
species = [100exp(-((x-xdim/2)^2+(y-ydim/2)^2)/10000) for x in 1:xdim, y in 1:ydim];
penalties = [
AdhesionPenalty([30 30 30;
30 30 30;
30 30 30]),
VolumePenalty([30, 30]),
PerimeterPenalty([0, 5]),
MigrationPenalty(50, [100, 100], size(space)),
ChemoTaxisPenalty([50], species)
]
cpm = CellPotts(space, initialCellState, penalties)
ModelStep!(cpm)
Unfortunately there is a small bug in the ChemoTaxisPenalty
which I need to fix. I will try and update the package with the fix asap and the above code should run fine. I'll let you know when that happens.
Hi there,
Thank you for the swift response and the helpful code updates. I've implemented the changes you suggested, though they didn't directly resolve the issues I encountered. Your CellularPotts package has been immensely valuable in my simulations.
I eagerly await the upcoming fix for the ChemoTaxisPenalty bug. Your prompt assistance is greatly appreciated! :)
I've submitted the request to update the package in the Julia registry (v0.3.2). The new package version should be up soon with the fix you need.
I try to use this package for a chemotaxis simulation and got the following MWE
which errors with
Thank you for working on this!