-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathindex.html
More file actions
392 lines (363 loc) · 18.7 KB
/
index.html
File metadata and controls
392 lines (363 loc) · 18.7 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>WebGen | explore cancer data from The Cancer Genome Atlas</title>
<!-- Critical resources are loaded early. Non-critical resources are deferred. -->
<!-- jquery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<!-- materialize -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css" />
<!-- Jonas's FireBrowse library -->
<script src="https://episphere.github.io/firebrowse/firebrowse.js" defer></script>
<!-- hclust for clustering -->
<script src="../js/libraries/hclust.min.js" defer></script>
<!-- Select2 -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.js" defer></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/select2/3.5.4/select2.min.css" />
<!-- lodash for pagination -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js" defer></script>
<!-- d3 -->
<script src="https://d3js.org/d3.v4.min.js" defer></script>
<!-- plotly -->
<script src="https://cdn.plot.ly/plotly-2.5.0.min.js" defer></script>
<!-- webgen styles and javascript -->
<link rel="stylesheet" type="text/css" href="../css/style.css" />
<script src="../js/fillSelectBoxes.js"></script>
<script src="../js/dataAcquisition/fetchClinicalData.js" defer></script>
<script src="../js/dataAcquisition/fetchExpressionData.js" defer></script>
<script src="../js/dataAcquisition/getClinicalDataJSONarray.js" defer></script>
<script src="../js/dataAcquisition/getDataFromSelectedPieSectors.js" defer></script>
<script src="../js/dataAcquisition/getExpressionDataJSONarray.js" defer></script>
<script src="../js/dataProcessing/mergeExpression.js" defer></script>
<script src="../js/plots/createHeatmap.js" defer></script>
<script src="../js/plots/createViolinPlot.js" defer></script>
<script src="../js/afterSubmit.js" defer></script>
<!-- tutorial dependencies -->
<link rel="stylesheet" href="https://unpkg.com/intro.js/minified/introjs.min.css">
<script src="https://unpkg.com/intro.js/minified/intro.min.js" defer></script>
<script src="../js/tutorial.js" defer></script>
</head>
<body>
<div id="page-container">
<div id="content-wrap">
<!--
Set up the navbar:
-->
<div class="navbar-fixed">
<nav>
<div class="nav-wrapper">
<a href="index.html" style="font-style: italic" class="brand-logo center">WebGen</a>
<ul id="nav-mobile" class="right hide-on-med-and-down">
<li><a id="tutorialAnchor" onclick="startTutorial()">Tutorial</a></li>
<li class="active"><a href="about.html">About</a></li>
</ul>
<!-- <ul id="nav-mobile" class="right hide-on-med-and-down">
<li class="active"><a href="image.html">Image</a></li>
</ul> -->
</div>
</nav>
</div>
<!--
Set up subtitles
-->
<div>
<br />
<br />
<h5 style="text-align: center; font-style: italic; font-family: Georgia, 'Times New Roman', Times, serif">
A tool for exploring cancer data from The Cancer Genome Atlas
</h5>
<p style="text-align: center; font-family: Georgia, 'Times New Roman', Times, serif">
Currently, this tool enables visualization of gene expression (RNA-seq) data from primary solid tumor
samples via heatmap and violin plot.
</p>
<br />
</div>
<div>
<h5 style="text-align: center; color: lightcoral; font-family: Georgia, 'Times New Roman', Times, serif">
<strong>Customize Your Cohort:</strong>
</h5>
<br />
</div>
<!--
Set up the user input text fields
-->
<script>
$(document).ready(function () {
//For Pathways Select2 Drop down:
$(".pathwayMultipleSelection").select2({
placeholder: "Pathway(s)",
});
fillPathwaySelectBox();
});
// Get the list of valid genes users can search for:
validGeneListFetch = getValidGeneList();
validGeneListFetch.then(function (validGeneList) {
$(document).ready(function () {
// For Cancer Type Select2 Drop down:
$(".cancerTypeMultipleSelection").select2({
placeholder: "Tumor Type(s)",
});
fillCancerTypeSelectBox();
// Map the array of geneList with attributes of id, text, and value
var geneListArray = _.map(_.range(0, validGeneList.length), function (i) {
return {
id: validGeneList[i],
text: validGeneList[i],
value: validGeneList[i],
};
});
// For Gene Select2 Dropdown:
var fillGeneSelectBoxes = (geneSelectionBox) => {
$(geneSelectionBox).select2({
data: geneListArray,
multiple: true,
placeholder: "Gene(s)",
// creating query with pagination functionality.
query: function (data) {
var pageSize,
dataset,
thatQuery = this;
pageSize = 5; // Number of the option loads at a time
results = [];
if (data.term && data.term !== "") {
// HEADS UP; for the _.filter function I use underscore (actually lo-dash) here
results = _.filter(thatQuery.data, function (e) {
return e.text.toUpperCase().indexOf(data.term.toUpperCase()) >= 0;
});
} else {
results = thatQuery.data;
}
data.callback({
results: results.slice((data.page - 1) * pageSize, data.page * pageSize),
more: results.length >= data.page * pageSize,
});
},
});
};
fillGeneSelectBoxes(".geneOneMultipleSelection");
fillGeneSelectBoxes(".geneTwoMultipleSelection");
// For Clinical feature Select2 Drop down:
$(".clinicalMultipleSelection").select2({
placeholder: "Clinical Feature(s)",
});
});
});
</script>
<div id="tumorSelectorArea">
<p style="text-align: center"><b>1) Select tumor type(s)</b></p>
<div id="cancerQuerySelectBox">
<select
style="width: 80%"
class="cancerTypeMultipleSelection"
name="cancerTypes[]"
multiple="multiple"
id="cancerTypeMultipleSelection"
onchange="fillClinicalSelectBox(), displayNumberSamples(), saveInLocalStorage()"
>
<!-- Filled by fillSelectBoxes.js -->
</select>
</div>
</div>
<div class="row">
<p style="text-align: center">
<b>2) Filter data by gene mutation signature and/or by metadata</b>
</p>
<div id="geneOneQuerySelectBox" class="col s6">
<input
style="width: 80%"
class="geneOneMultipleSelection"
name="selectedMutations[]"
multiple="multiple"
id="geneOneMultipleSelection"
onchange="buildDataExplorePlots(allClinicalData), saveInLocalStorage()"
/>
<!-- Filled by fillSelectBoxes.js -->
</div>
<div id="clinicalQuerySelectBox" class="col s6">
<select
style="width: 80%"
class="clinicalMultipleSelection"
name="selectedClinicals[]"
multiple="multiple"
id="clinicalMultipleSelection"
onchange="buildDataExplorePlots(allClinicalData), saveInLocalStorage()"
>
<!-- Filled by fillSelectBoxes.js -->
</select>
</div>
</div>
<!-- <div>
<p style="text-align: center;"><b>3) Click pie sectors to define gene types </b></p>
<p style="text-align: center; color: gray">Hint 1: Click items in legend to change view of plot</p>
<p style="text-align: center; color: gray">Hint 2: In plot, click on wild-type or mutated genes that you would like to visualize. Selected data will be highlighted <b><span style="color: orange">yelllow</span></b>.</p>
</div> -->
<!--
Data exploration div
-->
<div class="row" id="dataexploration">
<script type="text/javascript" src="../js/plots/createPieCharts.js"></script>
</div>
<div id="numIntersectedBarcodesDiv"></div>
<br />
<div>
<h5 style="text-align: center; color: lightcoral; font-family: Georgia, 'Times New Roman', Times, serif">
<strong>Explore Your Cohort:</strong>
</h5>
<br />
</div>
<div class="row">
<p style="text-align: center">
<b>3) Select genes and/or pathways that you would like to visualize</b>
</p>
<div id="geneTwoQuerySelectBox" class="col s6">
<input
style="width: 80%"
class="geneTwoMultipleSelection"
name="genes[]"
multiple="multiple"
id="geneTwoMultipleSelection"
onchange="saveInLocalStorage()"
/>
<!-- Filled by fillSelectBoxes.js -->
</div>
<div>
<div id="pathwaySelectBox" class="col s6">
<select
style="width: 80%"
class="pathwayMultipleSelection"
name="pathways[]"
multiple="multiple"
id="pathwayMultipleSelection"
>
<!-- Filled by fillSelectBoxes.js -->
</select>
</div>
</div>
</div>
<br />
<!--
Setting up the buttons.
-->
<div className="mainWindowButtons" id="mainWindowButtons">
<!-- <button class="col s3 btn waves-effect waves-light" onclick="setExampleVars()" id='exampleButton'>Use Example</button> -->
<button class="col s3 btn waves-effect waves-light" onclick="buildPlots()" id="submitButton">Submit</button>
</div>
<!--
Space for download data buttons.
-->
<div className="downloadDataButtons" id="downloadDataButtons">
<h5 style="text-align: center; color: lightcoral; font-family: Georgia, 'Times New Roman', Times, serif">
<strong>Download Data:</strong>
</h5>
<table id="buttonTable">
<tr>
<td><button class="col s3 btn waves-effect waves-light" id="downloadAllButton">
All Data (JSON)
</button></td>
<td><button class="col s3 btn waves-effect waves-light" id="downloadExpressionZscoreButton">
Expression Z-Score (CSV)
</button></td>
<td><button class="col s3 btn waves-effect waves-light" id="downloadExpressionLog2Button">
Expression Log2 (CSV)
</button></td>
<td><button class="col s3 btn waves-effect waves-light" id="downloadClinicalButton">
Clinical Data (CSV)
</button></td>
</tr>
</table>
</div>
<!--
Setting up the tabs.
-->
<div>
<div class="col s36">
<ul class="tabs tabs-fixed-width tab-demo z-depth-1" style="display: none;">
<li class="tab col s12">
<a class="active" href="#heatmapRef">Heatmap</a>
</li>
<li class="tab col s12">
<a href="#violinPlotRef">Violin Plot</a>
</li>
</ul>
<!--
Setting up the plots to go under each tab.
-->
<div id="heatmapRef" class="col s12">
<div id="heatmapLoaderDiv" style="margin-top: 25px" align="center"></div>
</div>
<div id="violinPlotRef" class="col s12">
<div id="violinLoaderDiv" style="margin-top: 25px" align="center"></div>
</div>
</div>
</div>
<div id="sorryDiv"></div>
<!--
Setting tabs:
-->
<script>
var elem = document.querySelector(".tabs");
var options = {};
var instance = M.Tabs.init(elem, options);
</script>
</div>
<br />
<br />
<br />
<br />
<!--
Footer:
-->
<footer class="page-footer" id="footer">
<div class="container">
<div class="row">
<div class="col s12 m4 l8">
<h7 class="white-text">LINKS</h7>
<ul>
<li>
<a target="_blank" rel="noopener" class="grey-text text-lighten-3" href="https://github.com/web4bio/webgen"
>GitHub</a
>
</li>
<li>
<a target="_blank" rel="noopener" class="grey-text text-lighten-3" href="http://firebrowse.org/api-docs/"
>Firebrowse API</a
>
</li>
<li>
<a target="_blank" rel="noopener" class="grey-text text-lighten-3" href="https://gdc.cancer.gov/"
>NCI Genomic Data Commons</a
>
</li>
<li>
<a
target="_blank"
rel="noopener"
class="grey-text text-lighten-3"
href="https://www.stonybrook.edu/commcms/vertically-integrated-projects/teams/_team_page/team_page.php?team=WebGen%20(Web%20Genomics)"
>Stony Brook University VIP</a
>
</li>
</ul>
</div>
<div class="col s12 m6 l3">
<h7 class="white-text">CONTACT</h7>
<ul>
<li>
<a class="grey-text text-lighten-3">richard.moffitt@stonybrookmedicine.edu</a>
</li>
</ul>
</div>
</div>
</div>
<div class="footer-copyright">
<div class="container">
<div class="center-align">WebGen 2020</div>
</div>
</div>
</footer>
</div>
</body>
</html>