Skip to content

Add Flystem Cells - #220

Open
Jannetty wants to merge 43 commits into
mainfrom
feature/flystem-mergebranch
Open

Add Flystem Cells#220
Jannetty wants to merge 43 commits into
mainfrom
feature/flystem-mergebranch

Conversation

@Jannetty

@Jannetty Jannetty commented Apr 12, 2026

Copy link
Copy Markdown
Member

Estimated time to review: Large (sorry)

Summary of changes:
This code adds the fly neuroblast code into the codebase. The changes include:

  • Adding fly stem cell classes to the potts cell container convert method so convert can call the PottsCellFlyStem constructor when the stem cell classes are specified in the constructor.
  • Adding PottsCellFlyStem class (and test class)
  • Adding PottsCellFlyStemProliferation module which includes all plane of division logic, growth rate regulation logic, differentiation logic (and tests)
  • Made getUniqueIDs a public function for all implementations so that the PottsCellFlyStemProliferation module can use it to determine the identities of neighboring cells
  • Adding parameters needed for PottsCellFlyStem and PottsCellFlyStemProliferationModule

How to verify changes:

  • run tests
  • Here is a minimal neuroblast setup file which you can run on this branch:
<set prefix="2025-10-23-01">
    <series name="dd" start="1" end="1"
            ds=".3" margin="0" height="1" length="802" width="802"
            dt=".083" ticks="576" interval="4">
        <potts>
            <potts.term id="volume" />
            <potts.term id="adhesion" />
            <potts.term id="surface" />
        </potts>
        <agents>
            <populations>
                <population id="fly-stem-wt" class="fly-stem-wt" init="1" >
                    <population.link id="fly-gmc" weight="1"/>
                    <population.parameter id="proliferation/SIZE_TARGET" value="1.2" />
                    <population.parameter id="CRITICAL_VOLUME" value="52" units="um^3" conversion="DS^-3" />
                    <population.parameter id="proliferation/CELL_GROWTH_RATE" value="5" units="um^3/hour" conversion="DS^-3DT"/>
                    <population.parameter id="proliferation/BASAL_APOPTOSIS_RATE" value="0"/>
                    <population.parameter id="proliferation/DIV_ROTATION_DISTRIBUTION" value="NORMAL(MU=36,SIGMA=30)" />
                    <population.parameter id="proliferation/DIFFERENTIATION_RULESET" value="location" />
                    <population.parameter id="proliferation/DIFFERENTIATION_RULESET_EQUALITY_RANGE" value="10" />
                    <population.parameter id="proliferation/APICAL_AXIS_RULESET" value="uniform" />
                    <population.parameter id="proliferation/APICAL_AXIS_ROTATION_DISTRIBUTION" value="UNIFORM(MIN=0,MAX=360)" />
                    <population.parameter id= "proliferation/DYNAMIC_GROWTH_RATE_VOLUME" value="0" />
                    <population.parameter id= "proliferation/DYNAMIC_GROWTH_RATE_NB_CONTACT" value="0" />
                    <population.parameter id= "proliferation/VOLUME_BASED_CRITICAL_VOLUME" value="1" />
                </population>
                <population id="fly-gmc" class="fly-gmc" init="0">
                 <population.link id="fly-neuron" weight="1"/>
                 <population.parameter id="proliferation/BASAL_APOPTOSIS_RATE" value="0"/>
                 <population.parameter id="CRITICAL_VOLUME" value="11" units="um^3" conversion="DS^-3" />
                 <population.parameter id="proliferation/CELL_GROWTH_RATE" value="1.22" units="um^2/hour" conversion="DS^-2.DT"/>
                 <population.parameter id= "proliferation/DYNAMIC_GROWTH_RATE_VOLUME" value="0" />
                </population>
                <population id="fly-neuron" class="fly-neuron" init="0">
                <population.parameter id="proliferation/CELL_GROWTH_RATE" value="0"/>
                <population.parameter id="proliferation/BASAL_APOPTOSIS_RATE" value="0"/>
                <population.parameter id="CRITICAL_VOLUME" value="11" units="um^3" conversion="DS^-3" />
                </population>
            </populations>
        </agents>
    </series>
</set>

resolves #137
resolves #109
resolves #91
resolves #58
resolves #50

@Jannetty
Jannetty requested review from a team, allison-li-1016, cainja, daniellevahdat, jacob-evarts, jessicasyu, kristaphommatha and pohaoc2 and removed request for a team April 12, 2026 22:17
@Jannetty Jannetty self-assigned this Apr 12, 2026
@Jannetty Jannetty added category: agent Related to the agent subpackages size: large Estimated size of issue or PR is large labels Apr 12, 2026
@Jannetty
Jannetty marked this pull request as ready for review April 12, 2026 22:20
@Jannetty Jannetty mentioned this pull request Apr 12, 2026
Comment thread src/arcade/potts/agent/cell/PottsCellFlyStem.java Outdated
Jannetty added 22 commits July 20, 2026 06:41
…ty population now falls back to basal growth rate. Flattens nested frowth rate conditional into else-if chain.
…division axis is rotating, defaults to apical axis but can be previous division instead
…oliferationModule and reference it instead of cell-specific critical volume for growth regulation math
…ns with deterministic division always yield a NB and a GMC

@kristaphommatha kristaphommatha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look great so far! I looked over all the files except for the proliferation module and proliferation module tests, and had a couple of points of confusion for the files I did review!

I'll plan to come back and review the proliferation module and tests within the next couple of days! 🫡

import arcade.core.util.MiniBox;
import arcade.core.util.Parameters;
import arcade.potts.util.PottsEnums.Phase;
import arcade.potts.util.PottsEnums.Region;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see right below these lines there is the exact same import, except static. Why were these non-static imports added/ what is the difference between the static/non-static imports?

case "fly-stem-wt":
return new PottsCellFlyStem(this, location, parameters, links);
case "fly-stem-mudmut":
return new PottsCellFlyStem(this, location, parameters, links);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know that in the PottsCellFlyStem constructor, mudmut and wt cells have a different stemType code that differentiates them. This comment might be nitpicky, but without that context, this implementation could be confusing because it looks like both cases act the exact same way.

Is there a way to specify in the constructor call that you are creating a mudmut or wt cell?

PottsCellContainer container, Location location, Parameters parameters, GrabBag links) {
super(container, location, parameters, links);

if (module != null) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reasoning behind this check?

From the setStateModule method, I assume that the only module that isn't null is proliferation. I'm just curious about why is it important that the state is undefined instead of proliferative?

PottsCellContainer container =
new PottsCellContainer(
randomIntBetween(1, 10),
randomIntBetween(1, 10),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be really nitpicky and not even matter, but would there be any unexpected behavior if cellID and the parentID were the same?


int cellPop = randomIntBetween(1, 10);
MiniBox parameters = new MiniBox();
parameters.put("CLASS", "fly-stem-mudmut");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like because of the way the PottsCellFlyStem constructor is implemented, this test and the one above are virtually the same.

I'm not sure if you need both tests here if the class difference between fly-stem-wt and fly-stem-mudmut is tested already in the constructor_validWTStemType_createsInstance() and constructor_validMUDMUTStemType_createsInstance() tests under PottsCellFlyStemTest. I could be wrong though and would love to talk about this more

PottsCellContainer container =
cell.make(cellID, State.PROLIFERATIVE, random, cellPop, cellCriticalVolume);

assertAll(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would make on fly-stem-mudmut and fly-stem-wt cells create containers with the exact same parameters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: agent Related to the agent subpackages package: potts Related to the potts implementation priority: medium Non-urgent but important task size: large Estimated size of issue or PR is large type: feature Improvement or additions to the code base

Projects

None yet

2 participants