Skip to content

Commit

Permalink
Final Orchestrator Release (#31)
Browse files Browse the repository at this point in the history
* Final recalibration

* Log more info to stdout, useful for working out suspiciously short runtimes

* BugFix: Cellularity array order was different to that used by the orchestrator

* BugFix: Incorrect value copy paste error in Primage output

* Total cell count is now conserved between successive loops and SC migration

* Add 'cell_count' to input and output files.

* If all cells die, volume ratio updated is now reported as -1.0, allowing the orchestrator to detect and rewrite to median or similar

* Add support for a calibration file referenced by the input file, to allow recalibration without recompiling the model

* Set model to only build with final supported version of FLAMEGPU (pre-reference change).

* Add default calibration file and update example input file to include new members.

---------

Co-authored-by: Robert Chisholm <[email protected]>
Co-authored-by: Kenneth Y. Wertheim <[email protected]>
  • Loading branch information
3 people authored May 1, 2023
1 parent 30e2665 commit 9b6b501
Show file tree
Hide file tree
Showing 18 changed files with 559 additions and 23 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ option(VISUALISATION "Enable visualisation support" OFF)

# Optionaly set the version of flamegpu which should be used.
# Use a branch name such as `master`, or a tagged version such as `v2.0.0-alpha`
set(FLAMEGPU_VERSION "master" CACHE STRING "Git branch or tag to use")
set(FLAMEGPU_VERSION "797d09a00f591e88e67f34647f662f180c97c4c5" CACHE STRING "Git branch or tag to use")

# Our core dependency is FLAMEGPU2 lib, first lets find it
include(${CMAKE_CURRENT_LIST_DIR}/cmake/flamegpu2.cmake)
Expand Down Expand Up @@ -60,6 +60,7 @@ SET(ORCHESTRATOR_SRC
${CMAKE_CURRENT_SOURCE_DIR}/orchestrator_src/main.cu
${CMAKE_CURRENT_SOURCE_DIR}/orchestrator_src/json.h
${CMAKE_CURRENT_SOURCE_DIR}/orchestrator_src/json_in.cpp
${CMAKE_CURRENT_SOURCE_DIR}/orchestrator_src/json_in2.cpp
${CMAKE_CURRENT_SOURCE_DIR}/orchestrator_src/json_out.cpp
)
add_flamegpu_executable(${PROJECT_NAME} "${ORCHESTRATOR_SRC}" "${FLAMEGPU_ROOT}" "${PROJECT_BINARY_DIR}" TRUE)
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# PRIMAGE USFD Agent Based Neuroblastoma model

This (branch of the) repository holds the final version of the USFD agent based neuroblastoma model used as part of the multi-scale model during the Primage project.

The below details in the README correspond to building and running the model on the PLGrid clusters Prometheus & Ares, they can be used as an example for using the model on other systems.

## Prerequisites

The dependencies below are required for building the project, it's advised to that you use the newest version of any dependencies.
Expand Down Expand Up @@ -27,14 +31,13 @@ The build scripts will create `build_output.out` and `build_error.err`, containi

On success, you should find the USFD orchestrator model exists at `build/bin/Release/orchestrator_FGPUNB`.

*Note: Currently this branch is not pinned to a particular release of FLAMEGPU2, instead it follows origin/master, rebuilds may therefore update FLAMEGPU2.*

## Running

This branch of the repository contains test run scripts setup for PLGrid's Prometheus & Ares clusters. These simply pass an input file to the model, to ensure it executes to completion and outputs a correctly formatted output file (no validation of the contents of the output file is carried out).
These jobs can be submitted from the root of the repository using `sbatch scripts/test_run_on_prometheus.sh` or `sbatch scripts/test_run_on_ares.sh`.



*Note: Prometheus has multiple partitions with GPUs `plgrid-gpu` and `plgrid-gpu-v100`. The prior has K80 GPUs, these are older, hence less demand in the job queue but will execute the model more slowly than the latter which has V100s.*


Expand Down
2 changes: 1 addition & 1 deletion cmake/flamegpu2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ FetchContent_Declare(
flamegpu2
GIT_REPOSITORY ${FLAMEGPU_REPOSITORY}
GIT_TAG ${FLAMEGPU_VERSION}
GIT_SHALLOW 1
GIT_SHALLOW 0
GIT_PROGRESS ON
# UPDATE_DISCONNECTED ON
)
Expand Down
25 changes: 25 additions & 0 deletions inputs/calibration_file_defaults.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"MYCN_fn11": 0.331407994,
"MAPK_RAS_fn11": 0.985655010,
"MAPK_RAS_fn01": 0.869527996,
"p53_fn": 0.277200997,
"p73_fn": 0.974862993,
"HIF_fn": 0.606737018,
"P_cycle_nb": 0.0456999987,
"P_cycle_sc": 0.0324999988,
"P_DNA_damageHypo": 0.772947669,
"P_DNA_damagerp": 0.771497011,
"P_unrepDNAHypo": 0.434578806,
"P_unrepDNArp": 0.890953064,
"P_necroIS": 0.576758385,
"P_telorp": 0.0889538229,
"P_apopChemo": 0.321999997,
"P_DNA_damage_pathways": 0.128000006,
"P_apoprp": 0.0299999993,
"P_necrorp": 0.989708543,
"scpro_jux": 0.00374000007,
"nbdiff_jux": 0.000521000009,
"nbdiff_amount": 0.00999999978,
"nbapop_jux": 0.0304000005,
"mig_sc": 1.0
}
8 changes: 5 additions & 3 deletions inputs/in-2022-03-29.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"version": [
0,
13,
5,
9,
4,
false
],
"config": {
Expand All @@ -21,6 +21,7 @@
0.0,
0.0
],
"cell_count": 10000,
"orchestrator_time": 330,
"MYCN_amp": 0,
"ALT": 1,
Expand Down Expand Up @@ -54,7 +55,8 @@
],
"end_effects": [
500
]
],
"calibration_file": ""
}
}
}
60 changes: 60 additions & 0 deletions inputs/input-12189.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"version": [
0,
13,
5,
false
],
"config": {
"seed": 159874,
"steps": 336,
"environment": {
"TERT_rarngm": 0,
"ATRX_inact": 1,
"V_tumour": 56.6454,
"O2": 0.196332,
"cellularity": [
0.801527,
0.0,
0.0,
0.0,
0.0,
0.0
],
"orchestrator_time": 0,
"MYCN_amp": 0,
"ALT": 1,
"ALK": 0,
"gradiff": 2,
"histology_init": 1,
"nb_telomere_length_mean": 0.689640367292204,
"nb_telomere_length_sd": 0.5668899997459869,
"sc_telomere_length_mean": 0.13732375975054112,
"sc_telomere_length_sd": 0.6576777896565319,
"extent_of_differentiation_mean": 0.6487574240246723,
"extent_of_differentiation_sd": 0.3838661929325988,
"nb_necro_signal_mean": 0.06979167333320091,
"nb_necro_signal_sd": 0.7408911462060256,
"nb_apop_signal_mean": 0.8676175678984845,
"nb_apop_signal_sd": 0.36152898092366537,
"sc_necro_signal_mean": 0.31127050615003315,
"sc_necro_signal_sd": 0.4759879354607127,
"sc_apop_signal_mean": 0.692646213345152,
"sc_apop_signal_sd": 0.8873088104156299,
"drug_effects": [
1.0,
1.0,
0.0,
1.0,
1.0,
0.0
],
"start_effects": [
0
],
"end_effects": [
144
]
}
}
}
60 changes: 60 additions & 0 deletions inputs/input-29345.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"version": [
0,
13,
5,
false
],
"config": {
"seed": 159874,
"steps": 336,
"environment": {
"TERT_rarngm": 0,
"ATRX_inact": 1,
"V_tumour": 47.2763,
"O2": 0.101143,
"cellularity": [
0.520755,
0.0,
0.0,
0.0,
0.0,
0.0
],
"orchestrator_time": 0,
"MYCN_amp": 0,
"ALT": 1,
"ALK": 0,
"gradiff": 2,
"histology_init": 1,
"nb_telomere_length_mean": 0.9021318968637942,
"nb_telomere_length_sd": 0.17775158207569786,
"sc_telomere_length_mean": 0.6158719797064297,
"sc_telomere_length_sd": 0.6507731073172595,
"extent_of_differentiation_mean": 0.33207845241342926,
"extent_of_differentiation_sd": 0.8373088867985428,
"nb_necro_signal_mean": 0.993494931515239,
"nb_necro_signal_sd": 0.3311372635053851,
"nb_apop_signal_mean": 0.7046652382721265,
"nb_apop_signal_sd": 0.28933099187390277,
"sc_necro_signal_mean": 0.5273791283879947,
"sc_necro_signal_sd": 0.6110109436337471,
"sc_apop_signal_mean": 0.5423604545624877,
"sc_apop_signal_sd": 0.4031060795348913,
"drug_effects": [
1.0,
1.0,
0.0,
1.0,
1.0,
0.0
],
"start_effects": [
0
],
"end_effects": [
144
]
}
}
}
60 changes: 60 additions & 0 deletions inputs/input-33153.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"version": [
0,
13,
5,
false
],
"config": {
"seed": 159874,
"steps": 336,
"environment": {
"TERT_rarngm": 0,
"ATRX_inact": 1,
"V_tumour": 49.4454,
"O2": 0.050647,
"cellularity": [
0.679245,
0.0,
0.0,
0.0,
0.0,
0.0
],
"orchestrator_time": 0,
"MYCN_amp": 0,
"ALT": 1,
"ALK": 0,
"gradiff": 2,
"histology_init": 1,
"nb_telomere_length_mean": 0.9450928564263522,
"nb_telomere_length_sd": 0.4135180702405279,
"sc_telomere_length_mean": 0.7676743235511849,
"sc_telomere_length_sd": 0.8105162820722294,
"extent_of_differentiation_mean": 0.06622753275671711,
"extent_of_differentiation_sd": 0.07410312149966991,
"nb_necro_signal_mean": 0.7188138629491703,
"nb_necro_signal_sd": 0.8258744532253351,
"nb_apop_signal_mean": 0.39053580923508646,
"nb_apop_signal_sd": 0.3392658990752594,
"sc_necro_signal_mean": 0.457098053112971,
"sc_necro_signal_sd": 0.6052112757966235,
"sc_apop_signal_mean": 0.5049731645560103,
"sc_apop_signal_sd": 0.6729357465573265,
"drug_effects": [
1.0,
1.0,
0.0,
1.0,
1.0,
0.0
],
"start_effects": [
0
],
"end_effects": [
144
]
}
}
}
41 changes: 41 additions & 0 deletions inputs/out-29345.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"version": [
13,
9,
0,
false
],
"primage": {
"delta_O2": -0.00001790374517440796,
"O2": 0.10112509876489639,
"delta_ecm": 8.940696716308594e-8,
"ecm": 0.4792450964450836,
"material_properties": 0.0,
"diffusion_coefficient": 0.0,
"total_volume_ratio_updated": 1.102641224861145,
"cellularity": [
0.5205476880073547,
0.00012631146819330752,
0.00008094377699308097,
0.0,
0.0,
0.0
],
"tumour_volume": 35.80100631713867,
"ratio_VEGF_NB_SC": 0.0,
"nb_telomere_length_mean": 59.987728118896487,
"nb_telomere_length_sd": 0.11036907136440277,
"sc_telomere_length_mean": 0.0,
"sc_telomere_length_sd": 0.0,
"nb_necro_signal_mean": 1.4003527164459229,
"nb_necro_signal_sd": 2.0080089569091799,
"nb_apop_signal_mean": 0.04674074798822403,
"nb_apop_signal_sd": 0.22509713470935822,
"sc_necro_signal_mean": 0.0,
"sc_necro_signal_sd": 0.0,
"sc_apop_signal_mean": 0.0,
"sc_apop_signal_sd": 0.0,
"extent_of_differentiation_mean": 0.5021679401397705,
"extent_of_differentiation_sd": 0.17360052466392518
}
}
1 change: 1 addition & 0 deletions orchestrator_src/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "structures.h"

OrchestratorInput readOrchestratorInput(const std::string& inputFile);
CalibrationInput readCalibrationInput(const std::string& inputFile, const CalibrationInput& init = {});
void writeOrchestratorOutput(const OrchestratorOutput& out, const std::string& outputFile);
void printHelp(const char* executable);

Expand Down
Loading

0 comments on commit 9b6b501

Please sign in to comment.