-
Notifications
You must be signed in to change notification settings - Fork 4
Add Flystem Cells #220
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
Open
Jannetty
wants to merge
21
commits into
main
Choose a base branch
from
feature/flystem-mergebranch
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add Flystem Cells #220
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
7647685
update build and CI configuration
Jannetty 57817c1
add updateGrowthRate framework and make getUniqueIDs public
Jannetty 6392d9e
adding dostrings
Jannetty 488ab02
another docstring
Jannetty 4376f32
more formatting
Jannetty 731082f
final formatting
Jannetty 6cb465d
adding missing parameters to potts xml. Removing unnecessary parameter
Jannetty 64ce606
removing redundant section of docstring
Jannetty 2ce8a27
puppycrawler asking for some odd spacing
Jannetty 3e8bebc
puppycrawl now wants me to undo the odd spacing it asked for
Jannetty 9238f51
removing part of PR more relevant to neuroblasts
Jannetty 6ec7a8d
first portion of neuroblast files
Jannetty b559f06
Merge branch 'feature/build-ci-cleanup' into feature/flystem-mergebranch
Jannetty 19212bb
finish covering PottsModuleFlyStemProliferation with tests
Jannetty 6b7db55
adding tests
Jannetty d80b49f
importing PottsCell and Bag to GMC differentiation module instead of …
Jannetty 6d8a7f8
fixing PottsCellFlyStem line length issue
Jannetty 30126b1
addressing puppycrawler issues
Jannetty 510c8a9
more formatting
Jannetty 4c8b0d1
format
Jannetty 944fa1d
last formatting please
Jannetty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| distributionBase=GRADLE_USER_HOME | ||
| distributionPath=wrapper/dists | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip | ||
| distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip | ||
| zipStoreBase=GRADLE_USER_HOME | ||
| zipStorePath=wrapper/dists |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,179 @@ | ||
| 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.PottsModuleFlyStemProliferation; | ||
| import arcade.potts.util.PottsEnums.Phase; | ||
| import static arcade.potts.util.PottsEnums.State; | ||
|
|
||
| /** | ||
| * Implementation of {@link PottsCell} for fly stem agents. Genotype is specified by the StemType | ||
| * enum. | ||
| */ | ||
| public class PottsCellFlyStem extends PottsCell { | ||
| /** Enum outlining parameters for each cell type. */ | ||
| public enum StemType { | ||
| /** Wild type stem cell. */ | ||
| WT(50, 86, 0), | ||
|
|
||
| /** mud Mutant stem cell. */ | ||
| MUDMUT(50, 50, -90); | ||
|
|
||
| /** 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 NB division volume allocated to the GMC daughter cell. Derived from | ||
| * {@code splitOffsetPercentY} as {@code 1 - splitOffsetPercentY / 100} | ||
| */ | ||
| 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 | ||
| */ | ||
| StemType(int splitOffsetPercentX, int splitOffsetPercentY, double splitDirectionRotation) { | ||
| this.splitOffsetPercentX = splitOffsetPercentX; | ||
| this.splitOffsetPercentY = splitOffsetPercentY; | ||
| this.splitDirectionRotation = splitDirectionRotation; | ||
| this.daughterCellCriticalVolumeProportion = 1.0 - splitOffsetPercentY / 100.0; | ||
| } | ||
| } | ||
|
|
||
| /** The type of stem cell. */ | ||
| public final StemType stemType; | ||
|
|
||
| /** The cell's apical axis. The vector points towards the apical membrane. */ | ||
| private Vector apicalAxis; | ||
|
|
||
| /** | ||
| * 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); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * Sets the apical axis. | ||
| * | ||
| * @param apicalAxis the new apical axis | ||
| */ | ||
| public void setApicalAxis(Vector apicalAxis) { | ||
| 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."); | ||
| } | ||
|
|
||
| /** | ||
| * Makes a potts cell container with information about the daughter cell's population and | ||
| * critical volume calculated by the proliferation module. | ||
| * | ||
| * @param newID the new cell ID | ||
| * @param newState the new cell state | ||
| * @param random the random number generator | ||
| * @param newPop the new cell population | ||
| * @param daughterCellCriticalVolume the new cell's critical volume | ||
| * @return a {@link PottsCellContainer} with the information needed to make the daughter cell | ||
| */ | ||
| public PottsCellContainer make( | ||
| 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 PottsModuleFlyStemProliferation(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; | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make clear in documentation that these values are the named variables below