-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathKEA2.html
746 lines (657 loc) · 37.4 KB
/
KEA2.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
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
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-7ETP8E6M3Y"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-7ETP8E6M3Y');
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.3.0/papaparse.min.js"></script>
<script src="https://d3js.org/d3.v3.js" charset="utf-8"></script>
<script src="backendApi/plumber_api.js"></script>
<meta charset="utf-8">
<title>fast Kinase-Substrate Enrichment Analysis</title>
<link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" integrity="sha512-PpVBp3Ztsn5pe4y8IeNiS+DZl5klA8ufhOLWhT9KaYJ8tWAyxlLFZzvAr2D5nlJdyv6JvLSZv34zBSi2J4nH/w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.bundle.min.js"></script>
<script src="js/upload.js"></script>
<style type="text/css">
body {
margin: 0;
}
iframe {
display: block;
background: rgb(255, 255, 255);
border: none;
height: 100vh;
width: 100vw;
background:url("https://i.hizliresim.com/gueeapo.gif") center center no-repeat;
}
@font-face {
font-family: "helveticaBold";
src: url("fonts/helvetica-bold-webfont.woff") format("woff");
}
/* Center the spinner */
.spinner-container {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 9999; /* Ensure it's above other content */
}
/* Custom margin-top in percentage */
.custom-mt {
margin-top: 50%; /* Adjust the percentage as needed */
}
.zero-padding {
padding: 0;
}
.zero-margin {
margin: 0
}
tr.odd, tr.even {
border-top: 1px solid #dddddd; /* Add top border */
border-bottom: 1px solid #dddddd; /* Add bottom border */
}
tr.even:hover {
background-color: #f2f2f2; /* Change background color on hover */
}
tr.odd {
background-color: #f2f2f2; /* Change background color on hover */
}
.btn {
border: 1px solid rgba(0, 0, 0, 0.1); /* Very light black boundary */
background-color: #f2f2f2; /* Grey color */
color: #333; /* Text color */
/* padding: 8px; */
border-radius: 4px; /* Rounded corners */
cursor: pointer; /* Cursor style */
}
/* html, body {
height: 100%;
}
body {
align-items: center;
background-color: #1D1F20;
display: flex;
justify-content: center;
} */
.overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black background */
display: flex;
justify-content: center;
align-items: center;
z-index: 999; /* Ensure the overlay is above other content */
display: none;
}
.loader {
display: block;
animation: rotate 1.5s infinite;
height: 50px;
width: 50px;
justify-content: center;
}
.loader:before,
.loader:after {
border-radius: 50%;
content: '';
display: block;
height: 20px;
width: 20px;
}
.loader:before {
animation: ball1 1s infinite;
background-color: #cb2025;
box-shadow: 30px 0 0 #f8b334;
margin-bottom: 10px;
}
.loader:after {
animation: ball2 1s infinite;
background-color: #00a096;
box-shadow: 30px 0 0 #97bf0d;
}
@keyframes rotate {
0% {
-webkit-transform: rotate(0deg) scale(0.8);
-moz-transform: rotate(0deg) scale(0.8);
}
50% {
-webkit-transform: rotate(360deg) scale(1.2);
-moz-transform: rotate(360deg) scale(1.2);
}
100% {
-webkit-transform: rotate(720deg) scale(0.8);
-moz-transform: rotate(720deg) scale(0.8);
}
}
@keyframes ball1 {
0% {
box-shadow: 30px 0 0 #f8b334;
}
50% {
box-shadow: 0 0 0 #f8b334;
margin-bottom: 0;
-webkit-transform: translate(15px,15px);
-moz-transform: translate(15px, 15px);
}
100% {
box-shadow: 30px 0 0 #f8b334;
margin-bottom: 10px;
}
}
@keyframes ball2 {
0% {
box-shadow: 30px 0 0 #97bf0d;
}
50% {
box-shadow: 0 0 0 #97bf0d;
margin-top: -20px;
-webkit-transform: translate(15px,15px);
-moz-transform: translate(15px, 15px);
}
100% {
box-shadow: 30px 0 0 #97bf0d;
margin-top: 0;
}
}
</style>
</head>
<body>
<!-- <div>
<svg version="1.1" id="Layer_1" onclick="window.location.href = 'index.html'" xmlns="http://www.w3.org/2000/svg" width = "10%" style="top:2%;left:1%;position:absolute;cursor: pointer;" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 710.3 222.4" xml:space="preserve"> <style type="text/css"> .st0b{fill:#424A60;} .st1b{fill:#DC298D;} .st2b{fill:#7383BF;} .st3b{fill:#969696;} .st4b{fill:#EBBA16;} .st5b{fill:#06ABEB;} .st6b{font-family:'helveticaBold';} .st7b{font-size:84.3397px;} .st8b{letter-spacing:-1;} </style> <g id="Layer_1_00000056390415183483724190000009750584087129516189_"> <g id="path5"> <rect x="92.8" y="154.2" transform="matrix(0.3589 -0.9334 0.9334 0.3589 -62.6169 220.6174)" class="st0b" width="72.9" height="3.3"/> </g> <rect id="path4" x="156.9" y="60.1" transform="matrix(0.8102 -0.5861 0.5861 0.8102 0.7614 131.2305)" class="st0b" width="92.3" height="8.7"/> <g id="path3"> <rect x="19" y="127.2" transform="matrix(0.9138 -0.4063 0.4063 0.9138 -46.9835 44.8278)" class="st0b" width="126.2" height="11.8"/> </g> <g id="path2"> <rect x="122.6" y="16.9" transform="matrix(0.9138 -0.4063 0.4063 0.9138 -9.3065 55.4032)" class="st0b" width="6.4" height="65.4"/> </g> <rect id="path1" x="169" y="110.3" transform="matrix(0.9138 -0.4063 0.4063 0.9138 -48.6296 83.9257)" class="st0b" width="8.7" height="92.3"/> <circle id="circle6" class="st1b" cx="249.7" cy="34.5" r="21.8"/> <circle id="circle5" class="st2b" cx="112.1" cy="200.6" r="21.8"/> <circle id="circle4" class="st1b" cx="21.8" cy="156.5" r="21.8"/> <circle id="circle3" class="st3b" cx="109.6" cy="13.1" r="13.1"/> <circle id="circle2" class="st4b" cx="189.6" cy="193.1" r="13.1"/> <circle id="circle1" class="st5b" cx="149.5" cy="102.8" r="37.3"/> </g> <g id="Layer_2_00000013871697503241264390000008040421359665832584_"> <text transform="matrix(1 -3.490651e-03 3.490651e-03 1 243.0089 140.7256)" class="st6b st7b">PhosNet</text> <text transform="matrix(1 -3.490651e-03 3.490651e-03 1 585.1035 139.5315)" class="st6b st7b st8b">V</text> <text transform="matrix(1 -3.490651e-03 3.490651e-03 1 639.8698 139.3403)" class="st6b st7b">is</text> </g> </svg>
</div> -->
<!-- <script src="js/upload.js"></script> -->
<!-- <div> -->
<!-- <svg xmlns="http://www.w3.org/2000/svg" onclick="window.location.href = 'index.html'" width = "200px" style="top:2%;left:1%;position:absolute;cursor: pointer;" viewBox="0 0 1825.27 541.31"><g id="Layer_1"><g id="path5"><rect x="180.02" y="297.98" width="136.46" height="2.72" transform="translate(-120.24 423.61) rotate(-68.97)" style="fill:#424a60;"/></g><rect id="path4" x="301.21" y="115.36" width="177.31" height="16.72" transform="translate(1.47 251.98) rotate(-35.88)" style="fill:#424a60;"/><g id="path3"><rect x="35.42" y="243.17" width="244.41" height="24.72" transform="translate(-90.21 86.06) rotate(-23.97)" style="fill:#424a60;"/></g><g id="path2"><rect x="236.27" y="33.28" width="10.72" height="124.03" transform="translate(-17.88 106.37) rotate(-23.97)" style="fill:#424a60;"/></g><rect id="path1" x="324.5" y="211.86" width="16.72" height="177.31" transform="translate(-93.37 161.12) rotate(-23.97)" style="fill:#424a60;"/><circle id="circle6" cx="479.52" cy="66.16" r="41.79" style="fill:#dc298d;"/><circle id="circle5" cx="215.25" cy="385.15" r="41.79" style="fill:#7383bf;"/><circle id="circle4" cx="41.8" cy="300.55" r="41.79" style="fill:#dc298d;"/><circle id="circle3" cx="210.42" cy="25.08" r="25.08" style="fill:#969696;"/><circle id="circle2" cx="364.07" cy="370.74" r="25.08" style="fill:#ebba16;"/><circle id="circle1" cx="286.99" cy="197.33" r="71.54" style="fill:#06abeb;"/></g><g id="Layer_2"><text id="phostype" transform="translate(404.28 257.57) rotate(-.2)" style="font-family:helveticaBold, Helvetica; font-size:156.77px;"><tspan x="0" y="0">Kinase Enrichment</tspan><tspan x="387.59" y="208.34">Analysis</tspan></text></g></svg> -->
<!-- <svg id="mySVG" xmlns="http://www.w3.org/2000/svg" width="300px" style="top:2%;left:1%;position:absolute;cursor: pointer;" viewBox="0 0 1825.27 541.31">
<g id="Layer_1">
<g id="path5">
<rect x="180.02" y="297.98" width="136.46" height="2.72" transform="translate(-120.24 423.61) rotate(-68.97)" style="fill:#424a60;"/>
</g>
<rect id="path4" x="301.21" y="115.36" width="177.31" height="16.72" transform="translate(1.47 251.98) rotate(-35.88)" style="fill:#424a60;"/>
<g id="path3">
<rect x="35.42" y="243.17" width="244.41" height="24.72" transform="translate(-90.21 86.06) rotate(-23.97)" style="fill:#424a60;"/>
</g>
<g id="path2">
<rect x="236.27" y="33.28" width="10.72" height="124.03" transform="translate(-17.88 106.37) rotate(-23.97)" style="fill:#424a60;"/>
</g>
<rect id="path1" x="324.5" y="211.86" width="16.72" height="177.31" transform="translate(-93.37 161.12) rotate(-23.97)" style="fill:#424a60;"/>
<circle id="circle6" cx="479.52" cy="66.16" r="41.79" style="fill:#dc298d;"/>
<circle id="circle5" cx="215.25" cy="385.15" r="41.79" style="fill:#7383bf;"/>
<circle id="circle4" cx="41.8" cy="300.55" r="41.79" style="fill:#dc298d;"/>
<circle id="circle3" cx="210.42" cy="25.08" r="25.08" style="fill:#969696;"/>
<circle id="circle2" cx="364.07" cy="370.74" r="25.08" style="fill:#ebba16;"/>
<circle id="circle1" cx="286.99" cy="197.33" r="71.54" style="fill:#06abeb;"/>
</g>
<g id="Layer_2" transform="translate(400, 200)">
<text id="phostype" style="font-family:helveticaBold, Helvetica; font-size:100px;">
<tspan x="0" y="50">Fast Kinase-Substrate</tspan>
<tspan x="40" y="150">Enrichment Analysis</tspan>
</text>
</g>
</svg>
</div> -->
<!-- <div class="spinner-container" id="spinner-container" style="display: none;">
<div class="spinner-border text-primary" role="status">
<span class="sr-only">Loading...</span>
</div>
</div> -->
<div class="content-wrapper" style="min-height: 920px;">
<section class="content">
<div class="row" style="font-family:Helvetica; margin-top: 15px;">
<div class="col-sm-2">
<svg onclick="window.location.href = 'index.html'" xmlns="http://www.w3.org/2000/svg" width="95%" style="top:2%;left:10%;position:absolute;cursor: pointer;" viewBox="0 0 1825.27 541.31">
<g id="Layer_1">
<g id="path5">
<rect x="180.02" y="297.98" width="136.46" height="2.72" transform="translate(-120.24 423.61) rotate(-68.97)" style="fill:#424a60;"/>
</g>
<rect id="path4" x="301.21" y="115.36" width="177.31" height="16.72" transform="translate(1.47 251.98) rotate(-35.88)" style="fill:#424a60;"/>
<g id="path3">
<rect x="35.42" y="243.17" width="244.41" height="24.72" transform="translate(-90.21 86.06) rotate(-23.97)" style="fill:#424a60;"/>
</g>
<g id="path2">
<rect x="236.27" y="33.28" width="10.72" height="124.03" transform="translate(-17.88 106.37) rotate(-23.97)" style="fill:#424a60;"/>
</g>
<rect id="path1" x="324.5" y="211.86" width="16.72" height="177.31" transform="translate(-93.37 161.12) rotate(-23.97)" style="fill:#424a60;"/>
<circle id="circle6" cx="479.52" cy="66.16" r="41.79" style="fill:#dc298d;"/>
<circle id="circle5" cx="215.25" cy="385.15" r="41.79" style="fill:#7383bf;"/>
<circle id="circle4" cx="41.8" cy="300.55" r="41.79" style="fill:#dc298d;"/>
<circle id="circle3" cx="210.42" cy="25.08" r="25.08" style="fill:#969696;"/>
<circle id="circle2" cx="364.07" cy="370.74" r="25.08" style="fill:#ebba16;"/>
<circle id="circle1" cx="286.99" cy="197.33" r="71.54" style="fill:#06abeb;"/>
</g>
<g id="Layer_2" transform="translate(400, 200)">
<text id="phostype" style="font-family:helveticaBold, Helvetica; font-size:100px;">
<tspan x="0" y="50">Fast Kinase-Substrate</tspan>
<tspan x="40" y="150">Enrichment Analysis</tspan>
</text>
</g>
</svg>
</div>
<div class="col-sm-8">
<h1 style="margin-top:7px;margin-bottom:20px;font-family:Helvetica; font-size:18px">
<b>Welcome!</b>
Here you can perform fast kinase-substrate enrichment analysis (fKSEA) to identify putative upstream kinases of your differentially phosphorylated protein set. Kinase-substrate interactions are from PhosphoSitePlus [1] and enrichment is performed using fgsea [2].
<br>
<h style="font-size:13px;margin-top:-5px;">
<p style="margin-bottom:0px;margin-top: 5px;">[1] Retrieved from <a href="https://www.phosphosite.org" target="_blank">phosphosite.org</a> - version Thu Oct 17 11:21:06 EDT 2024</p>
<p>[2] Korotkevich G, Sukhov V, Sergushichev A (2019). “Fast gene set enrichment analysis.” bioRxiv. <a href="https://www.biorxiv.org/content/10.1101/060012v3" target="_blank">doi: 10.1101/060012</a> - version 1.18.0 </p>
</h>
</h1>
<h style="font-size:13px;margin-top:-5px;">
<p>Alternatively, you can use other kinase enrichment analysis tools, and then use our network visualization page to visualize their KSI results. For users interested in alternative methods, visit our <a href="https://gumuslab.github.io/phosnetvis-docs/docs/FAQ.html" target="_blank">tutorial page</a> for links and guidance on other popular resources.</p>
</h>
<div style="margin-bottom: 10px;">
<div class="card bs4Dash card-gray">
<div class="card-header" style="height:30px; display:flex; align-items: center; background-color: #606060; color: white;">
<h5 class="card-title zero-padding zero-margin" style="font-weight: bold;">Input File Format</h5>
</div>
<div class="card-body">
<h6 style="font-size:15px;margin-top:0px;">
Upload a .csv file in the format below for enrichment and then to build your interactive 3D phosphoproteomics network!
<!-- <b>*optional</b> -->
</h6>
<div class="container-fluid" style="height: 130px; overflow-y: scroll; overflow-x: scroll; margin-top:10px;">
<table class="display dataTable no-footer" id="DataTables_Table_0" style="width:100%; height:100%; text-align: center;">
<thead>
<tr>
<th style="width: 25%;">ProteinAccession<br><span style="color:#c60000; font-size:13px; position:relative; top:-5px;">(Required)</span></th>
<th style="width: 25%;">log2FC<br><span style="color:#c60000; font-size:13px; position:relative; top:-5px;">(Required)</span></th>
<th style="width: 25%;">PhosphoSiteID<br><span style="color:#5e6365; font-size:13px; position:relative; top:-5px; font-weight:300;">(PhosphositePlusID or Residue ID)(Optional)</span></th>
<th style="width: 25%;">pValue<br><span style="color:#5e6365; font-size:13px; position:relative; top:-5px; font-weight:300;">(Optional)</span></th>
<!--
<th class="dt-center sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="ProteinAccession: activate to sort column ascending">ProteinAccession</th>
<th class="dt-center sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="PhosphoSiteID*: activate to sort column ascending">PhosphoSiteID*</th>
<th class="dt-center sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="log2FC: activate to sort column ascending">log2FC</th>
<th class="dt-center sorting" tabindex="0" aria-controls="DataTables_Table_0" rowspan="1" colspan="1" aria-label="pValue*: activate to sort column ascending">pValue*</th> -->
</tr>
</thead>
<tbody>
<!-- <tr class="odd">
<td class=" dt-center">P54646</td>
<td class=" dt-center">ph181</td>
<td class=" dt-center">1.2</td>
<td class=" dt-center">0.002</td>
</tr>
<tr class="even">
<td class=" dt-center">P54646</td>
<td class=" dt-center">ph14</td>
<td class=" dt-center">3</td>
<td class=" dt-center">0.04</td>
</tr>
<tr class="odd">
<td class=" dt-center">Q9Y243</td>
<td class=" dt-center">ph1525</td>
<td class=" dt-center">-6.55</td>
<td class=" dt-center">0.66</td>
</tr> -->
<tr class="odd">
<td class=" dt-center">P08183</td>
<td class=" dt-center">0.25</td>
<td class=" dt-center">S671</td>
<td class=" dt-center">0.66</td>
</tr>
<tr class="even">
<td class=" dt-center">P08183</td>
<td class=" dt-center">1.24</td>
<td class=" dt-center">S683</td>
<td class=" dt-center">0.015</td>
</tr>
<tr class="odd">
<td class=" dt-center">Q9UEY8</td>
<td class=" dt-center">-2.12</td>
<td class=" dt-center">S693</td>
<td class=" dt-center">0.02</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div style="margin-bottom: 10px;">
<div class="card bs4Dash card-lightblue">
<div class="card-header" style="height:30px; display:flex; align-items: center; background-color:#4682B4; color: white;">
<h5 class="card-title zero-padding zero-margin" style="font-weight: bold;">Adjust Parameters</h5>
</div>
<div class="card-body zero-margin zero-padding">
<h6 style="font-size:15px; font-weight:bold; padding: 5px;">Input / Output Parameters</h6>
<div class="row" style="margin-top:-15px;margin-left:-10px;">
<div class="col-sm-4">
<div label="Rows with greater p-values than this cutoff will be eliminated before analysis!
(if p value column does not exist in data, cutoff does not effect anything)" class="form-group hint--bottom" style="width:200px;">
<label class="control-label" id="input_pvalue-label" for="input_pvalue"><b style="font-size:13px">Input p-value cutoff</b></label>
<input id="input_pvalue" type="number" class="form-control" value="0.05" min="0" max="1" step="0.01">
</div>
</div>
<div class="col-sm-4">
<div aria-label="Kinase-substrate interactions from analysis output having greater p-values than this cutoff
will be eliminated in the phosphoproteomics network!" class="form-group" style="width:200px;">
<label class="control-label" id="output_pvalue-label" for="output_pvalue"><b style="font-size:13px">Output p-value cutoff</b></label>
<input id="output_pvalue" type="number" class="form-control" value="0.05" min="0" max="1" step="0.01">
</div>
</div>
<div class="col-sm-4">
<div aria-label="Choose the labeling method of the nodes in the network
that will be build with the analysis!" class="form-group shiny-input-container shiny-input-radiogroup shiny-input-container-inline hint--bottom shinyjs-resettable" data-shinyjs-resettable-type="RadioButtons" data-shinyjs-resettable-value="gene name">
<label class="control-label" id="nameaccession-label" for="nameaccession"><b style="font-size:13px">Output network node labels</b></label>
<br>
<div class="form-check">
<input class="form-check-input" type="radio" name="nameaccession" id="geneNameRadio" value="gene name" checked>
<label class="form-check-label mr-5" for="geneNameRadio">
gene name
</label>
<input class="form-check-input" type="radio" name="nameaccession" id="accessionIdRadio" value="accession id">
<label class="form-check-label" for="accessionIdRadio">
accession id
</label>
</div>
</div>
</div>
</div>
<hr style="margin-top:-10px">
<h6 style="font-size:15px; font-weight:bold;margin-top:-10px;margin-left:5px;">Enrichment Analysis Parameters</h6>
<div class="row" style="margin-top:-15px; margin-left:-10px;">
<div class="col-sm-4">
<div class="form-group" style="width:200px;">
<label class="control-label" id="minSize-label" for="minSize"><b style="font-size: 13px;">minSize</b></label>
<input id="minSize" type="number" class="form-control" value="15" min="0">
</div>
</div>
<div class="col-sm-4">
<div class="form-group" style="width:200px;">
<label class="control-label" id="maxSize-label" for="maxSize"><b style="font-size:13px">maxSize</b></label>
<input id="maxSize" type="number" class="form-control" value="100" min="0">
</div>
</div>
<div class="col-sm-4">
<div class="form-group" style="width:200px;">
<label class="control-label" id="eps-label" for="eps"><b style="font-size:13px">eps</b></label>
<input id="eps" type="number" class="form-control" value="0" min="0" max="1" step="1e-10">
</div>
</div>
</div>
<div class="row" style="margin-top:-10px; margin-left:5px">
<a style="font-size:12px" href="https://bioconductor.org/packages/devel/bioc/manuals/fgsea/man/fgsea.pdf" target="_blank">
<i class="far fa-circle-question" role="presentation" aria-label="circle-question icon"></i>
Click here for more information about fgsea library's analysis parameters
</a>
</div>
</div>
</div>
</div>
<div>
<div class="card bs4Dash card-pink">
<div class="card-header" style="height:30px; display:flex; align-items: center; background:#d94496; color: white;">
<h5 class="card-title zero-padding zero-margin" style="font-weight: bold;">Upload Data & Run Analysis</h5>
</div>
<div class="card-body zero-margin zero-padding">
<h6 style="font-size:15px; font-weight:bold; padding: 5px;">Upload your .csv file</h6>
<div class="row" style="margin-top:-7px; margin-left:0px;">
<div class="col-sm-4" id="upload">
<div class="custom-file">
<input type="file" id="hidden-file-upload" class="form-control" accept=".csv" />
<div class="progress" style="margin-top: 5px;display: none;" id="progress-container">
<!-- <div class="progress-bar" role="progressbar" style="width: 0%;" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" id="file-upload-progress">0%</div> -->
</div>
</div>
<button id="runOnSample" type="button" class="btn mx-auto d-block" style="margin-top: 10px;" onclick="runSample()">Run on Sample Data</button>
</div>
<div class="col-sm-2" style="padding-left:15px">
<button class="btn" id="runanalysis" type="button" style="background-color:#d94496; color:white; border-radius: 15px;" onclick="runKEA()"><b style="padding:0px; margin: 0px; font-size: 20px;">Run</b></button>
</div>
<div class="col-sm-2" id="donloadButton" style="display: none;">
<a class="btn" download="" href="" id="download" target="_blank" aria-live="polite" >
<i class="fas fa-download" role="presentation" aria-label="download icon"></i>
Download
</a>
</div>
<div class="col-sm-4" id="visualizeButton" style="display: none;">
<button class="btn" color="danger" id="gotovis" onclick="loadData()" type="button">Visualize Network ➤</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-sm-2"></div>
</div>
<div class="row" style="margin-top: 10px; text-align: center;">
<div class="col-sm-4"></div>
<div class="col-sm-1" style="margin-top: 0px;margin-right:20px;margin-left:80px;">
<a id="opentutorial1" href="#" class="action-button shiny-bound-input" onclick="window.open('https://gumuslab.github.io/phosnetvis-docs/docs/tutorials', '_blank'); return false;">
<img src="./img/img1.png" width="95px">
</a>
</div>
<div class="col-sm-1" style="margin-top: 0px;margin-right:20px;">
<a id="opentutorial2" href="#" class="action-button shiny-bound-input" onclick="window.open('https://gumuslab.github.io/phosnetvis-docs/docs/tutorials', '_blank'); return false;">
<img src="./img/img2.png" width="95px">
</a>
</div>
<div class="col-sm-1" style="margin-top: 0px;margin-right:20px;">
<a id="opentutorial3" href="#" class="action-button shiny-bound-input" onclick="window.open('https://gumuslab.github.io/PhosNetVis/contact-us.html', '_blank'); return false;">
<img src="./img/img3.png" width="95px">
</a>
</div>
<div class="col-sm-4"></div>
</div>
</section>
</div>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-sm" role="document" style="max-width:30%; max-height:10%;">
<div class="modal-content">
<!-- <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div> -->
<div style="margin-bottom: 10px;">
<div class="container d-flex flex-column justify-content-center">
<!-- Modal content goes here -->
<img src="./img/tick.png " class="rounded mx-auto d-block" style="width:200px; height: 200px;">
<p class="text-center"><h2 class="text-center">Network is created successfully</h2></p>
<p class="text-center">You can download the network.</p>
<button type="button" class="btn btn-primary btn-sm rounded mx-auto" data-dismiss="modal" style="width: 100px;">OK</button>
</div>
</div>
<!-- <button type="button" class="btn btn-primary">Save changes</button> -->
</div>
</div>
</div>
<!-- Modal 2-->
<div class="modal fade" id="runWithoutFile" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-sm" role="document" style="max-width:30%; max-height:10%;">
<div class="modal-content">
<!-- <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div> -->
<div style="margin-bottom: 10px;">
<div class="container d-flex flex-column justify-content-center">
<!-- Modal content goes here -->
<img src="./img/cross.png " class="rounded mx-auto d-block" style="width:200px; height: 200px; margin-top: 10px;">
<p class="text-center"><h2 class="text-center">Please upload the file first.</h2></p>
<button type="button" class="btn btn-primary btn-sm rounded mx-auto" data-dismiss="modal" style="width: 100px;">OK</button>
</div>
</div>
<!-- <button type="button" class="btn btn-primary">Save changes</button> -->
</div>
</div>
</div>
<div class="overlay" id="loader-class">
<div class="loader"></div>
</div>
<script>
document.getElementById('download').addEventListener('click', function() {
// Retrieve the CSV data from sessionStorage
const csvData = sessionStorage.getItem('csvData');
// Check if the CSV data exists
if (csvData) {
// Create a Blob object from the CSV data
const blob = new Blob([csvData], { type: 'text/csv' });
// Set the href attribute of the download link to the URL of the Blob object
this.href = URL.createObjectURL(blob);
// Set a custom filename for the downloaded file
this.setAttribute('download', 'KEA_Analysis.csv');
} else {
// If the CSV data doesn't exist, prevent the default action of the link (i.e., don't navigate)
event.preventDefault();
// Show an alert to inform the user
alert('No CSV data found.');
}
});
document.getElementById('hidden-file-upload').addEventListener('change', function(event) {
const file = event.target.files[0]; // Get the selected file
if (file) {
const fileSize = file.size; // Get the size of the file
const progressContainer = document.getElementById('progress-container');
progressContainer.innerHTML = ''; // Clear any previous progress bar
const progressBar = document.createElement('div');
progressBar.classList.add('progress');
progressBar.innerHTML = `
<div class="progress-bar bg-success" role="progressbar" style="width: 100%;" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100">
Upload Complete
</div>`;
// Append the progress bar to the progress container
progressContainer.appendChild(progressBar);
// Show the progress container
progressContainer.style.display = 'block';
}
});
function runSample() {
// document.getElementById('spinner-container').style.display = 'block';
$('#loader-class').css('display', 'flex');
// Define the URL of the sample file location
const sampleFileUrl = 'data/sample.csv';
// Fetch the sample file
fetch(sampleFileUrl)
.then(response => {
if (!response.ok) {
throw new Error('Failed to fetch sample file.');
}
return response.text();
})
.then(fileContent => {
// Parse CSV data using PapaParse
Papa.parse(fileContent, {
header: true,
complete: function(results) {
const jsonData = JSON.stringify(results.data); // CSV data parsed as JSON array of objects
var inputpValue = parseFloat($('#input_pvalue').val());
var outputpValue = parseFloat($('#output_pvalue').val());
var minsize = parseFloat($('#minSize').val());
var maxsize = parseFloat($('#maxSize').val());
var eps = parseFloat($('#eps').val());
var selectedValue = $("input[name='nameaccession']:checked").val();
const inputData = {
input_pvalue: inputpValue,
minSize: minsize,
maxSize: maxsize,
eps: eps,
output_pvalue: outputpValue,
nameaccession: selectedValue
};
// const inputData = {
// input_pvalue: 0.05,
// minSize: 15,
// maxSize: 100,
// eps: 0,
// output_pvalue: 0.05,
// nameaccession: "gene name"
// };
// Define the URL of your Plumber API endpoint
const apiUrl = 'https://rstudio-connect.hpc.mssm.edu/content/bb0ba84e-68fd-4fd4-a48d-ece2e0089c48/runEnrichment';
// Send a POST request to the API endpoint
fetch(apiUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
file: jsonData,
input_data: inputData
})
})
.then(response => {
if (response.ok) {
// If the response is successful, parse the JSON data
return response.json();
} else {
// If there's an error, throw an error
throw new Error('Failed to fetch data from the API.');
}
})
.then(data => {
// Process the data returned from the API
const csvData = convertToCSV(data);
// Store the CSV data in session storage
sessionStorage.setItem('csvData', csvData);
$('#loader-class').css('display', 'none');
$('#exampleModal').modal('show');
$('#donloadButton').css('display', 'block');
$('#visualizeButton').css('display', 'block');
// You can perform further actions here, such as updating the UI
})
.catch(error => {
// Handle any errors that occurred during the fetch
console.error(error);
});
}
});
})
.catch(error => {
console.error(error);
})
// .finally(() => {
// // Hide the spinner
// $('#loader-class').css('display', 'none');
// $('#exampleModal').modal('show');
// $('#donloadButton').css('display', 'block');
// $('#visualizeButton').css('display', 'block');
// });
}
function loadData() {
sessionStorage.setItem("vis_perm", false);
// localStorage.clear();
let readers = [];
let file_names = [];
let all_files = [];
// Get the CSV data from session storage
const csvData = sessionStorage.getItem('csvData');
// Check if data is successfully retrieved
if (csvData) {
// Parse CSV data
var parser = d3.csv(',')
var jsonObj = d3.csv.parse(csvData);
// Store the parsed data in local storage
localStorage.setItem('idx', 0);
localStorage.setItem('file_names', JSON.stringify(['KEAnetwork.csv']));
localStorage.setItem('KEAnetwork.csv', 'dataFrame0');
localStorage.setItem('dataFrame0', JSON.stringify(jsonObj));
// Store parsed data in an array
all_files.push(jsonObj);
localStorage.setItem('all_files', JSON.stringify(all_files));
// Set session storage flags
sessionStorage.setItem("vis_perm", true);
sessionStorage.setItem("state_num", 1);
// Call data_upload_check function
data_upload_check();
} else {
alert("Failed to load sample data from session storage.");
}
}
</script>
</body>
</html>