-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbudgetcalc.html
More file actions
411 lines (393 loc) · 23.3 KB
/
budgetcalc.html
File metadata and controls
411 lines (393 loc) · 23.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ooi2025 Budget and Scan Billing Calculator</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Barlow&display=swap">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- Menu -->
<div class="menu-bar">
<ul>
<li><a onclick="jumpToSection('about')">About</a></li>
<li><a onclick="jumpToSection('budgetcalc')">Budget and Scan Billing Calculator</a></li>
<li><a onclick="jumpToSection('formula')">Formula</a></li>
<!--
<li><a onclick="jumpToSection('acccalc')">Accuracy Calculator</a></li>
-->
</ul>
</div>
<!-- Section 2: Budget and Scan Billing Calculator -->
<section id="budgetcalc">
<div class="title-container">
<h1>Budget and Scan Billing Calculator</h1>
<p> This calculator provides the optimal scan time based on the fMRI time range, MRI provider constraints
and
other overhead costs. Hover over each input for detailed descriptions. If no values are entered, default
settings will be applied.
<br>
<br>
<b>This site is best viewed with the Google Chrome browser. Some features may not work correctly on
Firefox.</b>
</p>
</div>
<div class="tabs-container">
<div class="tabs">
<input type="radio" id="phenotypes" name="ProcessTab" checked data-container="phenotypes" />
<label class="tab" for="phenotypes">1. Phenotypes</label>
<input type="radio" id="budget" name="ProcessTab" data-container="budget" />
<label class="tab" for="budget">2. Mode and Time Constraints</label>
<input type="radio" id="overheads" name="ProcessTab" data-container="overheads" />
<label class="tab" for="overheads">3. Overheads</label>
<input type="radio" id="results" name="ProcessTab" data-container="results" />
<label class="tab" for="results">4. Results</label>
<span class="glider"></span>
</div>
</div>
<!-- Display Area -->
<!-- Phenotypes -->
<div class="tab-content" id="phenotypes-container">
<head>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>
<br>
What method should be used to estimate phenotype prediction accuracy?
<select id="r_order">
<option value="original">Average across selected phenotypes</option>
<option value="own">Enter your own K0, K1 and K2 values</option>
</select>
<!-- Table of values -->
<br><br>
<div class="table-container" id="PhenTable">
<table id="phenotype-table">
<thead>
<tr>
<th>Selection</th>
<th>Phenotype</th>
<th>
Dataset
<span class="dropdown-icon"
onclick="toggleDropdown('dataset-dropdown', 2)">▼</span>
<div class="dropdown-content" id="dataset-dropdown">
</div>
</th>
<th>
Analysis Type <button class="popup-button">
<div class="popup-wide">Method used to construct the functional connectivity (FC)
matrices.
<ul>
<li> <b>whole brain, original</b>: 419x419 whole brain (400 cortical + 19
subcortical
regions) FC with the original run order (i.e. run 1, run 2, run 3, etc.)
[<b>Recommended</b>]</li><br>
<li> <b>whole brain, randomized</b>: 419x419 whole brain FC with randomized
run order
(e.g. run 2, run 3, run 1, etc.) </li><br>
<li> <b>subcortex-cortex, original</b>: 19x419 subcortical-cortical FC with
the original
run order </li><br>
<li> <b>whole brain, high resolution, original</b>: 1019x1019 whole brain
(1000 cortical +
19 subcortical regions) FC with the original run order </li><br>
<li> <b>two session</b>: 419x419 whole brain FC with the original run order
and equal
amounts of data from day 1 and day 2 [Note that this only applies to
certain
phenotypes from the HCP dataset] </li>
</ul>
</div><span class="question-icon">
<i class="fas fa-circle-question"></i>
</span>
</button>
<span class="dropdown-icon"
onclick="toggleDropdown('analysis-dropdown', 3)">▼</span>
<div class="dropdown-content" id="analysis-dropdown">
</div>
</th>
<th>
Category
<span class="dropdown-icon"
onclick="toggleDropdown('category-dropdown', 4)">▼</span>
<div class="dropdown-content" id="category-dropdown">
</div>
</th>
<th>K0 <button class="popup-button">
<div class="popup-K-values">Prediction accuracy (Pearson's Correlation) can be
expressed as a function of sample size N and scan time T. <br><br>
<ur>
<li> K0 is the maximum possible accuracy (given infinite sample size and
scan time). </li><br>
<li> K1 and K2 provide the tradeoff between sample size N and scan time T.
</li><br>
<li> A larger value of K1 (relative to K2) indicates that sample size is
important than scan time in determining the prediciton accuracy. On the
other hand, a
larger value of K2 (relative to K1) indicates that sample size and scan
time are
more interchangeable. See 'Formula' tab for more details. </li>
</ur>
</div><span class="question-icon"><i class="fas fa-circle-question"></i></span>
</button></th>
<th>K1</th>
<th>K2</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<div class="button-container" id="PhenTable_buttons">
<button class="button" onclick="clearAllSelections()">Deselect all</button>
<button class="next-tab-button" onclick="selectOoi2024_phenotypes(0, 122)">Select all datasets (whole
brain, original) phenotypes</button>
</div>
<div id="KFields" style="display: none;">
<p>Enter K values: <button class="popup-button">
<div class="popup-K-values">Prediction accuracy (Pearson's Correlation) can be expressed as a
function of sample size N and scan time T. <br><br>
<ur>
<li> K0 is the maximum possible accuracy (given infinite sample size and scan time).
</li><br>
<li> K1 and K2 provide the tradeoff between sample size N and scan time T. </li><br>
<li> A larger value of K1 (relative to K2) indicates that sample size is important than
scan time in determining the prediciton accuracy. On the other hand, a
larger value of K2 (relative to K1) indicates that sample size and scan time are
more interchangeable. See 'Formula' tab for more details. </li>
</ur>
</div><span class="question-icon"><i class="fas fa-circle-question"></i></span>
</button>
<input type="number" id="BudgK0" placeholder="K0">
<input type="number" id="BudgK1" placeholder="K1">
<input type="number" id="BudgK2" placeholder="K2">
</p>
</div>
<hr class="section-divider">
<div class="button-container">
<button class="next-tab-button" onclick="goToNextTab()">Next</button>
</div>
</div>
<!-- Budget -->
<div class="tab-content" id="budget-container">
<h2>1. Mode</h2>
<p>
<select id="mode_select">
<option value="fixed_budget">Fixed budget</option>
<option value="fixed_acc" selected>Fixed accuracy</option>
</select>
</p>
<div id="fmriBudget" , style="display: none;">
fMRI budget ($):
<input type="number" id="fmribudget" name="fmribudget" value="1000000"> <button class="popup-button">
<div class="popup">Calculate the prediction accuracy based on the amount of money allocated for the
fMRI
portion of the study. The optimum is the point at which the prediction accuracy is at its
maximum.</div><span class="question-icon"><i class="fas fa-circle-question"></i></span>
</button>
</div>
<div id="targetAcc">
Target accuracy (normalized):
<input type="number" id="fmriacc" name="target_acc" value="0.8"> <button class="popup-button">
<div class="popup">Estimate the fMRI budget needed to reach a target prediction accuracy (normalized
to the theoretical maximum). For example, a value of 0.8 indicates that the prediction model is
expected to achieve, on average, 80% of the highest possible accuracy across the phenotypes
considered. The optimum is the point at which the budget is at its minimum.</div><span
class="question-icon"><i class="fas fa-circle-question"></i></span>
</button>
</div>
<hr class="section-divider">
<h2>2. Total fMRI time range</h2>
<p>
Minimum (mins):
<input type="number" id="minT" name="minT" value="1"> <button class="popup-button">
<div class="popup">The minimum amount of fMRI data needed for the study. In the case of
scanning kids, this value might be higher as more frames will likely be discared (e.g., due to
higher motion) as compared to adults.</div><span class="question-icon"><i
class="fas fa-circle-question"></i></span>
</button>
</p>
<p>
Maximum (mins):
<input type="number" id="maxT" name="maxT" value="200"> <button class="popup-button">
<div class="popup"> The amount of fMRI data beyond which additional scan time is considered
unnecessary by researchers.</div><span class="question-icon"><i
class="fas fa-circle-question"></i></span>
</button>
</p>
<hr class="section-divider">
<h2>3. MRI and manpower costs</h2>
<p>
Time quantum (mins):
<input type="number" id="ScanItvl" name="ScanItvl" value="1"> <button class="popup-button">
<div class="popup"> The smallest time interval for which the MRI provider charges the researcher.
(e.g.,
15 min, 30 min or 60 min).</div><span class="question-icon"><i
class="fas fa-circle-question"></i></span>
</button>
</p>
<p>
MRI cost per time quantum ($):
<input type="number" id="CostTime" name="CostTime" value="8.333"> <button class="popup-button">
<div class="popup"> This includes how much MRI provider charges + manpower costs (e.g., costs of
hiring research assistants).</div><span class="question-icon"><i
class="fas fa-circle-question"></i></span>
</button>
</p>
<hr class="section-divider">
<h2>4. Participant scan time constraints for one session</h2>
<p>
Maximum session tolerance (mins):
<input type="number" id="maxS" name="maxS" value="300"> <button class="popup-button">
<div class="popup"> The maximum duration participants are able to tolerate in the scanner. This
value varies depending on the population studied.</div><span class="question-icon"><i
class="fas fa-circle-question"></i></span>
</button>
</p>
<hr class="section-divider">
<div class="button-container">
<button class="next-tab-button" onclick="goToNextTab()">Next</button>
</div>
</div>
<!-- Overheads -->
<div class="tab-content" id="overheads-container">
<h2>5. Overhead MRI time</h2>
<p>
One-time (mins):
<input type="number" id="otScanTime" name="otScanTime" value="0"> <button class="popup-button">
<div class="popup"> Overhead time incurred only during the first session for one-time MRI procedures
such as acquiring additional sequences, body imaging, or practice scans to acclimate the
participant. </div><span class="question-icon"><i class="fas fa-circle-question"></i></span>
</button>
</p>
<p>
Per-session (mins):
<input type="number" id="psScanTime" name="psScanTime" value="0"> <button class="popup-button">
<div class="popup"> Overhead time due to unavoidable setup for each scan session (e.g., participant
setup).</div><span class="question-icon"><i class="fas fa-circle-question"></i></span>
</button>
</p>
<hr class="section-divider">
<h2>6. Overhead non-MRI cost</h2>
<p>
Per participant ($):
<input type="number" id="PptCost" name="PptCost" value="500"> <button class="popup-button">
<div class="popup"> Costs related to participants recruitment/consent, collecting other non-imaging
tests (e.g., blood markers) and/or non-MRI imaging tests (e.g., PET). Other costs such as mock
scanner practice for children can be included here.</div><span class="question-icon"><i
class="fas fa-circle-question"></i></span>
</button>
</p>
<p>
Per session ($):
<input type="number" id="SsnCost" name="SsnCost" value="0"> <button class="popup-button">
<div class="popup"> Costs inccured for each scan sesion (e.g., time and effort to coordinate with
participants, pre-scan safety checks, data transfer to database, etc).</div><span
class="question-icon"><i class="fas fa-circle-question"></i></span>
</button>
</p>
<div class="button-container">
<button class="next-tab-button" id="CalcBudg" onclick="goToNextTab()">Generate scanning design</button>
</div>
</div>
<!-- Results -->
<div class="tab-content" id="results-container">
<div id="fixed_budget_calculator" , style="display: none;">
<div class="flex-container">
<div id="AccGraph" class="left"></div>
</div>
<hr class="section-divider">
<div id="currT" style="display: flex; flex-direction: column;">
<div style="display: flex; justify-content: space-between; align-items: center;">
<p style="margin-right: 10px;" style="font-size:12">fMRI scan duration (T): <span
id="fMRISpan">1</span>; Number of participants (N): <span id="NSpan">0</span></p>
<button id="G2Optima">Go to the first optimum</button>
</div>
<div class="slider-container" id="fMRIT_slider">
<span class="slider-label">Tmin</span> <!-- Left label -->
<input type="range" id="fMRIT" min="1" max="100" step="1" value="1" class="slider">
<span class="slider-label">Tmax</span> <!-- Right label -->
</div>
<p style="margin-right: 10px;" style="font-size:12">percentage of useable participants: <span
id="TrainingPerc">90</span>% ~ <span id="TrainN">1</span> participants <button
class="popup-button">
<div class="popup"> The proprotion of participants used to train a BWAS model. Default value
is set to 90% to account for attrition or cross-validation. This value is the actual
sample
size used to compute the % max prediction accuracy.</div><span class="question-icon"><i
class="fas fa-circle-question"></i></span>
</button></p>
<input type="range" id="TrainingRatio" min="1" max="100" step="1" value="90">
<div id="Budget_Table"></div>
</div>
</div>
<div id="fixed_acc_calculator">
<div class="flex-container">
<div id="BudgetGraph" class="left"></div>
</div>
<hr class="section-divider">
<div id="currT_FA" style="display: flex; flex-direction: column;">
<div style="display: flex; justify-content: space-between; align-items: center;">
<p style="margin-right: 10px;" style="font-size:12">fMRI scan duration (T): <span
id="fMRISpan_FA">1</span>; Number of participants (N): <span id="NSpan_FA">0</span></p>
<button id="G2Optima_FA">Go to the first optimum</button>
</div>
<div class="slider-container" id="fMRIT_slider">
<span class="slider-label">Tmin</span> <!-- Left label -->
<input type="range" id="fMRIT_FA" min="1" max="100" step="1" value="1" class="slider">
<span class="slider-label">Tmax</span> <!-- Right label -->
</div>
<p style="margin-right: 10px;" style="font-size:12">percentage of useable participants: <span
id="TrainingPerc_FA">90</span>% ~ <span id="TrainN_FA">1</span> participants <button
class="popup-button">
<div class="popup"> The proprotion of participants used to train a BWAS model. Default value
is set to 90% to account for attrition or cross-validation. This value is the actual
sample
size used to compute the % max prediction accuracy.</div><span class="question-icon"><i
class="fas fa-circle-question"></i></span>
</button></p>
<input type="range" id="TrainingRatio_FA" min="1" max="100" step="1" value="90">
<div id="Acc_Table"></div>
</div>
</div>
</div>
<!-- Include Sheetjs to read xlsx -->
<script src="https://cdn.jsdelivr.net/npm/xlsx@0.17.0/dist/xlsx.full.min.js"></script>
<!-- Include Plotly.js for graph plotting -->
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<!-- Scripts to generate values -->
<script src="budgetcalc.js"></script>
<!-- Script for scrolling behavior -->
<script>
function jumpToSection(containerId) {
// Check the containerId and redirect to the appropriate page
if (containerId === 'acccalc') {
window.location.href = 'acccalc.html';
} else if (containerId === 'budgetcalc') {
window.location.href = 'budgetcalc.html';
} else if (containerId === 'about') {
window.location.href = 'index.html';
} else if (containerId === 'formula') {
window.location.href = 'formula.html';
}
}
</script>
<!-- Script to toggle more text -->
<script>
function toggleMoreText(sectionId, show) {
var moreText = document.getElementById(sectionId);
moreText.style.display = show ? 'block' : 'none';
}
</script>
<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-R33XW8PFE9"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'G-R33XW8PFE9');
</script>
</body>
</html>