-
Notifications
You must be signed in to change notification settings - Fork 0
/
index_view.html
327 lines (268 loc) · 14.2 KB
/
index_view.html
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
<!-- Main View: generate all content for display -->
<!DOCTYPE html>
<html lang="en" ng-app='SPR'>
<head>
<!-- Compatibility & view issues -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<title>OxSPR: Simulation Challenge</title>
<!-- Angular Libraries -->
<script type="text/javascript" src="libraries/angular/angular.min.js"></script>
<script type="text/javascript" src="libraries/angular/angular-cookies.min.js"></script>
<!-- jQuery Libraries, load before Bootstrap & Flot since they requires it -->
<script type="text/javascript" src="libraries/jquery/jquery-1.11.3.min.js"></script>
<!-- Bootstrap Libraries -->
<link rel="stylesheet" href="libraries/bootstrap/bootstrap.min.css">
<link rel="stylesheet" href="libraries/bootstrap/bootstrap-theme.min.css">
<!-- Angular Flot Chart Libraries -->
<script type="text/javascript" src="libraries/flot/jquery.flot.js"></script>
<script type="text/javascript" src="libraries/flot/angular-flot.js"></script>
<script type="text/javascript" src="libraries/flot/jquery.flot.axislabels.js"></script>
<script type="text/javascript" src="scripts/services/chart-config.js"></script>
<link rel="stylesheet" href="styles/chart-style.css">
<!-- Ui-grid Libraries -->
<link rel="stylesheet" href="libraries/ui-grid/ui-grid.min.css">
<script type="text/javascript" src="libraries/ui-grid/ui-grid.min.js"></script>
<script type="text/javascript" src="libraries/ui-grid/exporter.js"></script>
<script type="text/javascript" src="libraries/ui-grid/selection.js"></script>
<script type="text/javascript" src="scripts/services/table-config.js"></script>
<link rel="stylesheet" href="styles/table-style.css">
<!-- Personal libraries, load last since these files will be referencing to those previous libraries too -->
<link rel="stylesheet" href="styles/main.css">
<script type="text/javascript" src="scripts/index_model.js"></script>
<script type="text/javascript" src="scripts/services/system_model.js"></script>
<script type="text/javascript" src="scripts/services/experiment_status.js"></script>
<script type="text/javascript" src="scripts/services/output_model.js"></script>
<script type="text/javascript" src="scripts/filters/time_filter.js"></script>
<script type="text/javascript" src="scripts/filters/mw_filter.js"></script>
<script type="text/javascript" src="scripts/filters/uM_filter.js"></script>
<script type="text/javascript" src="scripts/index_controller.js"></script>
</head>
<body ng-controller="viewCtrl as view">
<!-- Bootstrap column position: far left / far right -->
<!-- 0. Debugging Box -->
<!-- 0.1. data output -->
<div id="chart">
<h1 id="graph-label">SPR graph of resonance(RU) against time(s)</h1>
<!-- Chart -->
<flot id="flot" dataset="view.chart.dataset" options="view.chart.options"></flot>
<div id="grid-table" ui-grid="view.table.options" ui-grid-selection ui-grid-exporter></div><br/>
</div>
<!-- warning for using previous data from stored cookies -->
<div id="restartPrompt" class="alert alert-waning fade in" ng-show="view.storedDataPrompt == true">
<p><strong>Hi Win!</strong> You are working with the previous experiment that was auto-saved before you closed the window. <br/><br/>
To begin a new experiment with a different receptor-ligand pair, click <strong>'Restart'</strong>, otherwise, click <strong>'Continue'</strong>. <br/><br/>
Note that if you dismiss this window you will not be able to return to this enzyme/experiment and results relating to this experiment will be deleted. So think carefully...<p><br/>
<div class="text-center">
<button ng-click="view.continueSaved()">Continue</button>
<button ng-click="view.restartExperiment()">Restart</button>
</div>
</div>
<!-- 0.2. system_model -->
<div class = "control-interface">
<div class="system">
<h1>System Model</h1>
<!-- a) tRC-->
<div>total receptor conc (uM) = {{view.system.tRC | uM_Filter}}</div><br/>
<!-- b) Kd -->
<div>Kd (uM) = {{view.system.Kd | uM_Filter}}</div><br/>
<!-- c) kOff -->
<div>kOff (s<sup>-1</sup>) = {{view.system.kOff}}</div><br/>
<!-- d) kOn -->
<div>kOn (M<sup>-1</sup> s<sup>-1</sup>) = {{view.system.kOn}}</div><br/>
<!-- e) mwL -->
<div>mol weight ligand (g/mol) = {{view.system.mwL | mwFilter}}</div><br/>
<!-- f) mwR -->
<div>mol weight receptor (g/mol) = {{view.system.mwR | mwFilter}}</div><br/>
<!-- g) mwP -->
<div>mol weight complex (g/mol) = {{view.system.mwLR | mwFilter}}</div><br/>
<!-- h) vol -->
<div>volume in SPR chip (dm<sup>3</sup>) = {{view.vol}}</div><br/>
<!-- i) RPUM -->
<div>response per unit mass (g<sup>-1</sup>) = {{view.RPUM}}</div><br/>
<!-- j) RU Max R -->
<div>RU max R = {{view.system.RU0}}</div><br/>
<!-- k) RU Max L -->
<div>RU max L = {{view.system.RU_MaxL}}</div><br/>
<!-- l) RU Max LR -->
<div>RU max LR = {{view.system.RU_MaxLR}}</div><br/>
</div>
<!-- 0.3. ouput_model -->
<div class="output">
<h1>Output Model</h1>
<!-- a) combined form for input: fLC, timeOn, timeOff -->
<div class="form">
<!-- i) fLC -->
<form novalidate name="fLC_Form">
free ligand concentration<br/><input name="fLC" type="number" min="1" ng-model="input_fLC" required>
</form>
<!-- changing input units -->
<button ng-click="view.magnitude_mM()" ng-disabled="view.output.magnitudeAdjust == 1000">mM</button>
<button ng-click="view.magnitude_uM()" ng-disabled="view.output.magnitudeAdjust == 1000000">uM</button>
<button ng-click="view.magnitude_nM()" ng-disabled="view.output.magnitudeAdjust == 1000000000">nM</button><br/>
<div ng-show="fLC_Form.fLC.$dirty && fLC_Form.fLC.$invalid">Must be a number equal or more than 1</div><br/>
<!-- ii) timeOn -->
<form novalidate name="timeOn_Form">
association experiment time (s) <br/><input name="timeOn" type="number" min="0.5" ng-model="input_timeOn" required>
</form><br/>
<div ng-show="timeOn_Form.timeOn.$dirty && timeOn_Form.timeOn.$invalid">Must be a number between 0.5 and 900</div><br/>
<!-- iii) "setup experiment" button-->
<button ng-click="view.setup()" ng-disabled="view.experiment.timeOfDay !== view.experiment.startOfDay || (view.experiment.daysLeft == 0 && view.experiment.timeOfDay !== 9)">setup</button>
<!-- iv) "setting background value" button -->
<button ng-click="view.set_background()" ng-disabled="fLC_Form.fLC.$invalid || timeOn_Form.timeOn.$invalid || timeOff_Form.timeOff.$invalid || view.isDisabled_background == true || view.output.RU_On_Output.length == 0 || view.output.fLC[view.output.fLC.length-1] !== 0">set background</button>
<!-- v) "run experiment" button -->
<button ng-click="view.runExperiment(input_fLC, input_timeOn, input_timeOff)" ng-disabled="fLC_Form.fLC.$invalid || timeOn_Form.timeOn.$invalid || timeOff_Form.timeOff.$invalid || view.experiment.timeOfDay == view.experiment.startOfDay || view.experiment.timeOfDay == view.experiment.startOfLunch || view.experiment.timeOfDay == view.experiment.startOfDinner || view.experiment.timeOfDay == view.experiment.startOfNight || view.experiment.timeOfDay == view.experiment.endOfDay || view.isDisabled_run == true">run experiment</button>
<!-- vi) "washing up" button -->
<button ng-click="view.washUp(input_timeOn)" ng-disabled="view.isDisabled_wash == true">wash-up</button>
<!-- vii) "eat" button -->
<button ng-click="view.eat()" ng-disabled="view.experiment.timeOfDay !== view.experiment.startOfLunch && view.experiment.timeOfDay !== view.experiment.startOfDinner && view.experiment.timeOfDay !== view.experiment.startOfNight">eat</button>
<!-- viii) "go home" button -->
<button ng-click="view.goHome()" ng-disabled="view.experiment.timeOfDay == view.experiment.startOfDay || view.experiment.daysLeft == 0">home</button>
<!-- "clear graph" button -->
<button ng-click="view.clearChart()" ng-disabled="view.output.RU_CompiledLabelPlotAll.length == 0">clear chart</button>
<!-- ix) "restart" button -->
<button ng-click="view.restart()" ng-disabled="view.experiment.timeOfDay == view.experiment.startOfDay && view.experiment.daysLeft == view.experiment.daysAllowed">restart</button>
<!-- x) experiment finishes reminder -->
<div ng-show="view.experiment.daysLeft == 0 && view.experiment.timeOfDay == view.experiment.endOfDay">No more trials left! Restart!</div><br/>
<!-- xi) background invalid reminder -->
</div><br/>
<!-- b) set background -->
<div>Set Background = {{view.backgroundSet}}</div><br/>
<div ng-show="view.isDisabled_background == false && view.experiment.timeOfDay !== 9.0">Please set background before continue; <br/>
Please run fLC = 0 nM to set background</div><br/>
<!-- c) fLC input -->
<div ng-repeat="fLC_input in view.output.fLC track by $index">fLC input (uM) = {{fLC_input}}</div>
<!-- d) time on input -->
<div ng-repeat="timeOn_input in view.output.timeOn track by $index">timeOn output (s) = {{timeOn_input}}</div>
<!-- e) RU_On output -->
<div ng-repeat="RU_on_Output in view.output.RU_On_Output track by $index">RU on output (s) = {{RU_on_Output}}</div>
</div>
<!-- 0.4. experiment_model -->
<div class="experiment">
<h1>Experiment Status</h1>
<!-- i. Showing value of all constants defined -->
<div>Start of Day (time) = {{view.experiment.startOfDay}}</div><br/>
<div>Start of Lunch (time) = {{view.experiment.startOfLunch}}</div><br/>
<div>Start of Dinner (time) = {{view.experiment.startOfDinner}}</div><br/>
<div>Start of Night (time) = {{view.experiment.startOfNight}}</div><br/>
<div>End of Day (time) = {{view.experiment.endOfDay}}</div><br/>
<div>Time per Run (time) = {{view.experiment.timePerRun}}</div><br/>
<!-- ii. Steps Taken -->
<div>Steps Taken = {{view.experiment.steps}}</div><br/>
<!-- iii. Days Left -->
<div>Days Left (days) = {{view.experiment.daysLeft}}</div><br/>
<!-- iv. Time of Day -->
<div>Time of Day (time) = {{view.experiment.timeOfDay | timeFilter}}</div><br/>
</div>
</div>
<!-- Bootstrap column position: centre full -->
<!-- 1. Top Box -->
<!-- heading text only: SURFACE PLASMON RESONANCE -->
<!-- Ligand ID -->
<!-- text only -->
<!-- Menu Bar -->
<!-- ngcontroller hover over drop down menu -->
<!-- for extension of functionality -->
<!-- Cookies Autosave reload -->
<!-- text warning -->
<!-- button ng-click to load or restart -->
<!-- ng-controllers: auto prompt to load save -->
<!-- Bootstrap column position: centre left -->
<!-- 2. Output -->
<!-- heading text only-->
<!-- Mode A - Sensorgram: Graph of Resonance (RU) vs Time (s) -->
<!-- graph element -->
<!-- ng-controller plot sensorgram graph -->
<!-- services: model -->
<!-- Mode A - Result Box: Precision -->
<!-- text only -->
<!-- Mode B - Langmuir Isotherm: Graph of Resonance at Equilibrium (RU) vs [Free Ligand] (M) -->
<!-- graph element -->
<!-- ng-controller plot Langmuir graph -->
<!-- services: generated data -->
<!-- Mode B - Result Box: Kd value -->
<!-- text only -->
<!-- 3. Results -->
<!-- heading text only -->
<!-- Buttons-->
<!-- Precision -->
<!-- button ng-click -->
<!-- ng-controller: precision calculation -->
<!-- services: simple statitics -->
<!-- Sensorgram -->
<!-- button ng-click -->
<!-- ng-controller: plot sensorgram graph -->
<!-- Langmuir Isotherm -->
<!-- button ng-click -->
<!-- ng-controller: plot Langmuir graph -->
<!-- Table data display -->
<!-- directives: ng-grid -->
<!-- ng-click controller: select -->
<!-- No. -->
<!-- text only -->
<!-- Time (s) -->
<!-- text only -->
<!-- Free [Ligand] (M) -->
<!-- text only -->
<!-- Max Resonance @ on (RU) -->
<!-- text only -->
<!-- koff (s^-1) -->
<!-- text only -->
<!-- Bootstrap column position: centre right -->
<!-- 4. Status -->
<!-- heading text only -->
<!-- Days Left -->
<!-- text only -->
<!-- text box display; directives: warning 1 -->
<!-- Time of Day -->
<!-- text only -->
<!-- text box display; directives: warning 2 -->
<!-- Steps Taken -->
<!-- text only -->
<!-- text box display; directives: warning 3 -->
<!-- 5. Control Panel -->
<!-- heading text only -->
<!-- Buttons -->
<!-- Setup -->
<!-- button ng-click -->
<!-- ng-controller: setup -->
<!-- Run -->
<!-- button ng-click -->
<!-- ng-controller: run -->
<!-- Eat -->
<!-- button ng-click -->
<!-- ng-controller: eat -->
<!-- Home -->
<!-- button ng-click -->
<!-- ng-controller: home -->
<!-- Association Time (s) -->
<!-- text only -->
<!-- text box form -->
<!-- Disassociation Time (s) -->
<!-- text only -->
<!-- text box form -->
<!-- Free [Ligand] (M) -->
<!-- text only -->
<!-- text box form -->
<!-- 6. Data Display -->
<!-- heading text only -->
<!-- Buttons -->
<!-- Zero -->
<!-- button ng-click -->
<!-- ng-controller: zero -->
<!-- Outlier -->
<!-- button ng-click -->
<!-- ng-controller: outlier -->
<!-- Select All -->
<!-- button ng-click -->
<!-- ng-controller: select all -->
<!-- Excel Export -->
<!-- button ng-click -->
<!-- ng-controller: excell export -->
<!-- 7. Credits -->
<!-- text only -->
</body>
</html>