Open jessicasyu opened 3 weeks ago
@jessicasyu
The implementation of death age in v2 is somewhat awkward - it pulls from the its population's parameters to evaluate the CDF. It's personal death age is based on that same normal distribution of the average death age and death age standard deviation given as a user-facing parameter. Since it is evaluating the following: if age > deathAge
it then polls the CDF to get a probability. The issue here is that its essentially flipping a coin every minute that is increasing its probability to enter the apoptotic state, and that probability is based off a normal distribution that the cell has already been instantiated against, with binomial behavior (1 success over x minutes = apoptosis). For example, if we wanted to base it off of a normal distribution and the deathAge
was the average death age of 120960 min, and have ~15% chance of surviving one standard deviation (10080 min) past the average death age, the probability of death would need to be 0.0002. The original implementation would be at 0.5. I wanted to ask here before implementing a change as it would a functional divergence from reported behavior in v2 and would probably set a pattern going forward for anything strange we come across.
Proposal:
As the time based on the original implementation would be much shorter than the death_duration
parameter, remove this unnecessary complexity:
if (age > deathAge) { setState(APOTOSIS); }
@cainja The original intent was two separate things and I think it has become confusing because they are pulling from the same parameters:
I'm fine with changing the implementation as long as those two goals are configurable (i.e. I can set up a simulation where cells are initialized at different ages, and a simulation in which cells die "around" the death age).
@jessicasyu
This was not how it was implemented previously - the deathAge attribute of a cell is drawn from a normal distribution N(death_age, death_age_stdev) (assigned at initialization) that is separate from the uniform distribution that is used to initialize cells U[0, death_age]. These sources of stochasticity would remain as levers in the simulation. The check that would not remain in the simulation is the probability that an individual cell would enter apoptosis after reaching the death age. That 50% is what is being removed, as it is checked every time the simulation is stepped. It was functionally implemented as a truncated CDF which is evaluated every time it is stepped, hence the flipping a coin every minute, hence the original comment.
This change would maintain the goals.
ARCADE v3 currently does not implement the death age rules that were used in ARCADE v2. To match the previous implementation:
PatchCell
needs to check for death due to agePatchCellCancerStem
should set death age to max (or null)We should also revisit if we want additional features based on #15.