Skip to content

Commit 07dda8e

Browse files
authored
Quality of life improvements (#7)
- housekeeping - formatting - organization - support additional studies
1 parent ef5a330 commit 07dda8e

28 files changed

Lines changed: 2079 additions & 1348 deletions

gbm/jobs/cohort_submitter.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
##################################################################################################
1818

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

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

2827
# SLURM_SCRIPT="run_VBG.slurm"
2928
# SLURM_SCRIPT="pp_VBG.slurm"
30-
# SLURM_SCRIPT="run_rd_mle.slurm"
29+
# SLURM_SCRIPT="run_mle.slurm"
3130
# SLURM_SCRIPT="run_bip.slurm"
3231
SLURM_SCRIPT="run_fwd_prop.slurm"
3332

gbm/jobs/run_bip.slurm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ NSAMPLES="500"
5656
PDIR="$WORK/data/IvyGAP/$SUBID/"
5757
BIPDIR="$SCRATCH/hgg/sub-$SUBID/${EXPNAME}_bip/"
5858
MESH="$SCRATCH/hgg/sub-$SUBID/bip_mesh/bip_mesh-all.h5"
59-
PROPDIR="$SCRATCH/hgg/sub-$SUBID/${EXPNAME}_prop/"
6059

6160
# run the Bayesian inverse problem
6261
MV2_SMP_USE_CMA=0 ibrun apptainer run $SIF python3 -u $DT4CO_PATH/gbm/run_bip.py \

gbm/jobs/run_mle.slurm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ pwd
4545
SIF=$SCRATCH/containers/onco-fenics-2019.1.0_latest.sif # path to Apptainer image
4646
export IBRUN_TASKS_PER_NODE=56 # Set the number of tasks per node (56 is max for CLX node)
4747

48-
SUBID=WXX # subject to be processed
49-
EXPNAME=dmrd_mle # experiment name
50-
EXPTYPE=rd # experiment type
48+
SUBID=WXX # subject to be processed
49+
EXPNAME=dmrdtx_mle # experiment name
50+
EXPTYPE=rdtx # experiment type
5151

5252
# set up I/O
5353
PDIR=$WORK/data/IvyGAP/$SUBID/

gbm/postprocessing/ivygap_figs.ipynb

Lines changed: 50 additions & 368 deletions
Large diffs are not rendered by default.

gbm/postprocessing/priors.ipynb

Lines changed: 17 additions & 220 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,7 @@
55
"execution_count": null,
66
"id": "a3166a39-9f5f-40d0-91f0-6d2a7270fe6c",
77
"metadata": {},
8-
"outputs": [
9-
{
10-
"name": "stderr",
11-
"output_type": "stream",
12-
"text": [
13-
"Warning: Process to core binding is enabled and OMP_NUM_THREADS is set to non-zero (1) value\n",
14-
"If your program has OpenMP sections, this can cause over-subscription of cores and consequently poor performance\n",
15-
"To avoid this, please re-run your application after setting MV2_ENABLE_AFFINITY=0\n",
16-
"Use MV2_USE_THREAD_WARNING=0 to suppress this message\n"
17-
]
18-
}
19-
],
8+
"outputs": [],
209
"source": [
2110
"import os\n",
2211
"import sys\n",
@@ -36,7 +25,7 @@
3625
},
3726
{
3827
"cell_type": "code",
39-
"execution_count": 2,
28+
"execution_count": null,
4029
"id": "0baeee9b-0b71-4235-9b69-17071e7595ad",
4130
"metadata": {},
4231
"outputs": [],
@@ -49,7 +38,7 @@
4938
},
5039
{
5140
"cell_type": "code",
52-
"execution_count": 3,
41+
"execution_count": null,
5342
"id": "7aed6e35-fc35-4c4f-be85-4262675b7fc6",
5443
"metadata": {},
5544
"outputs": [],
@@ -60,7 +49,7 @@
6049
},
6150
{
6251
"cell_type": "code",
63-
"execution_count": 4,
52+
"execution_count": null,
6453
"id": "c8143b5e-8a95-42c7-974b-69a61d2568e4",
6554
"metadata": {},
6655
"outputs": [],
@@ -79,84 +68,10 @@
7968
},
8069
{
8170
"cell_type": "code",
82-
"execution_count": 5,
71+
"execution_count": null,
8372
"id": "0571179f-a100-46cc-b9bc-db5411c8e152",
8473
"metadata": {},
85-
"outputs": [
86-
{
87-
"name": "stdout",
88-
"output_type": "stream",
89-
"text": [
90-
"Processing Patient: W03\n",
91-
"MLE log diffusion: 0.1143035003612636\n",
92-
"MLE log proliferation: -21.922898628312048\n",
93-
"MLE diffusion: 1.1210923251817877\n",
94-
"MLE proliferation: 3.0130483333676464e-10\n",
95-
"Processing Patient: W10\n",
96-
"MLE log diffusion: -1.1449908089568364\n",
97-
"MLE log proliferation: -5.3926840706878\n",
98-
"MLE diffusion: 0.3182268426136243\n",
99-
"MLE proliferation: 0.00454974509489878\n",
100-
"Processing Patient: W11\n",
101-
"MLE log diffusion: -1.706727316271854\n",
102-
"MLE log proliferation: -22.660688031873754\n",
103-
"MLE diffusion: 0.1814586787888884\n",
104-
"MLE proliferation: 1.4407486842098227e-10\n",
105-
"Processing Patient: W16\n",
106-
"MLE log diffusion: -0.2031689260893507\n",
107-
"MLE log proliferation: -5.194750749761688\n",
108-
"MLE diffusion: 0.8161403623804757\n",
109-
"MLE proliferation: 0.0055455983844632465\n",
110-
"Processing Patient: W18\n",
111-
"MLE log diffusion: 2.061072280786489\n",
112-
"MLE log proliferation: -22.081476239067886\n",
113-
"MLE diffusion: 7.854387405203522\n",
114-
"MLE proliferation: 2.571205077794512e-10\n",
115-
"Processing Patient: W20\n",
116-
"Can't process patient\n",
117-
"Processing Patient: W29\n",
118-
"MLE log diffusion: -1.2992952010651497\n",
119-
"MLE log proliferation: -5.069853631527661\n",
120-
"MLE diffusion: 0.2727239408562921\n",
121-
"MLE proliferation: 0.006283339756339436\n",
122-
"Processing Patient: W31\n",
123-
"MLE log diffusion: 2.467532195916873\n",
124-
"MLE log proliferation: -21.84418897764345\n",
125-
"MLE diffusion: 11.793307339125743\n",
126-
"MLE proliferation: 3.259787314492153e-10\n",
127-
"Processing Patient: W35\n",
128-
"MLE log diffusion: -0.7161246467064466\n",
129-
"MLE log proliferation: -34.062744843271474\n",
130-
"MLE diffusion: 0.4886422527555163\n",
131-
"MLE proliferation: 1.6096738030043049e-15\n",
132-
"Processing Patient: W36\n",
133-
"MLE log diffusion: -2.1192085414669015\n",
134-
"MLE log proliferation: -9.009352831042843\n",
135-
"MLE diffusion: 0.12012666617230665\n",
136-
"MLE proliferation: 0.00012226095391546868\n",
137-
"Processing Patient: W39\n",
138-
"MLE log diffusion: 233.37212716072992\n",
139-
"MLE log proliferation: -13.341620428232195\n",
140-
"MLE diffusion: 2.2502307540906503e+101\n",
141-
"MLE proliferation: 1.6062305003569016e-06\n",
142-
"Processing Patient: W43\n",
143-
"MLE log diffusion: -0.5548985716113457\n",
144-
"MLE log proliferation: -22.15956766981477\n",
145-
"MLE diffusion: 0.5741304913739069\n",
146-
"MLE proliferation: 2.3780557929506767e-10\n",
147-
"Processing Patient: W50\n",
148-
"MLE log diffusion: 0.2971229561335934\n",
149-
"MLE log proliferation: -23.46733741675138\n",
150-
"MLE diffusion: 1.3459807858674253\n",
151-
"MLE proliferation: 6.430797806303075e-11\n",
152-
"Processing Patient: W53\n",
153-
"MLE log diffusion: 2.7033636010038573\n",
154-
"MLE log proliferation: -22.495207415609546\n",
155-
"MLE diffusion: 14.929865473135763\n",
156-
"MLE proliferation: 1.7000259477548828e-10\n"
157-
]
158-
}
159-
],
74+
"outputs": [],
16075
"source": [
16176
"RD_DVALUES = []\n",
16277
"RD_KVALUES = []\n",
@@ -203,29 +118,10 @@
203118
},
204119
{
205120
"cell_type": "code",
206-
"execution_count": 6,
121+
"execution_count": null,
207122
"id": "bb089d1b-71ed-4290-9373-a74f7be0c61b",
208123
"metadata": {},
209-
"outputs": [
210-
{
211-
"name": "stdout",
212-
"output_type": "stream",
213-
"text": [
214-
"Reaction diffusion WITHOUT treatment\n",
215-
"Number of diffusion values: 7\n",
216-
"Number of proliferation values: 3\n",
217-
"Mean diffusion is: 0.3959213192772872\n",
218-
"Variance of diffusion is: 0.051458666473056476\n",
219-
"Mean proliferation rate is: 0.0054595610785671544\n",
220-
"Variance of proliferation rate is: 5.045929506988528e-07\n",
221-
"###\n",
222-
"Log mean diffusion is: -1.1063448588811264\n",
223-
"Log variance of diffusion is: 0.3853095522796434\n",
224-
"Log mean proliferation rate is: -5.219096150659049\n",
225-
"Log variance of proliferation rate is: 0.017666264680481242\n"
226-
]
227-
}
228-
],
124+
"outputs": [],
229125
"source": [
230126
"print(\"Reaction diffusion WITHOUT treatment\")\n",
231127
"DVALUES = RD_DVALUES\n",
@@ -261,81 +157,10 @@
261157
},
262158
{
263159
"cell_type": "code",
264-
"execution_count": 7,
160+
"execution_count": null,
265161
"id": "69a43643-a8a0-483d-b085-4c4be5da0573",
266162
"metadata": {},
267-
"outputs": [
268-
{
269-
"name": "stdout",
270-
"output_type": "stream",
271-
"text": [
272-
"Processing Patient: W03\n",
273-
"MLE log diffusion: -2.443081478669667\n",
274-
"MLE log proliferation: -2.817342700006679\n",
275-
"MLE diffusion: 0.08689268055104375\n",
276-
"MLE proliferation: 0.05976454421266214\n",
277-
"Processing Patient: W10\n",
278-
"MLE log diffusion: -49.82932868352395\n",
279-
"MLE log proliferation: -979.8084185123718\n",
280-
"MLE diffusion: 2.287691801596685e-22\n",
281-
"MLE proliferation: 0.0\n",
282-
"Processing Patient: W11\n",
283-
"MLE log diffusion: -3.585086338601014\n",
284-
"MLE log proliferation: -3.164030796146209\n",
285-
"MLE diffusion: 0.02773427298847698\n",
286-
"MLE proliferation: 0.04225507575650025\n",
287-
"Processing Patient: W16\n",
288-
"MLE log diffusion: -3.0878809202027644\n",
289-
"MLE log proliferation: -1.346505750933838\n",
290-
"MLE diffusion: 0.045598478912382036\n",
291-
"MLE proliferation: 0.2601476951623734\n",
292-
"Processing Patient: W18\n",
293-
"MLE log diffusion: -2.302602314143742\n",
294-
"MLE log proliferation: -10.664932068932993\n",
295-
"MLE diffusion: 0.09999827789985868\n",
296-
"MLE proliferation: 2.3349568143790975e-05\n",
297-
"Processing Patient: W20\n",
298-
"Can't process patient\n",
299-
"Processing Patient: W29\n",
300-
"MLE log diffusion: -2.36765873377681\n",
301-
"MLE log proliferation: -11.709701005676628\n",
302-
"MLE diffusion: 0.09369984595366769\n",
303-
"MLE proliferation: 8.213749778702731e-06\n",
304-
"Processing Patient: W31\n",
305-
"Can't process patient\n",
306-
"Processing Patient: W35\n",
307-
"MLE log diffusion: -21.63449432158633\n",
308-
"MLE log proliferation: -2.6069018695444264\n",
309-
"MLE diffusion: 4.0203003282252273e-10\n",
310-
"MLE proliferation: 0.07376271664479506\n",
311-
"Processing Patient: W36\n",
312-
"MLE log diffusion: -2.3025850929940876\n",
313-
"MLE log proliferation: -6.052240227040149\n",
314-
"MLE diffusion: 0.0999999999999958\n",
315-
"MLE proliferation: 0.002352585772454049\n",
316-
"Processing Patient: W39\n",
317-
"MLE log diffusion: -3.6039947675671646\n",
318-
"MLE log proliferation: -3.0074657918687335\n",
319-
"MLE diffusion: 0.027214788255300274\n",
320-
"MLE proliferation: 0.04941675254814806\n",
321-
"Processing Patient: W43\n",
322-
"MLE log diffusion: -2.182270282641476\n",
323-
"MLE log proliferation: -2.2074656620947035\n",
324-
"MLE diffusion: 0.11278518551372084\n",
325-
"MLE proliferation: 0.10997901962150763\n",
326-
"Processing Patient: W50\n",
327-
"MLE log diffusion: -3.075679974705214\n",
328-
"MLE log proliferation: -2.6231396294138567\n",
329-
"MLE diffusion: 0.04615823127856505\n",
330-
"MLE proliferation: 0.07257464726150657\n",
331-
"Processing Patient: W53\n",
332-
"MLE log diffusion: -3.7115867272131595\n",
333-
"MLE log proliferation: -2.901375503554706\n",
334-
"MLE diffusion: 0.024438714916645614\n",
335-
"MLE proliferation: 0.05494758745001253\n"
336-
]
337-
}
338-
],
163+
"outputs": [],
339164
"source": [
340165
"RDTX_DVALUES = []\n",
341166
"RDTX_KVALUES = []\n",
@@ -381,29 +206,10 @@
381206
},
382207
{
383208
"cell_type": "code",
384-
"execution_count": 8,
209+
"execution_count": null,
385210
"id": "19f5e06c-8989-413a-a8b0-6163cc73c52e",
386211
"metadata": {},
387-
"outputs": [
388-
{
389-
"name": "stdout",
390-
"output_type": "stream",
391-
"text": [
392-
"Reaction diffusion WITH treatment\n",
393-
"Number of diffusion values: 4\n",
394-
"Number of proliferation values: 6\n",
395-
"Mean diffusion is: 0.06808730917391463\n",
396-
"Variance of diffusion is: 0.0004990689941995712\n",
397-
"Mean proliferation rate is: 0.058786887312270775\n",
398-
"Variance of proliferation rate is: 0.00013186234064586555\n",
399-
"###\n",
400-
"Log mean diffusion is: -2.7435752768386137\n",
401-
"Log variance of diffusion is: 0.11511241912075106\n",
402-
"Log mean proliferation rate is: -2.853376048422435\n",
403-
"Log variance of proliferation rate is: 0.03960178345019936\n"
404-
]
405-
}
406-
],
212+
"outputs": [],
407213
"source": [
408214
"print(\"Reaction diffusion WITH treatment\")\n",
409215
"\n",
@@ -443,7 +249,7 @@
443249
},
444250
{
445251
"cell_type": "code",
446-
"execution_count": 12,
252+
"execution_count": null,
447253
"id": "94db6e67-caef-48de-b456-6c39e80255cf",
448254
"metadata": {},
449255
"outputs": [],
@@ -461,19 +267,10 @@
461267
},
462268
{
463269
"cell_type": "code",
464-
"execution_count": 15,
270+
"execution_count": null,
465271
"id": "5086802d-519e-419a-a79b-69c05e1a215f",
466272
"metadata": {},
467-
"outputs": [
468-
{
469-
"name": "stdout",
470-
"output_type": "stream",
471-
"text": [
472-
"Physical variance of diffusion is: [0.08800584]\n",
473-
"Physical variance of proliferation is: [0.03348272]\n"
474-
]
475-
}
476-
],
273+
"outputs": [],
477274
"source": [
478275
"phys_d_var = logvar2physvar(np.mean(phys_d_vals), np.var(log_d_vals))\n",
479276
"phys_k_var = logvar2physvar(np.mean(phys_k_vals), np.var(log_k_vals))\n",
@@ -485,7 +282,7 @@
485282
],
486283
"metadata": {
487284
"kernelspec": {
488-
"display_name": "Python 3 (ipykernel)",
285+
"display_name": "gbm3.12",
489286
"language": "python",
490287
"name": "python3"
491288
},
@@ -499,7 +296,7 @@
499296
"name": "python",
500297
"nbconvert_exporter": "python",
501298
"pygments_lexer": "ipython3",
502-
"version": "3.11.9"
299+
"version": "3.12.4"
503300
}
504301
},
505302
"nbformat": 4,

0 commit comments

Comments
 (0)