Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 2 additions & 3 deletions src/arcade/patch/agent/action/PatchActionTreat.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ public void step(SimState simstate) {
}

maxConfluency = population.getInt("MAX_DENSITY");
maxConfluency = (maxConfluency >= 0 ? maxConfluency : Integer.MAX_VALUE);

int pop = population.getInt("CODE");

Expand Down Expand Up @@ -360,9 +361,7 @@ protected boolean checkLocationSpace(Location loc, PatchGrid grid) {
for (Object cellObj : bag) {
PatchCell cell = (PatchCell) cellObj;
if (cell instanceof PatchCellCART) {
totalVol =
PatchCell.calculateTotalVolume(bag)
+ parameters.getDouble("T_CELL_VOL_AVG");
totalVol = PatchCell.calculateTotalVolume(bag) + cell.getVolume();
currentHeight = totalVol / locArea;
}
if (cell instanceof PatchCellTissue) {
Expand Down
19 changes: 14 additions & 5 deletions src/arcade/patch/agent/cell/PatchCellCART.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@
protected boolean activated;

/** number of current PDL-1 receptors on CART cell. */
protected int selfReceptors;
public int selfReceptors;

Check failure on line 59 in src/arcade/patch/agent/cell/PatchCellCART.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/cell/PatchCellCART.java#L59 <com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck>

Variable 'selfReceptors' must be private and have accessor methods.
Raw output
/github/workspace/./src/arcade/patch/agent/cell/PatchCellCART.java:59:16: error: Variable 'selfReceptors' must be private and have accessor methods. (com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck)

/** initial number of PDL-1 receptors on CART cell. */
protected int selfReceptorsStart;

/** number of bound CAR antigens. */
protected int boundCARAntigensCount;
public int boundCARAntigensCount;

Check failure on line 65 in src/arcade/patch/agent/cell/PatchCellCART.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/cell/PatchCellCART.java#L65 <com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck>

Variable 'boundCARAntigensCount' must be private and have accessor methods.
Raw output
/github/workspace/./src/arcade/patch/agent/cell/PatchCellCART.java:65:16: error: Variable 'boundCARAntigensCount' must be private and have accessor methods. (com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck)

/** number of bound PDL-1 antigens. */
protected int boundSelfAntigensCount;
public int boundSelfAntigensCount;

Check failure on line 68 in src/arcade/patch/agent/cell/PatchCellCART.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/cell/PatchCellCART.java#L68 <com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck>

Variable 'boundSelfAntigensCount' must be private and have accessor methods.
Raw output
/github/workspace/./src/arcade/patch/agent/cell/PatchCellCART.java:68:16: error: Variable 'boundSelfAntigensCount' must be private and have accessor methods. (com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck)

/** number of neighbors that T cell is able to search through. */
protected final double searchAbility;
Expand Down Expand Up @@ -160,8 +160,8 @@
// initialized non-loaded parameters
boundCARAntigensCount = 0;
boundSelfAntigensCount = 0;
lastActiveTicker = 0;
activated = true;
// lastActiveTicker = 0;
activated = false;
boundTarget = null;

// Set loaded parameters.
Expand Down Expand Up @@ -259,6 +259,15 @@
return this.activated;
}

/**
* Sets the cell activation status.
*
* @param activated the activation status to set
*/
public void setActivationStatus(boolean activated) {

Check failure on line 267 in src/arcade/patch/agent/cell/PatchCellCART.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/cell/PatchCellCART.java#L267 <com.puppycrawl.tools.checkstyle.checks.coding.HiddenFieldCheck>

'activated' hides a field.
Raw output
/github/workspace/./src/arcade/patch/agent/cell/PatchCellCART.java:267:45: error: 'activated' hides a field. (com.puppycrawl.tools.checkstyle.checks.coding.HiddenFieldCheck)
this.activated = activated;
}

/**
* Adds only tissue cells to the provided bag.
*
Expand Down
5 changes: 4 additions & 1 deletion src/arcade/patch/agent/cell/PatchCellFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ public PatchCellContainer createCellForPopulation(int id, int pop) {
MiniBox population = popToParameters.get(pop);
Parameters parameters = new Parameters(population, null, random);

double compression = parameters.getDouble("COMPRESSION_TOLERANCE");
double compression =
parameters.getDouble("COMPRESSION_TOLERANCE") >= 0
? parameters.getDouble("COMPRESSION_TOLERANCE")
: Double.MAX_VALUE;

double volume = parameters.getDouble("CELL_VOLUME");
double height = parameters.getDouble("CELL_HEIGHT");
Expand Down
24 changes: 14 additions & 10 deletions src/arcade/patch/agent/module/PatchModuleApoptosis.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import arcade.core.sim.Simulation;
import arcade.core.util.Parameters;
import arcade.patch.agent.cell.PatchCell;
import arcade.patch.agent.cell.PatchCellCART;
import arcade.patch.env.grid.PatchGrid;
import static arcade.patch.util.PatchEnums.State;

Expand Down Expand Up @@ -47,17 +48,20 @@ public PatchModuleApoptosis(PatchCell cell) {
@Override
public void step(MersenneTwisterFast random, Simulation sim) {
if (ticker > deathDuration) {
// Induce one neighboring quiescent cell to proliferate.
ArrayList<Location> neighborhood = location.getNeighbors();
neighborhood.add(location);
Bag bag = ((PatchGrid) sim.getGrid()).getObjectsAtLocations(neighborhood);
// CART cells do not induce neighboring tissue cells to proliferate.
if (!(cell instanceof PatchCellCART)) {
// Induce one neighboring quiescent cell to proliferate.
ArrayList<Location> neighborhood = location.getNeighbors();
neighborhood.add(location);
Bag bag = ((PatchGrid) sim.getGrid()).getObjectsAtLocations(neighborhood);

bag.shuffle(random);
for (Object obj : bag) {
Cell neighbor = (Cell) obj;
if (neighbor.getState() == State.QUIESCENT) {
neighbor.setState(State.PROLIFERATIVE);
break;
bag.shuffle(random);
for (Object obj : bag) {
Cell neighbor = (Cell) obj;
if (neighbor.getState() == State.QUIESCENT) {
neighbor.setState(State.PROLIFERATIVE);
break;
}
}
}

Expand Down
14 changes: 13 additions & 1 deletion src/arcade/patch/agent/module/PatchModuleProliferation.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
duration = 0;
// Load parameters.
Parameters parameters = cell.getParameters();
synthesisDuration = parameters.getInt("proliferation/SYNTHESIS_DURATION");
synthesisDuration = parameters.getInt("SYNTHESIS_DURATION");
}

@Override
Expand Down Expand Up @@ -106,6 +106,18 @@
newLocation,
random,
newParameters);

if (cell instanceof PatchCellCART) {
((PatchCellCART) newCell)
.setActivationStatus(((PatchCellCART) cell).getActivationStatus());
((PatchCellCART) newCell).boundSelfAntigensCount =
((PatchCellCART) cell).boundSelfAntigensCount;
((PatchCellCART) newCell).selfReceptors =
((PatchCellCART) cell).selfReceptors;
((PatchCellCART) newCell).boundCARAntigensCount =
((PatchCellCART) cell).boundCARAntigensCount;
}

sim.getGrid().addObject(newCell, newLocation);
newCell.schedule(sim.getSchedule());

Expand All @@ -125,7 +137,7 @@
PatchProcess process = (PatchProcess) newCell.getProcess(domain);
process.update(cell.getProcess(domain));
}
// TODO: Update environment generator sites.

Check failure on line 140 in src/arcade/patch/agent/module/PatchModuleProliferation.java

View workflow job for this annotation

GitHub Actions / checkstyle

[checkstyle] src/arcade/patch/agent/module/PatchModuleProliferation.java#L140 <com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck>

Comment matches to-do format 'TODO:'.
Raw output
/github/workspace/./src/arcade/patch/agent/module/PatchModuleProliferation.java:140:23: error: Comment matches to-do format 'TODO:'. (com.puppycrawl.tools.checkstyle.checks.TodoCommentCheck)
} else {
ticker++;
}
Expand Down
4 changes: 2 additions & 2 deletions src/arcade/patch/parameter.patch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<population id="MAX_DENSITY" value="-1" description="maximum amount of cells in location, -1 means no limit" />
<population id="ACCURACY" value="0.8" description="accuracy to select highest glucose concentration in future location" />
<population id="AFFINITY" value="0.5" description="movement toward center affinity when selecting future location" />
<population id="SYNTHESIS_DURATION" value="637" units="min" description="time required for DNA synthesis" />


<!-- CAR T specific parameters -->
<population id="ANERGIC_FRACTION" value="0.5" description="fraction of anergic cells that become apoptotic" />
Expand All @@ -44,8 +46,6 @@
<population id="CONTACT_FRAC" value="0.2" description="fraction of cell surface contacting a bound cell during a binding event" />
<population id="BOUND_TIME" value="360" description="6 hours" />

<!-- proliferation module parameters -->
<population.module module="proliferation" id="SYNTHESIS_DURATION" value="637" units="min" description="time required for DNA synthesis" />

<!-- migration module parameters -->
<population.module module="migration" id="MIGRATION_RATE" value="0.24" unit="um/min" description="cell migration rate" />
Expand Down
2 changes: 1 addition & 1 deletion test/arcade/patch/agent/cell/PatchCellTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public void setState_proliferation_createsCell() {
Schedule scheduleMock = mock(Schedule.class);
doReturn(0.0).when(parametersMock).getDouble(any(String.class));
doReturn(0).when(parametersMock).getInt(any(String.class));
doReturn(1).when(parametersMock).getInt("proliferation/SYNTHESIS_DURATION");
doReturn(1).when(parametersMock).getInt("SYNTHESIS_DURATION");
doReturn(cellID + 1).when(simMock).getID();
doReturn(scheduleMock).when(simMock).getSchedule();
doReturn(null).when(scheduleMock).scheduleRepeating(anyInt(), anyInt(), any());
Expand Down
Loading