Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
1fedf70
formatting
gtpash Feb 23, 2026
14418c3
formatting
gtpash Feb 23, 2026
815cd36
formatting
gtpash Feb 23, 2026
3835fa9
add assigner, update comment
gtpash Feb 24, 2026
4eaf246
initial work for evaluating log likelihood
gtpash Feb 24, 2026
7a9d81c
update example call
gtpash Feb 24, 2026
e12801e
likelihood eval job
gtpash Feb 24, 2026
3b5151b
more verbosity
gtpash Feb 24, 2026
c96cbf0
take steps in mean of map directions
gtpash Feb 25, 2026
4ff9a80
typo
gtpash Feb 25, 2026
d4f3275
mesh sequence generation
gtpash Feb 25, 2026
41aa950
no postprocessing needed
gtpash Feb 25, 2026
5fe243a
rename
gtpash Feb 25, 2026
f2ef374
update directory
gtpash Feb 25, 2026
b0b8fa5
mesh convergence study observation generation
gtpash Feb 25, 2026
8268ee5
compute eigenpairs
gtpash Feb 26, 2026
45dbf5b
fix queue
gtpash Feb 26, 2026
a8635e2
step likelihood in map
gtpash Feb 26, 2026
56eb94e
step in map direction
gtpash Feb 26, 2026
6b07a22
pass along map file
gtpash Feb 26, 2026
a6a16d5
update function assigner
gtpash Feb 26, 2026
75e6c4f
update assigner
gtpash Feb 26, 2026
bca254f
typo in call to mesh
gtpash Feb 26, 2026
41b76b1
no need for assigner
gtpash Feb 26, 2026
15f0ddf
add verbosity
gtpash Feb 27, 2026
0df1861
verbosity
gtpash Feb 27, 2026
92ea563
set maximum value and radius of Gaussian function (#3)
gtpash Feb 27, 2026
62218d0
Update chemotherapy model (#4)
gtpash Feb 28, 2026
7f88baf
update documentation
gtpash Feb 28, 2026
e821e0f
Mesh refinement study (#5)
gtpash Feb 28, 2026
8cf9c42
Update cohort submission scripts (#6)
gtpash Mar 2, 2026
91754fe
compute all cost components
gtpash Mar 7, 2026
81dfb9a
consistent kill rate
gtpash Mar 7, 2026
086a5be
clean up notebooks
gtpash Mar 15, 2026
fd63945
mesh refinement analysis
gtpash Mar 15, 2026
97cbffe
mutual info calculation
gtpash Mar 15, 2026
3fdaedb
clean up notebook
gtpash Mar 15, 2026
170108d
clean up notebooks
gtpash Mar 15, 2026
f697bf4
reorg
gtpash Mar 15, 2026
8456eaf
Merge branch 'main' into dev-rev
gtpash Mar 15, 2026
5796e41
format
gtpash Mar 15, 2026
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 gbm/jobs/cohort_submitter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
##################################################################################################

# Define the cohort of subjects.
# COHORT=("W03" "W10" "W11" "W16" "W18" "W20" "W29" "W31" "W35" "W36" "W39" "W43" "W50" "W53")
COHORT=("W11" "W16" "W18" "W29" "W31" "W35" "W36" "W39" "W50" "W53")
COHORT=("W03" "W11" "W16" "W29" "W35" "W36" "W43" "W53")

# directory where patient data is stored.
# DATADIR="${WORK}/data/IvyGAP/"
Expand All @@ -27,7 +26,7 @@ PLACEHOLDER="WXX"

# SLURM_SCRIPT="run_VBG.slurm"
# SLURM_SCRIPT="pp_VBG.slurm"
# SLURM_SCRIPT="run_rd_mle.slurm"
# SLURM_SCRIPT="run_mle.slurm"
# SLURM_SCRIPT="run_bip.slurm"
SLURM_SCRIPT="run_fwd_prop.slurm"

Expand Down
1 change: 0 additions & 1 deletion gbm/jobs/run_bip.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ NSAMPLES="500"
PDIR="$WORK/data/IvyGAP/$SUBID/"
BIPDIR="$SCRATCH/hgg/sub-$SUBID/${EXPNAME}_bip/"
MESH="$SCRATCH/hgg/sub-$SUBID/bip_mesh/bip_mesh-all.h5"
PROPDIR="$SCRATCH/hgg/sub-$SUBID/${EXPNAME}_prop/"

# run the Bayesian inverse problem
MV2_SMP_USE_CMA=0 ibrun apptainer run $SIF python3 -u $DT4CO_PATH/gbm/run_bip.py \
Expand Down
6 changes: 3 additions & 3 deletions gbm/jobs/run_mle.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ pwd
SIF=$SCRATCH/containers/onco-fenics-2019.1.0_latest.sif # path to Apptainer image
export IBRUN_TASKS_PER_NODE=56 # Set the number of tasks per node (56 is max for CLX node)

SUBID=WXX # subject to be processed
EXPNAME=dmrd_mle # experiment name
EXPTYPE=rd # experiment type
SUBID=WXX # subject to be processed
EXPNAME=dmrdtx_mle # experiment name
EXPTYPE=rdtx # experiment type

# set up I/O
PDIR=$WORK/data/IvyGAP/$SUBID/
Expand Down
418 changes: 50 additions & 368 deletions gbm/postprocessing/ivygap_figs.ipynb

Large diffs are not rendered by default.

237 changes: 17 additions & 220 deletions gbm/postprocessing/priors.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,7 @@
"execution_count": null,
"id": "a3166a39-9f5f-40d0-91f0-6d2a7270fe6c",
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"Warning: Process to core binding is enabled and OMP_NUM_THREADS is set to non-zero (1) value\n",
"If your program has OpenMP sections, this can cause over-subscription of cores and consequently poor performance\n",
"To avoid this, please re-run your application after setting MV2_ENABLE_AFFINITY=0\n",
"Use MV2_USE_THREAD_WARNING=0 to suppress this message\n"
]
}
],
"outputs": [],
"source": [
"import os\n",
"import sys\n",
Expand All @@ -36,7 +25,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"id": "0baeee9b-0b71-4235-9b69-17071e7595ad",
"metadata": {},
"outputs": [],
Expand All @@ -49,7 +38,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "7aed6e35-fc35-4c4f-be85-4262675b7fc6",
"metadata": {},
"outputs": [],
Expand All @@ -60,7 +49,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "c8143b5e-8a95-42c7-974b-69a61d2568e4",
"metadata": {},
"outputs": [],
Expand All @@ -79,84 +68,10 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"id": "0571179f-a100-46cc-b9bc-db5411c8e152",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Processing Patient: W03\n",
"MLE log diffusion: 0.1143035003612636\n",
"MLE log proliferation: -21.922898628312048\n",
"MLE diffusion: 1.1210923251817877\n",
"MLE proliferation: 3.0130483333676464e-10\n",
"Processing Patient: W10\n",
"MLE log diffusion: -1.1449908089568364\n",
"MLE log proliferation: -5.3926840706878\n",
"MLE diffusion: 0.3182268426136243\n",
"MLE proliferation: 0.00454974509489878\n",
"Processing Patient: W11\n",
"MLE log diffusion: -1.706727316271854\n",
"MLE log proliferation: -22.660688031873754\n",
"MLE diffusion: 0.1814586787888884\n",
"MLE proliferation: 1.4407486842098227e-10\n",
"Processing Patient: W16\n",
"MLE log diffusion: -0.2031689260893507\n",
"MLE log proliferation: -5.194750749761688\n",
"MLE diffusion: 0.8161403623804757\n",
"MLE proliferation: 0.0055455983844632465\n",
"Processing Patient: W18\n",
"MLE log diffusion: 2.061072280786489\n",
"MLE log proliferation: -22.081476239067886\n",
"MLE diffusion: 7.854387405203522\n",
"MLE proliferation: 2.571205077794512e-10\n",
"Processing Patient: W20\n",
"Can't process patient\n",
"Processing Patient: W29\n",
"MLE log diffusion: -1.2992952010651497\n",
"MLE log proliferation: -5.069853631527661\n",
"MLE diffusion: 0.2727239408562921\n",
"MLE proliferation: 0.006283339756339436\n",
"Processing Patient: W31\n",
"MLE log diffusion: 2.467532195916873\n",
"MLE log proliferation: -21.84418897764345\n",
"MLE diffusion: 11.793307339125743\n",
"MLE proliferation: 3.259787314492153e-10\n",
"Processing Patient: W35\n",
"MLE log diffusion: -0.7161246467064466\n",
"MLE log proliferation: -34.062744843271474\n",
"MLE diffusion: 0.4886422527555163\n",
"MLE proliferation: 1.6096738030043049e-15\n",
"Processing Patient: W36\n",
"MLE log diffusion: -2.1192085414669015\n",
"MLE log proliferation: -9.009352831042843\n",
"MLE diffusion: 0.12012666617230665\n",
"MLE proliferation: 0.00012226095391546868\n",
"Processing Patient: W39\n",
"MLE log diffusion: 233.37212716072992\n",
"MLE log proliferation: -13.341620428232195\n",
"MLE diffusion: 2.2502307540906503e+101\n",
"MLE proliferation: 1.6062305003569016e-06\n",
"Processing Patient: W43\n",
"MLE log diffusion: -0.5548985716113457\n",
"MLE log proliferation: -22.15956766981477\n",
"MLE diffusion: 0.5741304913739069\n",
"MLE proliferation: 2.3780557929506767e-10\n",
"Processing Patient: W50\n",
"MLE log diffusion: 0.2971229561335934\n",
"MLE log proliferation: -23.46733741675138\n",
"MLE diffusion: 1.3459807858674253\n",
"MLE proliferation: 6.430797806303075e-11\n",
"Processing Patient: W53\n",
"MLE log diffusion: 2.7033636010038573\n",
"MLE log proliferation: -22.495207415609546\n",
"MLE diffusion: 14.929865473135763\n",
"MLE proliferation: 1.7000259477548828e-10\n"
]
}
],
"outputs": [],
"source": [
"RD_DVALUES = []\n",
"RD_KVALUES = []\n",
Expand Down Expand Up @@ -203,29 +118,10 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"id": "bb089d1b-71ed-4290-9373-a74f7be0c61b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Reaction diffusion WITHOUT treatment\n",
"Number of diffusion values: 7\n",
"Number of proliferation values: 3\n",
"Mean diffusion is: 0.3959213192772872\n",
"Variance of diffusion is: 0.051458666473056476\n",
"Mean proliferation rate is: 0.0054595610785671544\n",
"Variance of proliferation rate is: 5.045929506988528e-07\n",
"###\n",
"Log mean diffusion is: -1.1063448588811264\n",
"Log variance of diffusion is: 0.3853095522796434\n",
"Log mean proliferation rate is: -5.219096150659049\n",
"Log variance of proliferation rate is: 0.017666264680481242\n"
]
}
],
"outputs": [],
"source": [
"print(\"Reaction diffusion WITHOUT treatment\")\n",
"DVALUES = RD_DVALUES\n",
Expand Down Expand Up @@ -261,81 +157,10 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "69a43643-a8a0-483d-b085-4c4be5da0573",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Processing Patient: W03\n",
"MLE log diffusion: -2.443081478669667\n",
"MLE log proliferation: -2.817342700006679\n",
"MLE diffusion: 0.08689268055104375\n",
"MLE proliferation: 0.05976454421266214\n",
"Processing Patient: W10\n",
"MLE log diffusion: -49.82932868352395\n",
"MLE log proliferation: -979.8084185123718\n",
"MLE diffusion: 2.287691801596685e-22\n",
"MLE proliferation: 0.0\n",
"Processing Patient: W11\n",
"MLE log diffusion: -3.585086338601014\n",
"MLE log proliferation: -3.164030796146209\n",
"MLE diffusion: 0.02773427298847698\n",
"MLE proliferation: 0.04225507575650025\n",
"Processing Patient: W16\n",
"MLE log diffusion: -3.0878809202027644\n",
"MLE log proliferation: -1.346505750933838\n",
"MLE diffusion: 0.045598478912382036\n",
"MLE proliferation: 0.2601476951623734\n",
"Processing Patient: W18\n",
"MLE log diffusion: -2.302602314143742\n",
"MLE log proliferation: -10.664932068932993\n",
"MLE diffusion: 0.09999827789985868\n",
"MLE proliferation: 2.3349568143790975e-05\n",
"Processing Patient: W20\n",
"Can't process patient\n",
"Processing Patient: W29\n",
"MLE log diffusion: -2.36765873377681\n",
"MLE log proliferation: -11.709701005676628\n",
"MLE diffusion: 0.09369984595366769\n",
"MLE proliferation: 8.213749778702731e-06\n",
"Processing Patient: W31\n",
"Can't process patient\n",
"Processing Patient: W35\n",
"MLE log diffusion: -21.63449432158633\n",
"MLE log proliferation: -2.6069018695444264\n",
"MLE diffusion: 4.0203003282252273e-10\n",
"MLE proliferation: 0.07376271664479506\n",
"Processing Patient: W36\n",
"MLE log diffusion: -2.3025850929940876\n",
"MLE log proliferation: -6.052240227040149\n",
"MLE diffusion: 0.0999999999999958\n",
"MLE proliferation: 0.002352585772454049\n",
"Processing Patient: W39\n",
"MLE log diffusion: -3.6039947675671646\n",
"MLE log proliferation: -3.0074657918687335\n",
"MLE diffusion: 0.027214788255300274\n",
"MLE proliferation: 0.04941675254814806\n",
"Processing Patient: W43\n",
"MLE log diffusion: -2.182270282641476\n",
"MLE log proliferation: -2.2074656620947035\n",
"MLE diffusion: 0.11278518551372084\n",
"MLE proliferation: 0.10997901962150763\n",
"Processing Patient: W50\n",
"MLE log diffusion: -3.075679974705214\n",
"MLE log proliferation: -2.6231396294138567\n",
"MLE diffusion: 0.04615823127856505\n",
"MLE proliferation: 0.07257464726150657\n",
"Processing Patient: W53\n",
"MLE log diffusion: -3.7115867272131595\n",
"MLE log proliferation: -2.901375503554706\n",
"MLE diffusion: 0.024438714916645614\n",
"MLE proliferation: 0.05494758745001253\n"
]
}
],
"outputs": [],
"source": [
"RDTX_DVALUES = []\n",
"RDTX_KVALUES = []\n",
Expand Down Expand Up @@ -381,29 +206,10 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"id": "19f5e06c-8989-413a-a8b0-6163cc73c52e",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Reaction diffusion WITH treatment\n",
"Number of diffusion values: 4\n",
"Number of proliferation values: 6\n",
"Mean diffusion is: 0.06808730917391463\n",
"Variance of diffusion is: 0.0004990689941995712\n",
"Mean proliferation rate is: 0.058786887312270775\n",
"Variance of proliferation rate is: 0.00013186234064586555\n",
"###\n",
"Log mean diffusion is: -2.7435752768386137\n",
"Log variance of diffusion is: 0.11511241912075106\n",
"Log mean proliferation rate is: -2.853376048422435\n",
"Log variance of proliferation rate is: 0.03960178345019936\n"
]
}
],
"outputs": [],
"source": [
"print(\"Reaction diffusion WITH treatment\")\n",
"\n",
Expand Down Expand Up @@ -443,7 +249,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": null,
"id": "94db6e67-caef-48de-b456-6c39e80255cf",
"metadata": {},
"outputs": [],
Expand All @@ -461,19 +267,10 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": null,
"id": "5086802d-519e-419a-a79b-69c05e1a215f",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Physical variance of diffusion is: [0.08800584]\n",
"Physical variance of proliferation is: [0.03348272]\n"
]
}
],
"outputs": [],
"source": [
"phys_d_var = logvar2physvar(np.mean(phys_d_vals), np.var(log_d_vals))\n",
"phys_k_var = logvar2physvar(np.mean(phys_k_vals), np.var(log_k_vals))\n",
Expand All @@ -485,7 +282,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "gbm3.12",
"language": "python",
"name": "python3"
},
Expand All @@ -499,7 +296,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.12.4"
}
},
"nbformat": 4,
Expand Down
Loading
Loading