Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cell definitions share fixed_duration boolean for apoptosis death model #199

Open
drbergman opened this issue Aug 4, 2023 · 5 comments
Open

Comments

@drbergman
Copy link
Contributor

To see this, make the template project and place the attached xml into the config folder. Run the simulation. Output should roughly match the attached video.

Expected behavior: All cells immediately begin apoptosis (apoptosis death rate is set to 100). random_duration cells have a variable time until they are removed. fixed_duration cells all disappear at 2 hours. Both cells have the phase duration set to 2 hours.

Observed behavior: All cells are removed at 2 hours, including the random_duration cells.

Possible cause: PhysiCell_cell.cpp reads in the cell definitions, overwriting the fixed duration field of the apoptosis CycleModel with each one. Unclear how only this field seems to be overwritten and not the apoptosis rates.

Archive.zip

@drbergman
Copy link
Contributor Author

If you flip the ordering of the cell definitions within the xml, then the reverse happens: all cells undergo random time to finish apoptosis.

@rheiland
Copy link
Collaborator

rheiland commented Aug 7, 2023

The .xml config file you provided is malformed and will cause PhysiCell to output warnings which may confuse the debugging process. It has nothing to do with the actual issue though. Specifically, the .xml specifies a non-existent "default" cell type in various blocks, e.g., <cell_interactions>. I think the attached .xml is correct. Still looking at the issue...
fixed.zip

@drbergman
Copy link
Contributor Author

drbergman commented Aug 7, 2023 via email

@rheiland
Copy link
Collaborator

Spent several hours looking into this. Just want to make some brief comments here for now. May need to get Paul's input for a well thought out solution, but welcome input from others. This issue involves both the apoptosis and necrosis death models. And so far, I've only tested the case where <phase_durations> are provided for those models (not phase_transition_rates). When there is more than one cell_definition defined, each one will have its apoptosis and necrosis:

  • fixed_duration attribute (boolean) value to be that of the last cell_definition
  • <duration> value to be that of the last cell_definition

The reason for this is due to fact that, for each pointer pCD to a new cell_definition, pCD->phenotype.death.models[death_index] points to the same address. Similarly for the reference address &(pCD->phenotype.death.models[death_index]->phase_links[start][0].fixed_duration). Therefore, as we parse the .xml and generate values in data structures for the apoptosis and necrosis death models, these values are overwritten with each new cell_definition.

@MathCancer
Copy link
Owner

we shoudl migrate teh "fixed duration" booleans from the graph strucure to the param strucxture fore each cycle model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants