-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
4357 lines (4131 loc) · 357 KB
/
index.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
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9Z9W65R97H"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-9Z9W65R97H');
</script>
<head>
<!-- Required meta tags (add the responsive viewport meta tag) -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description"
content="Molecular Mimicry Map of SARS-CoV-2 web application">
<title>CRESSP</title>
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="https://www.ebi.ac.uk/pdbe/pdb-component-library/css/pdbe-molstar-light-1.1.0-dev.4.css">
<!--Bootstrap CSS library-->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
<!--Google Icon CSS library-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!-- JS -->
<!-- IntervalTree package for searching matched records efficiently (binary-search-bounds and interval-tree-1d packages, browserified and minified) -->
<script>require=function t(i,r,n){function e(h,o){if(!r[h]){if(!i[h]){var u="function"==typeof require&&require;if(!o&&u)return u(h,!0);if(s)return s(h,!0);var f=new Error("Cannot find module '"+h+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[h]={exports:{}};i[h][0].call(l.exports,(function(t){return e(i[h][1][t]||t)}),l,l.exports,t,i,r,n)}return r[h].exports}for(var s="function"==typeof require&&require,h=0;h<n.length;h++)e(n[h]);return e}({"binary-search-bounds":[function(t,i,r){"use strict";function n(t,i,r,n,e){var s=["function ",t,"(a,l,h,",n.join(","),"){",e?"":"var i=",r?"l-1":"h+1",";while(l<=h){var m=(l+h)>>>1,x=a[m]"];return e?i.indexOf("c")<0?s.push(";if(x===y){return m}else if(x<=y){"):s.push(";var p=c(x,y);if(p===0){return m}else if(p<=0){"):s.push(";if(",i,"){i=m;"),r?s.push("l=m+1}else{h=m-1}"):s.push("h=m-1}else{l=m+1}"),s.push("}"),e?s.push("return -1};"):s.push("return i};"),s.join("")}function e(t,i,r,e){return new Function([n("A","x"+t+"y",i,["y"],e),n("P","c(x,y)"+t+"0",i,["y","c"],e),"function dispatchBsearch",r,"(a,y,c,l,h){if(typeof(c)==='function'){return P(a,(l===void 0)?0:l|0,(h===void 0)?a.length-1:h|0,y,c)}else{return A(a,(c===void 0)?0:c|0,(l===void 0)?a.length-1:l|0,y)}}return dispatchBsearch",r].join(""))()}i.exports={ge:e(">=",!1,"GE"),gt:e(">",!1,"GT"),lt:e("<",!0,"LT"),le:e("<=",!0,"LE"),eq:e("-",!0,"EQ",!0)}},{}],"interval-tree-1d":[function(t,i,r){"use strict";var n=t("binary-search-bounds");function e(t,i,r,n,e){this.mid=t,this.left=i,this.right=r,this.leftPoints=n,this.rightPoints=e,this.count=(i?i.count:0)+(r?r.count:0)+n.length}i.exports=function(t){if(!t||0===t.length)return new d(null);return new d(p(t))};var s=e.prototype;function h(t,i){t.mid=i.mid,t.left=i.left,t.right=i.right,t.leftPoints=i.leftPoints,t.rightPoints=i.rightPoints,t.count=i.count}function o(t,i){var r=p(i);t.mid=r.mid,t.left=r.left,t.right=r.right,t.leftPoints=r.leftPoints,t.rightPoints=r.rightPoints,t.count=r.count}function u(t,i){var r=t.intervals([]);r.push(i),o(t,r)}function f(t,i){var r=t.intervals([]),n=r.indexOf(i);return n<0?0:(r.splice(n,1),o(t,r),1)}function l(t,i,r){for(var n=0;n<t.length&&t[n][0]<=i;++n){var e=r(t[n]);if(e)return e}}function c(t,i,r){for(var n=t.length-1;n>=0&&t[n][1]>=i;--n){var e=r(t[n]);if(e)return e}}function g(t,i){for(var r=0;r<t.length;++r){var n=i(t[r]);if(n)return n}}function a(t,i){return t-i}function v(t,i){var r=t[0]-i[0];return r||t[1]-i[1]}function P(t,i){var r=t[1]-i[1];return r||t[0]-i[0]}function p(t){if(0===t.length)return null;for(var i=[],r=0;r<t.length;++r)i.push(t[r][0],t[r][1]);i.sort(a);var n=i[i.length>>1],s=[],h=[],o=[];for(r=0;r<t.length;++r){var u=t[r];u[1]<n?s.push(u):n<u[0]?h.push(u):o.push(u)}var f=o,l=o.slice();return f.sort(v),l.sort(P),new e(n,p(s),p(h),f,l)}function d(t){this.root=t}s.intervals=function(t){return t.push.apply(t,this.leftPoints),this.left&&this.left.intervals(t),this.right&&this.right.intervals(t),t},s.insert=function(t){var i=this.count-this.leftPoints.length;if(this.count+=1,t[1]<this.mid)this.left?4*(this.left.count+1)>3*(i+1)?u(this,t):this.left.insert(t):this.left=p([t]);else if(t[0]>this.mid)this.right?4*(this.right.count+1)>3*(i+1)?u(this,t):this.right.insert(t):this.right=p([t]);else{var r=n.ge(this.leftPoints,t,v),e=n.ge(this.rightPoints,t,P);this.leftPoints.splice(r,0,t),this.rightPoints.splice(e,0,t)}},s.remove=function(t){var i=this.count-this.leftPoints;if(t[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(i-1)?f(this,t):2===(o=this.left.remove(t))?(this.left=null,this.count-=1,1):(1===o&&(this.count-=1),o):0;if(t[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(i-1)?f(this,t):2===(o=this.right.remove(t))?(this.right=null,this.count-=1,1):(1===o&&(this.count-=1),o):0;if(1===this.count)return this.leftPoints[0]===t?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===t){if(this.left&&this.right){for(var r=this,e=this.left;e.right;)r=e,e=e.right;if(r===this)e.right=this.right;else{var s=this.left,o=this.right;r.count-=e.count,r.right=e.left,e.left=s,e.right=o}h(this,e),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?h(this,this.left):h(this,this.right);return 1}for(s=n.ge(this.leftPoints,t,v);s<this.leftPoints.length&&this.leftPoints[s][0]===t[0];++s)if(this.leftPoints[s]===t){this.count-=1,this.leftPoints.splice(s,1);for(o=n.ge(this.rightPoints,t,P);o<this.rightPoints.length&&this.rightPoints[o][1]===t[1];++o)if(this.rightPoints[o]===t)return this.rightPoints.splice(o,1),1}return 0},s.queryPoint=function(t,i){if(t<this.mid){if(this.left)if(r=this.left.queryPoint(t,i))return r;return l(this.leftPoints,t,i)}if(t>this.mid){var r;if(this.right)if(r=this.right.queryPoint(t,i))return r;return c(this.rightPoints,t,i)}return g(this.leftPoints,i)},s.queryInterval=function(t,i,r){var n;if(t<this.mid&&this.left&&(n=this.left.queryInterval(t,i,r)))return n;if(i>this.mid&&this.right&&(n=this.right.queryInterval(t,i,r)))return n;return i<this.mid?l(this.leftPoints,i,r):t>this.mid?c(this.rightPoints,t,r):g(this.leftPoints,r)};var y=d.prototype;y.insert=function(t){this.root?this.root.insert(t):this.root=new e(t[0],null,null,[t],[t])},y.remove=function(t){if(this.root){var i=this.root.remove(t);return 2===i&&(this.root=null),0!==i}return!1},y.queryPoint=function(t,i){if(this.root)return this.root.queryPoint(t,i)},y.queryInterval=function(t,i,r){if(t<=i&&this.root)return this.root.queryInterval(t,i,r)},Object.defineProperty(y,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(y,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},{"binary-search-bounds":"binary-search-bounds"}]},{},[]);</script>
<!--For Using utility functions-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js"></script>
<script> lodash = _.noConflict(); // load script of lodash </script>
<!--Plotly-->
<script src="https://cdn.plot.ly/plotly-1.58.4.js"></script>
<!-- 1.54.7.min.js"></script> -->
<!--PDB Mol*-->
<script type="text/javascript" src="https://www.ebi.ac.uk/pdbe/pdb-component-library/js/pdbe-molstar-plugin-1.1.0-dev.4.js"></script>
<!--For loading large csv files-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.2.0/papaparse.min.js"></script>
<!--Python's Numpy-like Library, NumJS-->
<script src="https://cdn.jsdelivr.net/gh/nicolaspanel/[email protected]/dist/numjs.min.js"></script>
<!--D3 to draw tables-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<!--chroma to draw colormaps-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/chroma-js/2.1.0/chroma.min.js"></script>
<!--hotkeys to add keyboard shortcuts-->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/hotkeys.min.js" integrity="sha256-4nmnbhmVpr2Rg64+7ysAr93+vQrfc0UvHWwm4W6uXJM=" crossorigin="anonymous"></script>
<!-- Tiny color for check brightness of colors -->
<script src="https://cdn.jsdelivr.net/npm/@ctrl/[email protected]/dist/bundles/tinycolor.umd.min.js" integrity="sha256-Vh7fK4raoe05JXjx4pAZWY9Psrw4oTePgbQT5D1AbC8=" crossorigin="anonymous"></script>
<!--Datatable for efficient visualization of tabular data-->
<!--full: jquery.dataTables.js, jquery.dataTables.css-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js" crossorigin="anonymous"></script>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css">
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.21/js/jquery.dataTables.min.js" crossorigin="anonymous"></script>
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
<!-- dataframe.js for useful dataframe functions -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/dataframe.min.js" integrity="sha256-ncD0rnpkULRQhB+hFzhFCQ4KBu+NKVYEQHyhxsUA29Q=" crossorigin="anonymous"></script>
<!-- FileSaver.js to save js object as local files -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/FileSaver.min.js" integrity="sha256-5IjlS/EkXaEXRrVOMusSOlmQsyFy3DvCD5QC5mJZubU=" crossorigin="anonymous"></script>
<!-- Html2Canvas.js to save current view as a PNG file -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/html2canvas.min.js" integrity="sha256-Ax1aqtvxWBY0xWND+tPZVva/VQZy9t1Ce17ZJO+NTRc=" crossorigin="anonymous"></script>
<!-- Pako.js to parse base64 gzipped text file downloaded from remote location -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/pako.min.js" integrity="sha256-Kc+gVCuYZLZkDP3MjxWxhNtkMbUy2ycCo86X5fKn/Bw=" crossorigin="anonymous"></script>
<!-- Bootstrap-Toggle.js more more animated toggle button -->
<link href="https://cdn.jsdelivr.net/gh/gitbrent/[email protected]/css/bootstrap4-toggle.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/gh/gitbrent/[email protected]/js/bootstrap4-toggle.min.js"></script>
<!-- Tagify for search bar interaction -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@yaireo/[email protected]/dist/tagify.css" integrity="sha256-JQCBuvZzuXrKFdHRTVW23P/DqnFsfvbI3kraGJhPyNA=" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/@yaireo/[email protected]/dist/tagify.min.js" integrity="sha256-6QmUlbXKkm+RVqvqtIzhhDQ3cqRkuREeUhNJDnL2ujM=" crossorigin="anonymous"></script>
<!--To use font-awesome icons -->
<!-- <script src="https://kit.fontawesome.com/b773d81884.js" crossorigin="anonymous"></script> -->
<!-- Fussy search package for alignment of given peptide sequences to consensus sequence -->
<!-- <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/fuse.min.js" integrity="sha256-7f3wLI5WWMPufBdf3U8CNW6K7WYPoO83Iqvr+dd6k4Q=" crossorigin="anonymous"></script> -->
<!--React and React-Bootstrap library-->
<!-- <script src="https://unpkg.com/react/umd/react.production.min.js" crossorigin></script>
<script src="https://unpkg.com/react-dom/umd/react-dom.production.min.js" crossorigin></script>
<script src="https://unpkg.com/react-bootstrap@next/dist/react-bootstrap.min.js" crossorigin></script>
<script>var Alert = ReactBootstrap.Alert;</script> -->
<style>
* { box-sizing: border-box; }
/* Create two equal columns that floats next to each other */
.column {
float: left;
width: 50%;
padding: 10px;
height: 450px; /* Should be removed. Only for demonstration */
position:relative;
}
/* Clear floats after the columns */
.responsive_row_with_two_columns:after {
float:left;
content: "";
display: table;
clear: both;
}
/* Responsive layout - makes the two columns stack on top of each other instead of next to each other */
@media screen and (max-width: 700px) {
.column {
width: 100%;
}
}
.deconstructed_pancake_box { /* example in https://web.dev/one-line-layouts/ */
flex: 1 1 450px;
margin: 5px;
}
.deconstructed_pancake_parent {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.container_molstar {
height: 600px; /* Should be modified */
position:relative;
}
#container_d3_table_metrics{
display: grid;
grid-template-rows: auto 1fr auto;
position:relative;
}
#plotly_graph_molecular_mimicry_map{
float:left;
width:100%;
padding: 5px;
height:575px;
position:relative;
overflow:hidden;
}
.graph_for_selection{
float:left;
width:100%;
height:350px;
position:relative;
}
/* custom bootstrap button color */
.bg-custom-navbar{ /* custom navbar color and gradient (color representing lupus awareness color) */
background-image: linear-gradient( 15deg, #004d4d 0%, #00e0e0 100%);
}
.bg-custom-navbar-secondary{ /* custom navbar color and gradient for secondary navbar (color representing lupus awareness color) */
background-image: linear-gradient( 20deg, #46137a 0%, #f08dee 100%);
}
.bg-custom-navbar-hidden{ /* custom navbar color and gradient (color representing lupus awareness color) */
border-left: 6px solid #ccc;
border-bottom: 3px solid #ccc;
color: #000;
border-color: #075955;
background-color: #f8f7fa;
/* '#fce6ff; #dfdae6; #f3f0f7; */
}
.bg-custom-navbar-top{ /* custom navbar color and gradient (color representing lupus awareness color) */
background-image: linear-gradient( 0deg, #ababab 0%, #f7f7f7 100%);
}
/* CSS for D3 Table */
table { border-collapse: collapse; color: #333; background-color: #F7F6F3; margin: auto; } /* place the table in the middle of div */
table thead { font-weight: bold; background-color: #CCC; cursor: default; text-align: center; }
table tbody tr:hover { background-color: #FFC; }
td { border: solid 1px #CCC; padding: 0 1ex; }
.table_even { color: #284775; background-color: White; }
.table_left { text-align: left; }
.table_center { text-align: center; }
.table_right { text-align: right; }
.table_add { color: green; }
.table_minus { color: red; }
#button_scroll_to_the_top { /* CSS for Scroll Back To Top Button */
display: none; /* Hidden by default */
position: fixed; /* Fixed/sticky position */
bottom: 20px; /* Place the button at the bottom of the page */
right: 30px; /* Place the button 30px from the right */
z-index: 99; /* Make sure it does not overlap */
border: none; /* Remove borders */
outline: none; /* Remove outline */
background-color: DarkViolet; /* Set a background color */
color: white; /* Text color */
cursor: pointer; /* Add a mouse pointer on hover */
padding: 15px; /* Some padding */
border-radius: 10px; /* Rounded corners */
font-size: 18px; /* Increase font size */
}
/* for tidy organization of buttons */
.btn {
margin-bottom: 0px !important;
}
#button_scroll_to_the_top:hover {
background-color: #555 ; /* Indigo Add a dark-grey background on hover */
}
.helpIcon
{
cursor: pointer;
padding-top:12px;
}
i.icon-white {
color: white;
display:inline-flex;
vertical-align:middle;
}
i.icon-black {
color: black;
display:inline-flex;
vertical-align:middle;
}
/* for labeled buttons */
.btn-label {position: relative;left: -12px;display: inline-block;padding: 6px 12px;background: rgba(0,0,0,0.1);border-radius: 3px 0 0 3px;}
.btn-labeled {padding-top: 0;padding-bottom: 0;}
.btn { margin-bottom:10px; }
/* for div. displayed during loading (https://stackoverflow.com/questions/54439548/display-loading-symbol-while-waiting-for-a-result-with-plot-ly-dash) */
@keyframes fadein {
0% {
opacity: 0;
}
100% {
opacity: 0.5;
}
}
._plotly-loading-callback {
font-family: sans-serif;
padding-top: 50px;
color: rgb(90, 90, 90);
/* The banner */
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
text-align: center;
cursor: progress;
opacity: 0;
background-color: rgb(250, 250, 250);
/* Delay animation by 1s to prevent flashing
and smoothly transition the animation over 0.5s
*/
-moz-animation: fadein 0.5s ease-in 1s forwards; /* Firefox */
-webkit-animation: fadein 0.5s ease-in 1s forwards; /* Safari and Chrome */
-o-animation: fadein 0.5s ease-in 1s forwards; /* Opera */
animation: fadein 0.5s ease-in 1s forwards;
}
/* Add an extra .carousel parent class to increase specificity
avoiding the use of !important flag. */
.carousel-caption {
color: black;
}
.carousel .carousel-indicators li {
background-color: #fff;
background-color: rgba(70, 70, 70, 0.25);
}
.carousel .carousel-indicators .active {
background-color: #444;
}
.carousel .carousel-indicators li {
background-color: #fff;
background-color: rgba(70, 70, 70, 0.25);
}
.carousel .carousel-indicators .active {
background-color: #444;
}
.carousel-control-next,
.carousel-control-prev {
filter: invert(100%);
}
/* for loading SVG images */
/* .loader{
margin: 0 0 2em;
height: 100px;
width: 100%;
text-align: center;
padding: 1em;
margin: 0 auto 1em;
display: inline-block;
vertical-align: top;
} */
/* https://gitbrent.github.io/bootstrap4-toggle/ custom settings */
.toggle.ios, .toggle-on.ios, .toggle-off.ios { border-radius: 20rem; }
.toggle.ios .toggle-handle { border-radius: 20rem; }
/* Drag & Drop file input box */
#filedrag
{
display: none;
font-weight: bold;
text-align: center;
padding: 1em 0;
margin: 1em 0;
color: #555;
border: 2px dashed #555;
border-radius: 7px;
cursor: default;
}
#filedrag.hover
{
color: #8c00ff;
border-color: #8c00ff;
border-style: solid;
box-shadow: inset 0 3px 4px #888;
}
</style>
<!-- icon of the document -->
<link rel="icon" href="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2020%2020'%3E%3Ctext%20x='0'%20y='16'%20style='filter:%20invert(100%);'%3E🌱%3C/text%3E%3C/svg%3E" type="image/svg+xml" />
</head>
<body>
<!-- where captured current view is stored as a data URL -->
<a id="anchor-current-view" href="#" hidden></a>
</div>
<!-- start of the current view container -->
<div id="molecularmimicrymap-current-view">
<nav class="navbar navbar-expand-lg navbar-dark bg-custom-navbar"> <!-- sticky-top -->
<a class="navbar-brand mb-0 h1">CRESSP Web Viewer</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav_top" aria-controls="navbarNav_top" aria-expanded="false" aria-label="Toggle top navigation"><span class="navbar-toggler-icon"></span></button>
<div class="collapse navbar-collapse" id="navbarNav_top">
<ul class="navbar-nav">
<li class="nav-item">
<div class="form-check form-check-inline" id="toggle_alignment_mode_container">
<input id="toggle_alignment_mode" type="checkbox" checked data-toggle="toggle" data-on="Aligned to Target" data-off="Aligned to Query" data-onstyle="secondary" data-offstyle="light" data-style="ios" data-width="12rem" data-height="calc(1.5em + .75rem + 2px)" onchange="Load_Dataset( )">
</div>
</li>
</ul>
<button type="button" class="btn btn-light bth-sm ml-auto mr-1 my-0" aria-label="capture current view and download it as a PNG file" data-tooltip="tooltip" data-placement="left" data-html="true" title="Capture <b>current view</b> and download it as a PNG file" onclick="DownloadCurrentView( )"><i class="material-icons icon-black" style="font-size:25px">camera_alt</i></button>
<button type="button" class="btn btn-light bth-sm ml-1 mr-1 my-0" aria-label="show keyboard shortcuts" data-tooltip="tooltip" data-placement="bottom" data-html="true" title="Press to show <b>keyboard shortcuts</b>" onclick="$( '#modal_keyboard_shortcuts' ).modal( 'show' )"><i class="material-icons icon-black" style="font-size:25px">keyboard</i></button>
<button type="button" class="btn btn-light bth-sm ml-1 my-0" aria-label="toggle tooltips" data-tooltip-always-active="tooltip" data-placement="bottom" data-html="true" title="Press to <b>on/off</b> help messages on mouse over (hover) of certain buttons" onclick="Toggle_Tooltips( )"><i class="material-icons icon-black" style="font-size:25px">help_outline</i></button>
</div>
</nav>
<button onclick="Scroll_to_the_Top( )" id="button_scroll_to_the_top" title="Go to top">Top</button>
<div>
<div class="collapse" id="container_fileLoader"><div><input type="file" id="file-selector" multiple></div></div>
</div>
<div id="molecular_mimicry_map">
<div id="container_molecular_mimicry_map">
<div id="controlBox_plotly_graph_molecular_mimicry_map">
<div class="pos-f-t">
<nav class="navbar navbar-dark bg-custom-navbar">
<form class="form-inline">
<button class="navbar-toggler mr-2" type="button" data-toggle="collapse" data-target="#navbarToggleExternalContent__plotly_graph_molecular_mimicry_map" aria-controls="navbarToggleExternalContent__plotly_graph_molecular_mimicry_map" aria-expanded="false" aria-label="Toggle navigation" data-tooltip="tooltip" data-placement="right" data-html="true" title="Press to change default graph settings and turn on/off tracks"><i class="material-icons icon-white" style="font-size:20px;cursor:pointer">settings</i></button>
<a class="mb-0" style="color:white; font-size:0.8em" id="text_number_of_records"></a>
</form>
<form class="form-inline">
<button class="btn btn-light btn-sm mx-1 my-0" type="button" data-toggle="button" data-tooltip="tooltip" data-placement="left" data-html="true" title="Press to <b>on/off</b> the <i>legend</i> of the graph" id="button_toggle_legend_MolecularMimicryMap" onclick="Toggle_Legend_MolecularMimicryMap( )"><i class="material-icons icon-black" style="font-size:20px">list</i></button>
<button class="btn btn-light btn-sm mx-1 my-0" type="button" data-toggle="button" data-tooltip="tooltip" data-placement="bottom" data-html="true" title="Press to <b>on/off</b> displaying <i>record details</i> on hover (mouse over). It will <b>also disable click events</b>." id="button_toggle_hovermode_MolecularMimicryMap" onclick="Toggle_Hovermode_MolecularMimicryMap( )"><i class="material-icons icon-black" style="font-size:20px">article</i></button>
<button class="btn btn-light btn-sm active ml-1 mr-1 my-0" type="button" data-toggle="button" data-tooltip="tooltip" data-placement="bottom" data-html="true" title="Press to <b>toggle</b> B-cell cross-reactivity prediction data" aria-label="Press to toggle B-cell cross-reactivity prediction data" id="toggle_BCellCrossReactivityPrediction_MolecularMimicryMap" onclick="Toggle_BCellCrossReactivityPrediction_MolecularMimicryMap( )" autocomplete="off" aria-pressed="true">B-Cell Cross-Reactivity</button>
<button class="btn btn-light btn-sm active ml-0 mr-1 my-0" type="button" data-toggle="button" data-tooltip="tooltip" data-placement="bottom" data-html="true" title="Press to <b>toggle</b> T-cell cross-reactivity prediction data" aria-label="Press to toggle T-cell cross-reactivity prediction data" id="toggle_TCellCrossReactivityPrediction_MolecularMimicryMap" onclick="Toggle_TCellCrossReactivityPrediction_MolecularMimicryMap( )" autocomplete="off" aria-pressed="true">T-Cell Cross-Reactivity</button>
<button class="btn btn-light btn-sm active mx-1 my-0" type="button" data-toggle="button" data-tooltip="tooltip" data-placement="bottom" data-html="true" title="Press to <b>toggle</b> SARS-CoV-2 target protein annotations and InterPro protein domain annotations" aria-label="Press to toggle SARS-CoV-2 target protein annotations and InterPro protein domain annotations" id="toggle_ProteinAnnotation_MolecularMimicryMap" onclick="Toggle_ProteinAnnotation_MolecularMimicryMap( )" autocomplete="off" aria-pressed="true">Protein Annotations</button>
</form>
</nav>
<div class="collapse" id="navbarToggleExternalContent__plotly_graph_molecular_mimicry_map">
<div class="bg-custom-navbar-hidden p-4">
<h4 class="text-black">CRESSP Main Graph Setting Panel</h4>
<p>
<h5 class="text-muted">General Setting</h5>
<div class="btn-toolbar" role="toolbar">
<div class="input-group mx-2 my-2">
<div class="input-group-prepend"><span class="input-group-text">Plot height is</span></div>
<input type="text" class="form-control" aria-label="height of the plot in pixel" id="input_plot_height_MolecularMimicryMap" title="input field for setting the height of Molecular Mimicry Map plot in pixels" value="750">
<div class="input-group-append"><span class="input-group-text">pixels</span></div>
</div>
</div>
</p>
<p>
<h5 class="text-muted">B Cell Cross-Reactivity Prediction Data</h5>
<div class="btn-toolbar" role="toolbar">
<div class="input-group mx-2 my-2">
<div class="input-group-prepend"><span class="input-group-text">Y axis represents</span></div>
<select class="custom-select w-auto" id="select_YAxis_BCellCrossReactivity" title="select y-axis values for plotting">
<option value="score_blosum">Sum of BLOSUM62 Scores</option>
<option value="score_blosum_weighted">Sum of Accessibility-Weighted BLOSUM62 Scores</option>
<option value="sum_of_weights">Sum of Relative Surface Accessible Areas</option>
<option value="avg_score_blosum_weighted" selected>Average Accessibility-Weighted BLOSUM62 Score</option>
<option value="score_similarity_ss8">Secondary Structure Similarity</option>
<option value="correl_coeffi_acc">Correlation Coefficient of Accessibility</option>
<option value="correl_coeffi_phi">Correlation Coefficient of Phi (ϕ)</option>
<option value="correl_coeffi_psi">Correlation Coefficient of Psi (Ψ)</option>
<option value="duplicate_counts">Duplicate Counts</option>
</select>
</div>
</div>
<div class="btn-toolbar" role="toolbar">
<div class="input-group mx-2 my-2">
<div class="input-group-prepend"><span class="input-group-text">Size of point (or width of line) represents</span></div>
<select class="custom-select w-auto" id="select_Size_BCellCrossReactivity" title="select size (line thickness) values for plotting">
<option value="score_blosum">Sum of BLOSUM62 Scores</option>
<option value="score_blosum_weighted">Sum of Accessibility-Weighted BLOSUM62 Scores</option>
<option value="sum_of_weights" selected>Sum of Relative Surface Accessible Areas</option>
<option value="avg_score_blosum_weighted">Average Accessibility-Weighted BLOSUM62 Score</option>
<option value="score_similarity_ss8">Secondary Structure Similarity</option>
<option value="correl_coeffi_acc">Correlation Coefficient of Accessibility</option>
<option value="correl_coeffi_phi">Correlation Coefficient of Phi (ϕ)</option>
<option value="correl_coeffi_psi">Correlation Coefficient of Psi (Ψ)</option>
<option value="duplicate_counts">Duplicate Counts</option>
</select>
</div>
</div>
<div class="btn-toolbar" role="toolbar">
<div class="input-group mx-2 my-2">
<div class="input-group-prepend"><span class="input-group-text">Opacity of point represents</span></div>
<select class="custom-select w-auto" id="select_Opacity_BCellCrossReactivity" title="select opacity values for plotting">
<option value="score_blosum">Sum of BLOSUM62 Scores</option>
<option value="score_blosum_weighted">Sum of Accessibility-Weighted BLOSUM62 Scores</option>
<option value="sum_of_weights">Sum of Relative Surface Accessible Areas</option>
<option value="avg_score_blosum_weighted">Average Accessibility-Weighted BLOSUM62 Score</option>
<option value="score_similarity_ss8">Secondary Structure Similarity</option>
<option value="correl_coeffi_acc" selected>Correlation Coefficient of Accessibility</option>
<option value="correl_coeffi_phi">Correlation Coefficient of Phi (ϕ)</option>
<option value="correl_coeffi_psi">Correlation Coefficient of Psi (Ψ)</option>
<option value="duplicate_counts">Duplicate Counts</option>
</select>
</div>
</div>
<div class="btn-toolbar" role="toolbar">
<div class="input-group mx-2 my-2">
<div class="input-group-prepend"><span class="input-group-text">Plot top</span></div>
<input type="text" class="form-control" aria-label="the number of alignments for plotting" id="input_n_alignments_for_plotting_BCellCrossReactivity" title="input field for setting the number of alignments for plotting B Cell Cross-Reactivity prediciton data" value="1000">
<div class="input-group-append"><span class="input-group-text">most significant aligned sequences for window size of</span></div>
<select class="custom-select w-auto" id="select_windowSize_BCellCrossReactivity" title="window size for B cell cross-reactivity prediction data">
<option value="select">select window size</option>
</select>
<div class="input-group-append"><label class="input-group-text" for="select_windowSize_BCellCrossReactivity">amino acids.</label></div>
</div>
<div class="input-group mx-2 my-2">
<div class="input-group-prepend"><label class="input-group-text" for="select_representation_of_an_alignment_BCellCrossReactivity">Represent each alignment with a</label></div>
<select class="custom-select w-auto" id="select_representation_of_an_alignment_BCellCrossReactivity" title="select a representation of an alignment in B cell cross-reactivity prediction data">
<option value="1">select a representation</option>
<option value="0" selected>point (faster)</option>
<option value="1">line (slower)</option>
</select>
<div class="input-group-append"><label class="input-group-text" for="select_representation_of_an_alignment_BCellCrossReactivity">on a</label></div>
<select class="custom-select w-auto" id="select_graphic_format_BCellCrossReactivity" title="select a graphic format of representations of B cell cross-reactivity prediction data">
<option value="0">select a graphic format</option>
<option value="0" selected>bitmap (faster)</option>
<option value="1">vector (scalable, but slower)</option>
</select>
<div class="input-group-append"><label class="input-group-text" for="select_graphic_format_BCellCrossReactivity">image.</label></div>
</div>
</div>
</p>
<p>
<h5 class="text-muted">T Cell Cross-Reactivity Prediction Data</h5>
<div class="btn-toolbar" role="toolbar">
<div class="input-group mx-2 my-2">
<div class="input-group-prepend"><span class="input-group-text">Y axis represents</span></div>
<select class="custom-select w-auto" id="select_YAxis_TCellCrossReactivity" title="select y-axis values for plotting">
<option value="score_blosum">Sum of BLOSUM62 Scores</option>
<option value="average_score_blosum" selected>Average BLOSUM62 Score</option>
<option value="affinity">-Log of Geometric Average of Predicted Binding Affinities (IC50) of query and target Peptides</option>
</select>
</div>
</div>
<div class="btn-toolbar" role="toolbar">
<div class="input-group mx-2 my-2">
<div class="input-group-prepend"><span class="input-group-text">Plot top</span></div>
<input type="text" class="form-control" aria-label="the number of alignments for plotting" id="input_n_alignments_for_plotting_TCellCrossReactivity" title="input field for setting the number of alignments for plotting T Cell Cross-Reactivity prediciton data" value="1000">
<div class="input-group-append"><span class="input-group-text">most significant aligned sequences for MHC class I and II molecules.</span></div>
</div>
<div class="input-group mx-2 my-2">
<div class="input-group-prepend"><label class="input-group-text" for="select_representation_of_an_alignment_TCellCrossReactivity">Represent each pair of predicted binding scores with a</label></div>
<select class="custom-select w-auto" id="select_representation_of_an_alignment_TCellCrossReactivity" title="select a representation for a pair of predicted binding scores in T cell cross-reactivity prediction data">
<option value="1">select a representation</option>
<option value="0" selected>point (Y down/up)</option>
<option value="1">point (star-triangle down/up)</option>
<option value="2">point (bowtie/hourglass)</option>
</select>
<div class="input-group-append"><label class="input-group-text" for="select_representation_of_an_alignment_TCellCrossReactivity">(query/target) on a</label></div>
<select class="custom-select w-auto" id="select_graphic_format_TCellCrossReactivity" title="select a graphic format of representations of T cell cross-reactivity prediction data">
<option value="0">select a graphic format</option>
<option value="0" selected>bitmap (faster)</option>
<option value="1">vector (scalable, but slower)</option>
</select>
<div class="input-group-append"><label class="input-group-text" for="select_graphic_format_TCellCrossReactivity">image.</label></div>
</div>
</div>
</p>
<p><button type="button" class="btn btn-secondary btn-block mx-2 my-2" onclick="DrawMolecularMimicryMap( ); Loading_Screen( false );">Load and Draw</button></p>
</div>
</div>
</div>
</div>
<div id="container_searchbox_main">
<input name='tags' id='searchbox_main' placeholder='Enter Gene Symbol' value='' data-blacklist='.NET,PHP'>
</div>
<div id="container_graph_molecular_mimicry_map">
<div id="plotly_graph_molecular_mimicry_map"></div>
<div id="container_d3_table_metrics">
</div>
</div>
</div>
</div>
<div>
<nav class="navbar navbar-dark bg-custom-navbar">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggleExternalContent_supplementary_graph_setting_panel" aria-controls="navbarToggleExternalContent_supplementary_graph_setting_panel" aria-expanded="false" aria-label="Toggle supplementary plot setting panel" data-tooltip="tooltip" data-placement="right" data-html="true" title="Press to <b>select or remove columns</b> in for <i>parallel coordinate graphs</i> for filtering cross-reactivity prediction data"><i class="material-icons icon-white" style="font-size:20px;cursor:pointer">settings</i></button>
<form class="form-inline">
<button id="btn_toggle_b_cell_reactivity_metrics" class="btn btn-light btn-sm mx-1 my-0" type="button" aria-expanded="false" aria-controls="plotly_graph_b_cell_cross_reactivity" onclick="Toggle_Exclusive_Tabs( '#plotly_graph_b_cell_cross_reactivity' )" data-tooltip="tooltip" data-placement="bottom" data-html="true" title="Press to <b>toggle</b> a parallel coordinate graph for <i>filtering</i> B-cell cross-reactivity prediction data" aria-label="Press to toggle a parallel coordinate graph for filtering B-cell cross-reactivity prediction data">B-Cell Cross-Reactivity Filter</button>
<button id="btn_toggle_mhc_cross_reactivity_metrics" class="btn btn-light btn-sm mx-1 my-0" type="button" aria-expanded="false" aria-controls="plotly_graph_t_cell_cross_reactivity" onclick="Toggle_Exclusive_Tabs( '#plotly_graph_t_cell_cross_reactivity' )" data-tooltip="tooltip" data-placement="bottom" data-html="true" title="Press to <b>toggle</b> a parallel coordinate graph for <i>filtering</i> T-cell cross-reactivity prediction data" aria-label="Press to toggle a parallel coordinate graph for filtering T-cell cross-reactivity prediction data">T-Cell Cross-Reactivity Filter</button>
<button class="btn btn-light btn-sm mx-1 my-0" type="button" aria-controls="#container_datatable_panel_MolecularMimicryMap" aria-expanded="false" onclick="Toggle_Exclusive_Tabs( '#container_datatable_panel_MolecularMimicryMap' )" data-tooltip="tooltip" data-placement="bottom" data-html="true" title="Press to <b>toggle</b> a panel for exploring associated data using a <i>data table</i>. Data records associated with <b>a specific query protein can be highlighted</b> by entering the <i>UniProt accession</i> of the protein" aria-label="Press to toggle a panel for exploring associated data using a data table. Data records associated with a specific query protein can be highlighted by entering the UniProt accession of the protein">Data Tables</button>
<!-- <button class="btn btn-light btn-sm mx-1 my-0" type="button" data-toggle="collapse" data-toggle="button" data-target="#container_d3_table_metrics" aria-expanded="false" aria-controls="container_d3_table_metrics">Record Details</button> -->
<button class="btn btn-light btn-sm mx-1 my-0" type="button" data-toggle="collapse" data-toggle="button" data-target="#container_plotly_table_sequence" aria-expanded="false" aria-controls="container_plotly_table_sequence"data-tooltip="tooltip" data-placement="bottom" data-html="true" title="Press to <b>toggle</b> <i>a table</i> showing <b>predicted/experimental structural properties</b> of aligned query and SARS-CoV-2 target proteins" aria-label="">Aligned Sequences</button>
<button class="btn btn-light btn-sm mx-1 my-0" type="button" data-toggle="collapse" data-toggle="button" data-target="#container_PDB" aria-expanded="false" aria-controls="container_PDB"data-tooltip="tooltip" data-placement="bottom" data-html="true" title="Press to <b>toggle</b> <i>molecule structure viewers</i> displaying aligned query and SARS-CoV-2 target <i>protein structures</i>. Aligned residues were colored between <i>red to green</i> based on the <b>BLOSUM62 score</b> of the alignment at each position." aria-label="Press to toggle molecule structure viewers displaying aligned Target and Target protein structures">Aligned Structures</button>
</form>
</nav>
<div class="collapse" id="navbarToggleExternalContent_supplementary_graph_setting_panel">
<div class="bg-custom-navbar-hidden p-4">
<h4 class="text-muted" style="display: inline-block;">CRESSP Web Viewer<h4>
<h4 class="text-black"> Supplementary Graph Setting Panel</h4>
<p>
<h5 class="text-muted">B Cell Cross-Reactivity Prediction Metrics</h5>
<div class="form-group">
<label for="selectmultiple_BCellCrossReactivityMetrics">Select columns <i class="material-icons" style="font-size:20px;cursor:pointer" data-toggle="tooltip" data-placement="right" title="Press ⌘ or Control Key to multi-select">help</i></label>
<select multiple class="form-control" id="selectmultiple_BCellCrossReactivityMetrics" size="9">
<option selected value="-log10( e-value )">-log10( e-value )</option>
<option selected value="score_blosum">score_blosum</option>
<option selected value="score_blosum_weighted">score_blosum_weighted</option>
<option value="avg_score_blosum_weighted">avg_score_blosum_weighted</option>
<option selected value="sum_of_weights">sum_of_weights</option>
<option selected value="score_similarity_ss8">score_similarity_ss8</option>
<option selected value="correl_coeffi_acc">correl_coeffi_acc</option>
<option selected value="correl_coeffi_phi">correl_coeffi_phi</option>
<option selected value="correl_coeffi_psi">correl_coeffi_psi</option>
<option value="correl_p_value_acc">correl_p_value_acc</option>
<option value="correl_p_value_phi">correl_p_value_phi</option>
<option value="correl_p_value_psi">correl_p_value_psi</option>
<option selected value="duplicate_counts">duplicate_counts</option>
<option selected value="identity">identity</option>
<option value="source_is_blastp">source_is_blastp</option>
<option value="structure_id_target_is_a_homology_modeling_result">structure_id_target_is_a_homology_modeling_result</option>
<option selected value="window_size">window_size</option>
</select>
</div>
</p>
<p><button type="button" class="btn btn-secondary btn-block mx-2 my-2" onclick="UpdateBCellCrossReactivityPredMetricsPlot( )">Load and Draw</button></p>
<p>
<h5 class="text-muted">T Cell Cross-Reactivity Prediction Metrics</h5>
<div class="form-group">
<label for="selectmultiple_TCellCrossReactivityMetrics">Select columns <i class="material-icons" style="font-size:20px;cursor:pointer" data-toggle="tooltip" data-placement="right" title="Press ⌘ or Control Key to multi-select">help</i></label>
<select multiple class="form-control" id="selectmultiple_TCellCrossReactivityMetrics" size="8">
<option selected value="mhc_class">mhc_class</option>
<option selected value="score_blosum">score_blosum</option>
<option selected value="log10( affinity_query )">log10( affinity_query )</option>
<option selected value="log10( affinity_target )">log10( affinity_target )</option>
<option selected value="window_size">window_size</option>
<option value="-log10( e-value )">-log10( e-value )</option>
<option selected value="duplicate_counts">duplicate_counts</option>
<option value="source_is_blastp">source_is_blastp</option>
</select>
</div>
</p>
<p><button type="button" class="btn btn-secondary btn-block mx-2 my-2" onclick="UpdateTCellCrossReactivityPredMetricsPlot( )">Load and Draw</button></p>
</div>
</div>
<div id="plotly_graph_b_cell_cross_reactivity" class="collapse graph_for_selection"></div>
<div id="plotly_graph_t_cell_cross_reactivity" class="collapse graph_for_selection"></div>
<div id="container_datatable_panel_MolecularMimicryMap" class="collapse">
<nav class="navbar navbar-dark bg-custom-navbar">
<a class="navbar-brand mb-0 h5">Data Tables</a>
<div class="btn-toolbar" role="toolbar">
<div class="input-group mr-2 ml-1 my-0">
<!-- <div class="input-group-prepend"><label class="input-group-text" for="input_n_records_for_datatable">Display top</label></div>
<input type="text" class="form-control" aria-label="the number of records in the datatable to display" id="input_n_records_for_datatable" title="input field for setting the number of records for display a datatable" value="1000">
<div class="input-group-append"><span class="input-group-text">records for</span></div> -->
<select class="custom-select w-auto" id="select_datatable" title="select datatable">
<option value="B-cell cross-reactivity prediction">select datatable</option>
<option value="B-cell cross-reactivity prediction" selected>B-cell cross-reactivity prediction</option>
<option value="T-cell cross-reactivity prediction">T-cell cross-reactivity prediction</option>
<option value="query proteins">query proteins</option>
<option value="target proteins">target proteins</option>
<option value="MHC alleles">MHC alleles</option>
</select>
<div class="input-group-append"><span class="input-group-text">datatable</span></div>
</div>
<button type="button" class="btn btn-light mx-0 my-0" id="button_display_datatable" aria-pressed="false" onclick="Display_DataTable( )" autocomplete="off">Show</button>
<button class="btn btn-light ml-1 mr-2 my-0" type="button" onclick="Download_DataTable( )" data-tooltip="tooltip" data-placement="bottom" title="Press to download current datatable as a CSV file"><i class="material-icons icon-black" style="font-size:20px;cursor:pointer">get_app</i></button>
</div>
<!-- currently searching using the search box above the datatable is not supported -->
<!-- <form class="form-inline">
<input class="form-control" type="search" placeholder="Highlight Value" aria-label="Highlight Value" id="input_highlight_value">
<button class="btn btn-light mx-2 my-0" type="button" onclick="Highlight_MolecularMimicryMap( )">Highlight</button>
<button class="btn btn-light mx-2 my-0" type="button" onclick="Clear_Highlight_MolecularMimicryMap( )">Clear Highlight</button>
</form> -->
<button type="button" class="close" aria-label="Close container_datatable_panel_MolecularMimicryMap" data-toggle="collapse" data-target="#container_datatable_panel_MolecularMimicryMap"><span aria-hidden="true">×</span></button>
</nav>
<div id="container_datatable_CRESSP"><table id="datatable_CRESSP" class="display" width="100%"></table></div>
</div>
<div id="container_plotly_table_sequence" class="collapse">
<nav class="navbar navbar-dark bg-custom-navbar" style="padding-top: 5px; padding-bottom: 5px">
<a class="navbar-brand mb-0 h5">Aligned Sequences</a>
<form class="form-inline">
</form>
<button type="button" class="close" aria-label="Close container_plotly_table_sequence" data-toggle="collapse" data-target="#container_plotly_table_sequence"><span aria-hidden="true">×</span></button>
</nav>
<div id="plotly_table_sequence" style="height:100px;"></div>
<div id="description_clicked_position__table_sequence" style="text-align: center; border-top: 2px solid #075955; background-color: #f8f7fa; color: #000"></div>
</div>
<div id="container_PDB" class="collapse">
<nav class="navbar navbar-dark bg-custom-navbar" style="padding-top: 5px; padding-bottom: 5px">
<a class="navbar-brand mb-0 h5">Aligned Structures</a>
<form class="form-inline">
<div class="input-group-prepend mx-2 my-0" style="height:30px"><a id="text_protein_structure_target" class="input-group-text" target="_blank" rel="noopener noreferrer" href="">Target Protein Structure</a></div>
<select class="form-control my-0" id="select_PDB_target_protein_structure" style="text-align: center; height:30px; line-height: 0px; padding-top: 0px; padding-bottom: 0px;" data-tooltip="tooltip" data-placement="bottom" data-html="true" title="Select how to visualize the alignment result on the target protein" onchange="Select_View_of_PDB_target_Protein( )">
<option value="Clear">Clear</option>
<option selected value="BLOSUM62 Score">BLOSUM62 Score</option>
<option value="BLOSUM62 Score with Side Chains">BLOSUM62 Score with Side Chains</option>
</select>
<div class="input-group-prepend mx-2 my-0" style="height:30px"><a id="text_protein_structure_query" class="input-group-text" target="_blank" rel="noopener noreferrer" href="">Query Protein Structure</a></div>
<select class="form-control my-0" id="select_PDB_query_protein_structure" style="text-align: center; height:30px; line-height: 0px; padding-top: 0px; padding-bottom: 0px;" data-tooltip="tooltip" data-placement="bottom" data-html="true" title="Select how to visualize the alignment result on the query protein" onchange="Select_View_of_PDB_query_Protein( )">
<option value="Clear">Clear</option>
<option selected value="BLOSUM62 Score">BLOSUM62 Score</option>
<option value="BLOSUM62 Score with Side Chains">BLOSUM62 Score with Side Chains</option>
</select>
</form>
<button type="button" class="close" aria-label="Close container_PDB" data-toggle="collapse" data-target="#container_PDB"><span aria-hidden="true">×</span></button>
</nav>
<div id="PDB_Viewer" class="deconstructed_pancake_parent">
<div class="container_molstar deconstructed_pancake_box" id="PDB_Viewer_target_Protein"></div>
<div class="container_molstar deconstructed_pancake_box" id="PDB_Viewer_query_Protein"></div>
</div>
</div>
</div>
</div>
</div>
<!-- end of current view container -->
<div class="modal fade" id="modal_keyboard_shortcuts" tabindex="-1" role="dialog" aria-labelledby="modal_keyboard_shortcuts" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="label_modal_generate_peptides">Keyboard Shortcuts</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<div class="modal-body">
<h5 class="text-muted mb-2" style="font-size:20px">General</h5>
<p>Press <kbd>Ctrl</kbd> or <kbd>Cmd</kbd> + <kbd>s</kbd><b>(screenshot)</b> to capture <b>the current view</b> and download it as a PNG file</p>
<p>Press <kbd>Ctrl</kbd> or <kbd>Cmd</kbd> + <kbd>i</kbd><b>(introduction)</b> to toggle the modal showing file loader and instructions</p>
<p>Press <kbd>Ctrl</kbd> or <kbd>Cmd</kbd> + <kbd>a</kbd><b>(information on hover)</b> to toggle the click/hover events of the main graph.</p>
<p>Press <kbd>Ctrl</kbd> or <kbd>Cmd</kbd> + <kbd>h</kbd><b>(help messages)</b> to toggle tooltip messages that are shown when mouse pointers are on buttons.</p>
<p>Press <kbd>Ctrl</kbd> or <kbd>Cmd</kbd> + <kbd>u</kbd><b>(UP)</b> to move to the top of the page.</p>
<p>Press <kbd>Ctrl</kbd> or <kbd>Cmd</kbd> + <kbd>d</kbd><b>(Down)</b> to move to the bottom of the page.</p>
<br>
<h5 class="text-muted mb-2" style="font-size:20px">Panel Control</h5>
<p>Press <kbd>Ctrl</kbd> or <kbd>Cmd</kbd> + <kbd>b</kbd><b>(B-cell Cross Reactivity Pred.)</b> to show/hide the parallel coordinates plot showing B-cell cross reactivity prediction metrics</p>
<p>Press <kbd>Ctrl</kbd> or <kbd>Cmd</kbd> + <kbd>g</kbd><b>(T-cell Cross Reactivity Pred.)</b> to show/hide the parallel coordinates plot showing T-cell cross reactivity prediction metrics</p>
<p>Press <kbd>Ctrl</kbd> or <kbd>Cmd</kbd> + <kbd>t</kbd><b>(Table)</b> to show/hide the DataTable panel</p>
<br>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Okay</button>
</div>
</div>
</div>
</div>
<!-- fullscreen load file modal -->
<div id="modal_file_loader" class="modal fade show" tabindex="-1" role="dialog" aria-labelledby="modal_file_loader" aria-hidden="true" style="padding-right: 0px!important;"> <!-- disable fading when the web page has been loaded -->
<div class="modal-dialog" style="width: 100%!important;height: 100%!important;margin: 0!important;padding: 0!important;max-width:none !important;">
<div class="modal-content" style="height: auto !important; min-height: 100% !important; border-radius: 0 !important;min-width: 100% !important;">
<nav class="navbar navbar-expand-lg navbar-dark bg-custom-navbar"> <!-- sticky-top -->
<a class="navbar-brand mb-0 h1">CRESSP Web Viewer</a>
<!-- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav_top" aria-controls="navbarNav_top" aria-expanded="false" aria-label="Toggle top navigation"><span class="navbar-toggler-icon"></span></button> -->
<div class="collapse navbar-collapse" id="navbarNav_top">
<ul class="navbar-nav">
<!-- <li class="nav-item">
<a class="nav-link">Citation</a>
</li>
<li class="nav-item">
<a class="nav-link">Feedback</a>
</li> -->
</ul>
</div>
</nav>
<div class="modal-header">
<h1 class="modal-title">File Loader</h1>
<!-- <button class="btn btn-link btn-lg mt-2 mr-auto" onclick="Toggle_File_Loader_Modal();">Close File Loader</button>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> -->
</div>
<div class="modal-body">
<!-- drag & drop file uploader -->
<form id="upload">
<fieldset>
<legend>Load CRESSP Output Files</legend>
<input type="hidden" id="MAX_FILE_SIZE" name="MAX_FILE_SIZE" value="300000" />
<div>
<label for="fileselect">Files to load:</label>
<input type="file" id="fileselect" name="fileselect[]" multiple="multiple" />
<div id="filedrag"><br><br><br>or Drag & Drop files here<br><br><br></div>
</div>
</fieldset>
</form>
<button id="btn_submit_files" class="btn btn-secondary btn-lg btn-block" data-dismiss="modal" onclick="Initialize_Viewer( )">Load Files</button>
<br>
<p>Status:</p>
<div id="container_file_message"></div>
<h1 class="modal-title">Usages</h1>
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img src="https://ahs2202.github.io/3M/images/3M_of_SARS-CoV-2.usage_main_graph.PNG" class="d-block w-100 mx-auto" style="max-width: 1700px !important;" alt="Explore cross-reactive immune epitopes">
<div class="carousel-caption d-none d-md-block">
<h2>Explore cross-reactive immune epitopes</h2>
<p>Toggle <b>help messages</b> by pressing <kbd>Cmd</kbd> + <kbd>H</kbd><br>Keyboard shorcuts can be found at the upper right corner</p>
</div>
</div>
<div class="carousel-item">
<img src="https://ahs2202.github.io/3M/images/3M_of_SARS-CoV-2.usage_filter.PNG" class="d-block w-100 mx-auto" style="max-width: 1700px !important;" alt="Filter cross-reactive immune epitopes">
<div class="carousel-caption d-none d-md-block">
<h2>Filter cross-reactive immune epitopes</h2>
<p>Multiple filters can be applied.<br>To remove a filter, click the filter again</p>
</div>
</div>
<div class="carousel-item">
<img src="https://ahs2202.github.io/3M/images/3M_of_SARS-CoV-2.usage_aligned_structures.PNG" class="d-block w-100 mx-auto" style="max-width: 1700px !important;" alt="Visualize Aligned Structures">
<div class="carousel-caption d-none d-md-block">
<h2>Visualize Aligned Structures</h2>
<p>Click a row in the aligned sequence table to highlight a pair of aligned residues on target and query structures<br>When protein structure is not available, a black screen will be shown</p>
<!-- Change the representation of protein structure <i>(Control Panel > Components > Polymer > Actions > Add Representation > Molecular Surface)</i><br> -->
</div>
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
<!--
<h2></h2>
<img src="https://ahs2202.github.io/3M/images/3M_of_SARS-CoV-2.cover.PNG" alt="introduction images" style="min-width:50%;max-width:90%;display: block;margin-left: auto;margin-right: auto;">
<br>
<div class="card mx-auto my-2" style="max-width: 60rem;">
<div class="card-body">
<h2 class="card-title">Abstract</h2>
<p class="card-text">The development of autoimmune diseases following SARS-CoV-2 infection, including multisystem inflammatory syndrome, has been reported, and several mechanisms have been suggested, including molecular mimicry. We developed a novel pipeline to identify cross-reactive epitopes between SARS-CoV-2 and query proteins using the structural properties of the proteins. Overall, by searching 4,911,245 proteins from 196,352 SARS-CoV-2 genomes, we identified 133 and 648 query proteins harboring potential cross-reactive B-cell and CD8+ T-cell epitopes, respectively. To demonstrate the robustness of our pipeline, we predicted the cross-reactive epitopes of coronatarget spike proteins, which were recognized by known cross-neutralizing antibodies. Using single-cell expression data, we identified PARP14 as a potential target of intermolecular epitope spreading between the target and query proteins. Finally, we developed a web application (https://ahs2202.github.io/3M/) to interactively visualize our results. Overall, our immunoinformatic resources provide a foundation for the investigation of molecular mimicry in the pathogenesis of autoimmune and chronic inflammatory diseases following COVID-19.</p>
</div>
<div class="mr-auto ml-auto"><a href="https://doi.org/10.1101/2020.11.12.344424" style="font-size: 1.35em; font-weight: bold" target="_blank" rel="noopener noreferrer" class="btn btn-link btn-sm mx-1 my-0" role="button" data-toggle="button" data-tooltip="tooltip" data-placement="bottom" data-html="true" title="Click to view our BioRXiv preprint">BioRXiv preprint<i class="material-icons icon-black" style="font-size: 0.9em">launch</i></a></div>
</div> -->
<!-- <h5 class="text-muted">This program has been developed by Hyunsu An at Gwangju Institute of Science and Technology under the supervision of Professor JiHwan Park.</h5> -->
<!-- <div class="card border-primary mx-auto my-2" style="max-width: 50rem;">
<div class="card-header">Instruction</div>
<div class="card-body text-primary">
<h5 class="card-title">basic usage</h5>
<p class="card-text">Click points to see details.</p>
</div>
</div> -->
</div>
<div class="modal-footer">
<h5 class="modal-title text-muted" style="text-align:center;">This program has been developed by Hyunsu An at Gwangju Institute of Science and Technology under the supervision of Professor JiHwan Park. (License: GPLv3)</h5>
</div>
<!-- <div class="card mx-auto my-2"><h5 class="text-muted" style="text-align:center;"></h5></div> -->
</div>
</div>
</div>
<div id="loading_screen"></div>
<script>
// packages
var DragSort=function(t){var e,i=0,s={},r={},a=(e=window.MutationObserver||window.WebKitMutationObserver,function(t,i){t&&1===t.nodeType&&(e?new e((function(t,e){i(t)})).observe(t,{childList:!0,subtree:!1}):window.addEventListener&&t.addEventListener("DOMNodeInserted",i,!1))});function n(t,e){if(!t)return this;e=e||{},this.parentElm=t,this.uid=e.uid,this.settings={selector:"*",callbacks:{}},Object.assign(this.settings,e),this.setup(),a(this.parentElm,this.setup.bind(this)),this.bindEvents()}return n.prototype={namespace:"dragsort",setup(){[...this.parentElm.childNodes].forEach(t=>{if(1!=t.nodeType)return t.parentNode.removeChild(t);t.matches(this.settings.selector)&&(t.draggable=!0)}),this.gap=this.getItemsGap(this.parentElm.firstElementChild)},throttle(t,e){var i=!1,s=this;return function(r){i||(t.call(s,r),i=!0,setTimeout(()=>i=!1,e))}},getDraggableElm(t){var e=t.closest('[draggable="true"]');return this.uid==s.uid?e:null},dragstart(t,e){s=this;var i,r=this.getDraggableElm(e);r?(this.source=this.getInitialState(),this.target=this.getInitialState(),i=r.getBoundingClientRect(),this.source.elm=r,this.source.idx=this.getNodeIndex(r),this.source.size.width=i.width,this.source.size.height=i.height,t.dataTransfer.effectAllowed="move",setTimeout(this.afterDragStart.bind(this))):s={}},afterDragStart(){var t="vertical"==this.settings.mode?"height":"width";this.parentElm.classList.add(this.namespace+"--dragStart"),this.source.elm.style[t]=this.source.size[t]+"px",this.source.elm.classList.add(this.namespace+"--dragElem")},dragover(t){t.preventDefault(),t.stopPropagation();var e=t.target;if((e=this.getDraggableElm(e))&&this.target){var i=this.target.elm,s=this.target.hoverDirection;t.dataTransfer.dropEffect="move",this.target.hoverDirection=this.getTargetDirection(t),i==e&&s==this.target.hoverDirection||this.directionAwareDragEnter(t,e)}},dragenter(t,e){(e=this.getDraggableElm(e))&&this.target&&this.isValidElm(e)&&this.source.elm!=e&&this.source.elm&&(this.target.bounding=e.getBoundingClientRect())},directionAwareDragEnter(t,e){var i;t.preventDefault(),t.stopPropagation(),t.dataTransfer.dropEffect="none",this.isValidElm(e)&&this.source.elm!=e&&this.source.elm&&(t.dataTransfer.dropEffect="move",this.cleanupLastTarget(),this.target.elm=e,this.target.idx=this.getNodeIndex(e),e.classList.add("over"),i=Math.abs(this.target.idx-this.source.idx),this.source.elm.classList.toggle(this.namespace+"--hide",i>0),"vertical"==this.settings.mode?this.target.elm.style[this.target.hoverDirection?"marginBottom":"marginTop"]=this.source.size.height+this.gap+"px":this.target.elm.style[this.target.hoverDirection?"marginRight":"marginLeft"]=this.source.size.width+this.gap+"px")},dragend(t){if(clearTimeout(this.dragoverTimeout),this.dragoverTimeout=null,this.parentElm.classList.remove(this.namespace+"--dragStart"),!this.isValidElm(this.target.elm))return this.cleanup();var e=this.target.hoverDirection?this.target.elm.nextElementSibling:this.target.elm;return this.source.elm!=this.target.elm&&this.target.elm&&(this.target.elm.classList.add(this.namespace+"--noAnim"),this.cleanup(),this.parentElm.insertBefore(this.source.elm,e)),this.source.elm&&this.source.elm.classList.remove(this.namespace+"--dragElem",this.namespace+"--hide"),this.settings.callbacks.dragEnd(this.source.elm),this},isTargetLastChild(){return this.parentElm.lastElementChild==this.target.elm},getTargetDirection(t){if(this.target.bounding)return"vertical"==this.settings.mode?t.pageY>this.target.bounding.top+this.target.bounding.height/2?1:0:t.pageX>this.target.bounding.left+this.target.bounding.width/2?1:0},getNodeIndex(t){for(var e=0;t=t.previousSibling;)3==t.nodeType&&/^\s*$/.test(t.data)||e++;return e},isValidElm(t){return t&&t.nodeType&&t.parentNode==this.parentElm},cleanup(){s={},[...this.parentElm.children].forEach(t=>{t.removeAttribute("style"),setTimeout(()=>{t.classList.remove(this.namespace+"--over",this.namespace+"--noAnim",this.namespace+"--dragElem")},50)})},cleanupLastTarget(){this.target.elm&&(this.target.elm.classList.remove(this.namespace+"--hide",this.namespace+"--over"),this.target.elm.removeAttribute("style"))},getInitialState:()=>({elm:null,size:{}}),getItemsGap(t){var e=getComputedStyle(t);return"vertical"==this.settings.mode?parseInt(e.marginTop)+parseInt(e.marginBottom):parseInt(e.marginLeft)+parseInt(e.marginRight)},bindEvents(t){for(var e in this.listeners=this.listeners||{dragstart:t=>this.dragstart(t,t.target),dragenter:t=>this.dragenter(t,t.target),dragend:t=>this.dragend(t,t.target),dragover:this.throttle(this.dragover,350)},this.listeners)this.parentElm[t?"removeEventListener":"addEventListener"](e,this.listeners[e])},destroy(){this.cleanup(),this.bindEvents(!0),delete r[this.uid]}},function(t,e){return r[++i]=t._DragSort?r[t._DragSort]:new n(t,{...e,uid:i}),t._DragSort=i,r[i]}}();
// MD5 hashing function from https://css-tricks.com/snippets/javascript/javascript-md5/
var MD5_from_String = function( string ) {
function RotateLeft(lValue, iShiftBits) {
return (lValue<<iShiftBits) | (lValue>>>(32-iShiftBits));
}
function AddUnsigned(lX,lY) {
var lX4,lY4,lX8,lY8,lResult;
lX8 = (lX & 0x80000000);
lY8 = (lY & 0x80000000);
lX4 = (lX & 0x40000000);
lY4 = (lY & 0x40000000);
lResult = (lX & 0x3FFFFFFF)+(lY & 0x3FFFFFFF);
if (lX4 & lY4) {
return (lResult ^ 0x80000000 ^ lX8 ^ lY8);
}
if (lX4 | lY4) {
if (lResult & 0x40000000) {
return (lResult ^ 0xC0000000 ^ lX8 ^ lY8);
} else {
return (lResult ^ 0x40000000 ^ lX8 ^ lY8);
}
} else {
return (lResult ^ lX8 ^ lY8);
}
}
function F(x,y,z) { return (x & y) | ((~x) & z); }
function G(x,y,z) { return (x & z) | (y & (~z)); }
function H(x,y,z) { return (x ^ y ^ z); }
function I(x,y,z) { return (y ^ (x | (~z))); }
function FF(a,b,c,d,x,s,ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(F(b, c, d), x), ac));
return AddUnsigned(RotateLeft(a, s), b);
};
function GG(a,b,c,d,x,s,ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(G(b, c, d), x), ac));
return AddUnsigned(RotateLeft(a, s), b);
};
function HH(a,b,c,d,x,s,ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(H(b, c, d), x), ac));
return AddUnsigned(RotateLeft(a, s), b);
};
function II(a,b,c,d,x,s,ac) {
a = AddUnsigned(a, AddUnsigned(AddUnsigned(I(b, c, d), x), ac));
return AddUnsigned(RotateLeft(a, s), b);
};
function ConvertToWordArray(string) {
var lWordCount;
var lMessageLength = string.length;
var lNumberOfWords_temp1=lMessageLength + 8;
var lNumberOfWords_temp2=(lNumberOfWords_temp1-(lNumberOfWords_temp1 % 64))/64;
var lNumberOfWords = (lNumberOfWords_temp2+1)*16;
var lWordArray=Array(lNumberOfWords-1);
var lBytePosition = 0;
var lByteCount = 0;
while ( lByteCount < lMessageLength ) {
lWordCount = (lByteCount-(lByteCount % 4))/4;
lBytePosition = (lByteCount % 4)*8;
lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount)<<lBytePosition));
lByteCount++;
}
lWordCount = (lByteCount-(lByteCount % 4))/4;
lBytePosition = (lByteCount % 4)*8;
lWordArray[lWordCount] = lWordArray[lWordCount] | (0x80<<lBytePosition);
lWordArray[lNumberOfWords-2] = lMessageLength<<3;
lWordArray[lNumberOfWords-1] = lMessageLength>>>29;
return lWordArray;
};
function WordToHex(lValue) {
var WordToHexValue="",WordToHexValue_temp="",lByte,lCount;
for (lCount = 0;lCount<=3;lCount++) {
lByte = (lValue>>>(lCount*8)) & 255;
WordToHexValue_temp = "0" + lByte.toString(16);
WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length-2,2);
}
return WordToHexValue;
};
function Utf8Encode(string) {
string = string.replace(/\r\n/g,"\n");
var utftext = "";
for (var n = 0; n < string.length; n++) {
var c = string.charCodeAt(n);
if (c < 128) {
utftext += String.fromCharCode(c);
}
else if((c > 127) && (c < 2048)) {
utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128);
}
else {
utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128);
}
}
return utftext;
};
var x=Array();
var k,AA,BB,CC,DD,a,b,c,d;
var S11=7, S12=12, S13=17, S14=22;
var S21=5, S22=9 , S23=14, S24=20;
var S31=4, S32=11, S33=16, S34=23;
var S41=6, S42=10, S43=15, S44=21;
string = Utf8Encode(string);
x = ConvertToWordArray(string);
a = 0x67452301; b = 0xEFCDAB89; c = 0x98BADCFE; d = 0x10325476;
for (k=0;k<x.length;k+=16) {
AA=a; BB=b; CC=c; DD=d;
a=FF(a,b,c,d,x[k+0], S11,0xD76AA478);
d=FF(d,a,b,c,x[k+1], S12,0xE8C7B756);
c=FF(c,d,a,b,x[k+2], S13,0x242070DB);
b=FF(b,c,d,a,x[k+3], S14,0xC1BDCEEE);
a=FF(a,b,c,d,x[k+4], S11,0xF57C0FAF);
d=FF(d,a,b,c,x[k+5], S12,0x4787C62A);
c=FF(c,d,a,b,x[k+6], S13,0xA8304613);
b=FF(b,c,d,a,x[k+7], S14,0xFD469501);
a=FF(a,b,c,d,x[k+8], S11,0x698098D8);
d=FF(d,a,b,c,x[k+9], S12,0x8B44F7AF);
c=FF(c,d,a,b,x[k+10],S13,0xFFFF5BB1);
b=FF(b,c,d,a,x[k+11],S14,0x895CD7BE);
a=FF(a,b,c,d,x[k+12],S11,0x6B901122);
d=FF(d,a,b,c,x[k+13],S12,0xFD987193);
c=FF(c,d,a,b,x[k+14],S13,0xA679438E);
b=FF(b,c,d,a,x[k+15],S14,0x49B40821);
a=GG(a,b,c,d,x[k+1], S21,0xF61E2562);
d=GG(d,a,b,c,x[k+6], S22,0xC040B340);
c=GG(c,d,a,b,x[k+11],S23,0x265E5A51);
b=GG(b,c,d,a,x[k+0], S24,0xE9B6C7AA);
a=GG(a,b,c,d,x[k+5], S21,0xD62F105D);
d=GG(d,a,b,c,x[k+10],S22,0x2441453);
c=GG(c,d,a,b,x[k+15],S23,0xD8A1E681);
b=GG(b,c,d,a,x[k+4], S24,0xE7D3FBC8);
a=GG(a,b,c,d,x[k+9], S21,0x21E1CDE6);
d=GG(d,a,b,c,x[k+14],S22,0xC33707D6);
c=GG(c,d,a,b,x[k+3], S23,0xF4D50D87);
b=GG(b,c,d,a,x[k+8], S24,0x455A14ED);
a=GG(a,b,c,d,x[k+13],S21,0xA9E3E905);
d=GG(d,a,b,c,x[k+2], S22,0xFCEFA3F8);
c=GG(c,d,a,b,x[k+7], S23,0x676F02D9);
b=GG(b,c,d,a,x[k+12],S24,0x8D2A4C8A);
a=HH(a,b,c,d,x[k+5], S31,0xFFFA3942);
d=HH(d,a,b,c,x[k+8], S32,0x8771F681);
c=HH(c,d,a,b,x[k+11],S33,0x6D9D6122);
b=HH(b,c,d,a,x[k+14],S34,0xFDE5380C);
a=HH(a,b,c,d,x[k+1], S31,0xA4BEEA44);
d=HH(d,a,b,c,x[k+4], S32,0x4BDECFA9);
c=HH(c,d,a,b,x[k+7], S33,0xF6BB4B60);
b=HH(b,c,d,a,x[k+10],S34,0xBEBFBC70);
a=HH(a,b,c,d,x[k+13],S31,0x289B7EC6);
d=HH(d,a,b,c,x[k+0], S32,0xEAA127FA);
c=HH(c,d,a,b,x[k+3], S33,0xD4EF3085);
b=HH(b,c,d,a,x[k+6], S34,0x4881D05);
a=HH(a,b,c,d,x[k+9], S31,0xD9D4D039);
d=HH(d,a,b,c,x[k+12],S32,0xE6DB99E5);
c=HH(c,d,a,b,x[k+15],S33,0x1FA27CF8);
b=HH(b,c,d,a,x[k+2], S34,0xC4AC5665);
a=II(a,b,c,d,x[k+0], S41,0xF4292244);
d=II(d,a,b,c,x[k+7], S42,0x432AFF97);
c=II(c,d,a,b,x[k+14],S43,0xAB9423A7);
b=II(b,c,d,a,x[k+5], S44,0xFC93A039);
a=II(a,b,c,d,x[k+12],S41,0x655B59C3);
d=II(d,a,b,c,x[k+3], S42,0x8F0CCC92);
c=II(c,d,a,b,x[k+10],S43,0xFFEFF47D);
b=II(b,c,d,a,x[k+1], S44,0x85845DD1);
a=II(a,b,c,d,x[k+8], S41,0x6FA87E4F);
d=II(d,a,b,c,x[k+15],S42,0xFE2CE6E0);
c=II(c,d,a,b,x[k+6], S43,0xA3014314);
b=II(b,c,d,a,x[k+13],S44,0x4E0811A1);
a=II(a,b,c,d,x[k+4], S41,0xF7537E82);
d=II(d,a,b,c,x[k+11],S42,0xBD3AF235);
c=II(c,d,a,b,x[k+2], S43,0x2AD7D2BB);
b=II(b,c,d,a,x[k+9], S44,0xEB86D391);
a=AddUnsigned(a,AA);
b=AddUnsigned(b,BB);
c=AddUnsigned(c,CC);
d=AddUnsigned(d,DD);
}
var temp = WordToHex(a)+WordToHex(b)+WordToHex(c)+WordToHex(d);
return temp.toLowerCase();
}
const string_hash = function(str, seed = 0) { // 'cyrb53' hash from https://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript
let h1 = 0xdeadbeef ^ seed, h2 = 0x41c6ce57 ^ seed;
for (let i = 0, ch; i < str.length; i++) {
ch = str.charCodeAt(i);
h1 = Math.imul(h1 ^ ch, 2654435761);
h2 = Math.imul(h2 ^ ch, 1597334677);
}
h1 = Math.imul(h1 ^ (h1>>>16), 2246822507) ^ Math.imul(h2 ^ (h2>>>13), 3266489909);
h2 = Math.imul(h2 ^ (h2>>>16), 2246822507) ^ Math.imul(h1 ^ (h1>>>13), 3266489909);
return 4294967296 * (2097151 & h2) + (h1>>>0);
};
let rand_seed = xmur3( "CRESSP Web Viewer" ), random_number_generator = mulberry32( rand_seed( ) ), MD5 = function( ) { return MD5_from_String( String( random_number_generator( ) ) ); }; // create MD5 hash from random number
// getElementById
function $id( id ) {
return document.getElementById( id );
}
function Dismissible_Alert( container, class_alert, message, id_dom = null, str_onclick_dismiss = null ) { // display a dismissible alert message of a given class_alert (eg. 'primary') at a given container with a given message // str_onclick_dismiss: string that will be added to onclick of the close button
$( container ).prepend( '<div class="alert alert-' + class_alert + ' alert-dismissible fade show"' + ( id_dom === null ? "" : ' id="' + id_dom + '"' ) + ' role="alert">' +
message +
'<button type="button" class="close" data-dismiss="alert" aria-label="Close" ' + ( str_onclick_dismiss === null ? "" : ' onclick="' + str_onclick_dismiss + '"' ) + '>' +
'<span aria-hidden="true">×</span>' +
'</button>' +
'</div>' );
}
// set up drag & drop file loader (ref: https://css-tricks.com/drag-and-drop-file-uploading/) (https://www.sitepoint.com/html5-file-drag-and-drop/) (2)