Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b55ae7c
adding swapVoxels function to PottsLocation
Jannetty Mar 31, 2025
7411ce9
wip code for classes
Jannetty Apr 2, 2025
8c2e046
wip tests and classes for neuroblasts
Jannetty Apr 2, 2025
34afe25
updating proliferation module and tests
Jannetty Apr 3, 2025
be6b1b5
formatting
Jannetty Apr 3, 2025
a105d2f
addressing more formatting issues
Jannetty Apr 3, 2025
78b8a6f
adding one *
Jannetty Apr 3, 2025
bba0152
Updated docstrings for getSmallerLocation and getBasalLocation
Apr 4, 2025
259ed5f
made sizeTarget a parameter and adjusted necessary tests
Jannetty Apr 7, 2025
4d3a175
added swapVoxels function to PottsLocation and test
Jannetty Apr 7, 2025
519c5aa
Merge branch 'feature/make-size-target-parameter' into feature/add-fl…
Jannetty Apr 7, 2025
40f95d9
removing unused imports (oops sorry yall)
Jannetty Apr 7, 2025
d8b7e89
made swapVoxels static
Jannetty Apr 7, 2025
f247876
fixed function so it actually works
Jannetty Apr 7, 2025
ed8d999
Merge branch 'feature/add-swapVoxel-function' into feature/add-flystem
Jannetty Apr 7, 2025
173a69c
made swap_voxels actually work
Jannetty Apr 7, 2025
6c334e6
changed proliferation module to use static swap voxels
Jannetty Apr 8, 2025
62df80d
wip, added ability to make range of values considered equal fo locati…
Jannetty Apr 14, 2025
a2cf1e1
Merge branch 'main' into feature/add-flystem
Jannetty Apr 14, 2025
0dcbfe6
added ability to set range of values that are considered equal for di…
Jannetty Apr 16, 2025
ad457a3
spotlessApply
Jannetty Apr 16, 2025
46d8878
proliferation module refactor. Still need to fix tests
Jannetty May 5, 2025
bf876e4
wip adding apical axis determination parameters
Jannetty May 28, 2025
230a7a7
finishing adding tests and functionality for fly stem cells
Jannetty Jun 2, 2025
341c7f0
changing daughterStem function to determine if centroids are within r…
Jannetty Jun 21, 2025
cf6f89f
added ability to make growth rate proportional to critical volume via…
Jannetty Jun 30, 2025
fda51c1
added functionality to allow critical volume to be a function of cell…
Jannetty Jul 1, 2025
85dbb47
formatting fix
Jannetty Jul 1, 2025
59000ed
changed volume equation to not include sizeTarget
Jannetty Jul 2, 2025
34e7065
WIP added some print statements
Jannetty Jul 2, 2025
f440fa2
WIP making flystem proliferation module state undefined
Jannetty Oct 7, 2025
21bc964
wip testing fly proliferation modules
Jannetty Oct 16, 2025
f157ba2
changing flystemcells to always have undefined module states
Jannetty Oct 16, 2025
5257c5a
Merge branch 'main' into feature/add-flystem
Jannetty Oct 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/arcade/core/util/Vector.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public Vector(Double3D vector) {
* @return the x component
*/
public double getX() {
return vector.x;
return vector.getX();
}

/**
Expand All @@ -42,7 +42,7 @@ public double getX() {
* @return the y component
*/
public double getY() {
return vector.y;
return vector.getY();
}

/**
Expand All @@ -51,7 +51,7 @@ public double getY() {
* @return the z component
*/
public double getZ() {
return vector.z;
return vector.getZ();
}

/**
Expand Down
6 changes: 5 additions & 1 deletion src/arcade/potts/agent/cell/PottsCell.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
private final EnumMap<Region, Double> targetRegionSurfaces;

/** Critical volume for cell [voxels]. */
final double criticalVolume;
double criticalVolume;

/** Critical volumes for cell by region [voxels]. */
final EnumMap<Region, Double> criticalRegionVolumes;
Expand Down Expand Up @@ -295,6 +295,10 @@
return criticalVolume;
}

public void setCriticalVolume(double newCriticaVolume) {

Check failure on line 298 in src/arcade/potts/agent/cell/PottsCell.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCell.java#L298 <com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck>

Class 'PottsCell' looks like designed for extension (can be subclassed), but the method 'setCriticalVolume' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'PottsCell' final or making the method 'setCriticalVolume' static/final/abstract/empty, or adding allowed annotation for the method.
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCell.java:298:5: error: Class 'PottsCell' looks like designed for extension (can be subclassed), but the method 'setCriticalVolume' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'PottsCell' final or making the method 'setCriticalVolume' static/final/abstract/empty, or adding allowed annotation for the method. (com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck)

Check failure on line 298 in src/arcade/potts/agent/cell/PottsCell.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCell.java#L298 <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck>

Missing a Javadoc comment.
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCell.java:298:5: error: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck)
criticalVolume = newCriticaVolume;
}

/**
* Gets the critical volume for a region.
*
Expand Down
4 changes: 4 additions & 0 deletions src/arcade/potts/agent/cell/PottsCellContainer.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ public Cell convert(
return new PottsCellFlyNeuron(this, location, parameters, links);
case "fly-gmc":
return new PottsCellFlyGMC(this, location, parameters, links);
case "fly-stem-wt":
return new PottsCellFlyStem(this, location, parameters, links);
case "fly-stem-mudmut":
return new PottsCellFlyStem(this, location, parameters, links);
default:
case "stem":
return new PottsCellStem(this, location, parameters, links);
Expand Down
165 changes: 165 additions & 0 deletions src/arcade/potts/agent/cell/PottsCellFlyStem.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
package arcade.potts.agent.cell;

import ec.util.MersenneTwisterFast;
import arcade.core.agent.cell.CellState;
import arcade.core.env.location.Location;
import arcade.core.util.GrabBag;
import arcade.core.util.Parameters;
import arcade.core.util.Vector;
import arcade.potts.agent.module.PottsModule;
import arcade.potts.agent.module.PottsModuleProliferationFlyStem;
import arcade.potts.util.PottsEnums.Phase;
import arcade.potts.util.PottsEnums.State;

/** Extension of {@link PottsCell} for fly stem cells. */
public class PottsCellFlyStem extends PottsCell {

/** Enum outlining parameters for each cell type. */
public enum StemType {
/** Wild type stem cell. */
WT(50, 75, 0, 0.25),

/** mud Mutant stem cell. */
MUDMUT(50, 50, -90, 0.5);

/** Percentage x offset from cell edge where division will occur. */
public final int splitOffsetPercentX;

/** Percentage y offset from cell edge where division will occur. */
public final int splitOffsetPercentY;

/** Default direction of division is rotated this much off the apical vector. */
public final double splitDirectionRotation;

/**
* The proportion of the stem cell's critical volume that will be the daughter cell's
* critical volume.
*/
public final double daughterCellCriticalVolumeProportion;

/**
* Constructor for StemType.
*
* @param splitOffsetPercentX percentage x offset from cell edge where division will occur
* @param splitOffsetPercentY percentage y offset from cell edge where division will occur
* @param splitDirectionRotation the plane of division's rotation off the apical vector
* @param daughterCellCriticalVolumeProportion proportion of the stem cell's critical volume
* that will be the daughter cell's critical volume
*/
StemType(
int splitOffsetPercentX,
int splitOffsetPercentY,
double splitDirectionRotation,
double daughterCellCriticalVolumeProportion) {
this.splitOffsetPercentX = splitOffsetPercentX;
this.splitOffsetPercentY = splitOffsetPercentY;
this.splitDirectionRotation = splitDirectionRotation;
this.daughterCellCriticalVolumeProportion = daughterCellCriticalVolumeProportion;
}
}

/** The type of stem cell. */
public final StemType stemType;

private Vector apicalAxis;

Check failure on line 64 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L64 <com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck>

Missing a Javadoc comment.
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:64:5: error: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocVariableCheck)

/**
* Constructor for PottsCellFlyStem.
*
* @param container the container for the cell
* @param location the location of the cell
* @param parameters the parameters for the cell
* @param links the links for the cell
* @throws IllegalArgumentException if the stem type is not recognized
*/
public PottsCellFlyStem(
PottsCellContainer container, Location location, Parameters parameters, GrabBag links) {
super(container, location, parameters, links);

if (module != null) {
((PottsModule) module).setPhase(Phase.UNDEFINED);
}

String stemTypeString = parameters.getString("CLASS");
switch (stemTypeString) {
case "fly-stem-wt":
stemType = StemType.WT;
break;
case "fly-stem-mudmut":
stemType = StemType.MUDMUT;
break;
default:
throw new IllegalArgumentException("Unknown StemType: " + stemTypeString);
}
}

public void setApicalAxis(Vector apicalAxis) {

Check failure on line 96 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L96 <com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck>

Class 'PottsCellFlyStem' looks like designed for extension (can be subclassed), but the method 'setApicalAxis' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'PottsCellFlyStem' final or making the method 'setApicalAxis' static/final/abstract/empty, or adding allowed annotation for the method.
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:96:5: error: Class 'PottsCellFlyStem' looks like designed for extension (can be subclassed), but the method 'setApicalAxis' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'PottsCellFlyStem' final or making the method 'setApicalAxis' static/final/abstract/empty, or adding allowed annotation for the method. (com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck)

Check failure on line 96 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L96 <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck>

Missing a Javadoc comment.
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:96:5: error: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck)
this.apicalAxis = apicalAxis;
}

/**
* Gets the apical axis of the cell. If no apical axis is set, it returns a vector along the y
* axis as a default vector
*
* @return the apical axis of the cell
*/
public Vector getApicalAxis() {
if (apicalAxis != null) {
return apicalAxis;
} else {
return new Vector(0, 1, 0);
}
}

@Override
public PottsCellContainer make(int newID, CellState newState, MersenneTwisterFast random) {
throw new UnsupportedOperationException(
"make(int, CellState, MersenneTwisterFast) not supported. Please use make(int, CellState, MersenneTwisterFast, int, double) instead.");

Check failure on line 117 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L117 <LineLength>

Line is longer than 100 characters (found 151).
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:117:0: error: Line is longer than 100 characters (found 151). (LineLength)

Check failure on line 117 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L117 <LineLengthTest>

Line is longer than 120 characters (found 151).
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:117:0: error: Line is longer than 120 characters (found 151). (LineLengthTest)
}

public PottsCellContainer make(

Check failure on line 120 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L120 <com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck>

Class 'PottsCellFlyStem' looks like designed for extension (can be subclassed), but the method 'make' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'PottsCellFlyStem' final or making the method 'make' static/final/abstract/empty, or adding allowed annotation for the method.
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:120:5: error: Class 'PottsCellFlyStem' looks like designed for extension (can be subclassed), but the method 'make' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'PottsCellFlyStem' final or making the method 'make' static/final/abstract/empty, or adding allowed annotation for the method. (com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck)

Check failure on line 120 in src/arcade/potts/agent/cell/PottsCellFlyStem.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/cell/PottsCellFlyStem.java#L120 <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck>

Missing a Javadoc comment.
Raw output
/github/workspace/./src/arcade/potts/agent/cell/PottsCellFlyStem.java:120:5: error: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck)
int newID,
CellState newState,
MersenneTwisterFast random,
int newPop,
double daughterCellCriticalVolume) {

divisions++;

return new PottsCellContainer(
newID,
id,
newPop,
age,
divisions,
newState,
Phase.UNDEFINED,
0,
null,
daughterCellCriticalVolume,
criticalHeight,
criticalRegionVolumes,
criticalRegionHeights);
}

@Override
void setStateModule(CellState newState) {
switch ((State) newState) {
case PROLIFERATIVE:
module = new PottsModuleProliferationFlyStem(this);
break;
default:
module = null;
break;
}
}

/**
* Gets the stem type of the cell.
*
* @return the stem type of the cell
*/
public final StemType getStemType() {
return stemType;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import arcade.potts.env.location.PottsLocation2D;
import arcade.potts.sim.Potts;
import arcade.potts.sim.PottsSimulation;
import arcade.potts.util.PottsEnums.Phase;
import arcade.potts.util.PottsEnums.State;

/**
Expand All @@ -20,6 +21,27 @@
*/
public class PottsModuleFlyGMCDifferentiation extends PottsModuleProliferationSimple {

void stepVolOnly(MersenneTwisterFast random, Simulation sim) {

Check failure on line 24 in src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java#L24 <com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck>

Class 'PottsModuleFlyGMCDifferentiation' looks like designed for extension (can be subclassed), but the method 'stepVolOnly' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'PottsModuleFlyGMCDifferentiation' final or making the method 'stepVolOnly' static/final/abstract/empty, or adding allowed annotation for the method.
Raw output
/github/workspace/./src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java:24:5: error: Class 'PottsModuleFlyGMCDifferentiation' looks like designed for extension (can be subclassed), but the method 'stepVolOnly' does not have javadoc that explains how to do that safely. If class is not designed for extension consider making the class 'PottsModuleFlyGMCDifferentiation' final or making the method 'stepVolOnly' static/final/abstract/empty, or adding allowed annotation for the method. (com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck)

Check failure on line 24 in src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java#L24 <com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck>

Missing a Javadoc comment.
Raw output
/github/workspace/./src/arcade/potts/agent/module/PottsModuleFlyGMCDifferentiation.java:24:5: error: Missing a Javadoc comment. (com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck)
// Increase size of cell.
cell.updateTarget(cellGrowthRate, sizeTarget);
boolean sizeCheck = cell.getVolume() >= sizeTarget * cell.getCriticalVolume();
if (sizeCheck) {
addCell(random, sim);
setPhase(Phase.UNDEFINED);
}
}

@Override
public void step(MersenneTwisterFast random, Simulation sim) {
switch (phase) {
case UNDEFINED:
stepVolOnly(random, sim);
break;
default:
break;
}
}

/**
* Creates a fly GMC proliferation module.
*
Expand Down Expand Up @@ -65,7 +87,7 @@
newPop,
oldCell.getAge(),
oldCell.getDivisions(),
State.QUIESCENT,
State.UNDEFINED,
null,
0,
null,
Expand Down
Loading
Loading