Repository navigation
Expand file tree
/
Copy pathdnaplot.html
More file actions
2865 lines (2647 loc) · 123 KB
/
Copy pathdnaplot.html
File metadata and controls
2865 lines (2647 loc) · 123 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
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">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DNAPLOT — Immunogenetic Alignment & Junction Analysis Portal</title>
<link rel="stylesheet" href="css/fonts.css">
<script src="js/vbase3_sdk.js"></script>
<style>
:root {
--bg-main: #090d16;
--bg-card: #111827;
--bg-card-alt: #1e293b;
--bg-elevated: #0f172a;
--border-color: #334155;
--border-light: #1e293b;
--text-primary: #f8fafc;
--text-secondary: #94a3b8;
--text-muted: #64748b;
--accent-cyan: #38bdf8;
--accent-blue: #3b82f6;
--accent-indigo: #818cf8;
--accent-purple: #c084fc;
--accent-emerald: #34d399;
--accent-amber: #fbbf24;
--accent-rose: #fb7185;
--radius-sm: 6px;
--radius-md: 10px;
--radius-lg: 14px;
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
--font-mono: 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: var(--font-sans);
background: var(--bg-main);
color: var(--text-primary);
min-height: 100vh;
padding: 24px;
line-height: 1.5;
}
/* HEADER */
.header-box {
background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #090d16 100%);
border: 1px solid var(--border-color);
border-radius: var(--radius-lg);
padding: 24px 32px;
margin-bottom: 24px;
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
position: relative;
overflow: hidden;
}
.header-box::after {
content: '';
position: absolute;
top: -50%;
right: -20%;
width: 400px;
height: 400px;
background: radial-gradient(circle, rgba(56, 189, 248, 0.12) 0%, rgba(129, 140, 248, 0.05) 40%, transparent 70%);
pointer-events: none;
}
.header-top {
display: flex;
justify-content: space-between;
align-items: flex-start;
flex-wrap: wrap;
gap: 16px;
}
.header-title {
font-size: 2.1rem;
font-weight: 800;
letter-spacing: -0.5px;
color: var(--text-primary);
display: flex;
align-items: center;
gap: 12px;
}
.header-title span.grad {
background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.header-badges {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.badge {
font-size: 11px;
font-weight: 700;
padding: 4px 10px;
border-radius: 6px;
letter-spacing: 0.3px;
text-transform: uppercase;
}
.badge-simd { background: rgba(52, 211, 153, 0.15); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.3); }
.badge-imgt { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
.badge-tcr { background: rgba(192, 132, 252, 0.15); color: #c084fc; border: 1px solid rgba(192, 132, 252, 0.3); }
.header-sub {
color: var(--text-secondary);
margin-top: 8px;
font-size: 0.95rem;
max-width: 900px;
}
.header-citation {
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid rgba(255,255,255,0.06);
font-size: 0.8rem;
color: var(--text-muted);
}
.header-citation strong { color: var(--text-secondary); }
.header-citation a { color: var(--accent-cyan); text-decoration: none; }
.header-citation a:hover { text-decoration: underline; }
/* NAVIGATION BAR */
.nav-tabs {
display: flex;
gap: 8px;
margin-bottom: 24px;
border-bottom: 2px solid var(--border-light);
padding-bottom: 8px;
flex-wrap: wrap;
}
.tab-btn {
background: var(--bg-card);
border: 1px solid var(--border-light);
color: var(--text-secondary);
padding: 10px 20px;
border-radius: var(--radius-sm);
font-weight: 600;
font-size: 14px;
cursor: pointer;
display: flex;
align-items: center;
gap: 8px;
transition: all 0.2s;
}
.tab-btn:hover {
background: var(--bg-card-alt);
color: var(--accent-cyan);
border-color: var(--border-color);
}
.tab-btn.active {
background: #0284c7;
color: white;
border-color: #38bdf8;
box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.25s ease-out; }
@keyframes fadeIn {
from { opacity: 0; transform: translateY(4px); }
to { opacity: 1; transform: translateY(0); }
}
/* CARDS & CONTAINERS */
.card {
background: var(--bg-card);
border: 1px solid var(--border-light);
border-radius: var(--radius-md);
padding: 24px;
margin-bottom: 24px;
box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.card-title {
font-size: 1.2rem;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 16px;
display: flex;
align-items: center;
gap: 10px;
}
.card-title .icon { font-size: 1.3rem; }
/* CONTROLS & FORMS */
.controls-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 16px;
margin-bottom: 18px;
}
.control-group {
display: flex;
flex-direction: column;
gap: 6px;
}
.control-label {
font-size: 12px;
font-weight: 600;
text-transform: uppercase;
color: var(--text-secondary);
letter-spacing: 0.5px;
}
.select-input, .text-input {
background: var(--bg-elevated);
color: var(--text-primary);
border: 1px solid var(--border-color);
padding: 10px 14px;
border-radius: var(--radius-sm);
font-size: 14px;
font-family: inherit;
outline: none;
transition: border-color 0.2s;
}
.select-input:focus, .text-input:focus {
border-color: var(--accent-cyan);
box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}
/* PRESETS ROW */
.presets-row {
display: flex;
gap: 8px;
flex-wrap: wrap;
margin-bottom: 16px;
align-items: center;
}
.preset-label {
font-size: 12px;
color: var(--text-muted);
font-weight: 600;
text-transform: uppercase;
margin-right: 4px;
}
.preset-chip {
background: var(--bg-card-alt);
border: 1px solid var(--border-color);
color: #cbd5e1;
padding: 6px 12px;
border-radius: 20px;
font-size: 12px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s;
display: flex;
align-items: center;
gap: 6px;
}
.preset-chip:hover {
background: #334155;
color: var(--accent-cyan);
border-color: var(--accent-cyan);
transform: translateY(-1px);
}
/* GUIDELINES & FILE UPLOAD */
.guide-panel {
background: #080e1a;
border: 1px solid #1e293b;
border-radius: var(--radius-sm);
padding: 14px 16px;
margin-bottom: 12px;
animation: fadeIn 0.15s ease-in-out;
}
.guide-tab-bar {
display: flex;
gap: 6px;
border-bottom: 1px solid #1e293b;
padding-bottom: 6px;
margin-bottom: 10px;
flex-wrap: wrap;
}
.guide-tab {
background: #1e293b;
border: 1px solid #334155;
color: #94a3b8;
padding: 5px 12px;
border-radius: 4px;
font-size: 11.5px;
font-weight: 700;
cursor: pointer;
transition: all 0.15s ease;
}
.guide-tab:hover {
color: #ffffff;
border-color: #475569;
}
.guide-tab.active {
background: rgba(56, 189, 248, 0.15);
border-color: #38bdf8;
color: #38bdf8;
}
.guide-code {
background: #030712;
border: 1px solid #1e293b;
border-radius: 4px;
padding: 8px 12px;
font-family: var(--font-mono);
font-size: 11px;
color: #a5f3fc;
overflow-x: auto;
white-space: pre;
margin: 0;
}
.textarea-dragover {
border-color: #38bdf8 !important;
box-shadow: 0 0 16px rgba(56, 189, 248, 0.4) !important;
background: rgba(2, 132, 199, 0.08) !important;
}
/* TEXTAREA */
textarea {
width: 100%;
background: var(--bg-elevated);
color: #38bdf8;
font-family: var(--font-mono);
font-size: 13px;
line-height: 1.6;
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
padding: 14px;
min-height: 140px;
resize: vertical;
outline: none;
transition: border-color 0.2s;
}
textarea:focus {
border-color: var(--accent-cyan);
box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}
/* BUTTONS */
.btn-row {
display: flex;
gap: 12px;
margin-top: 16px;
flex-wrap: wrap;
align-items: center;
}
.btn {
display: inline-flex;
align-items: center;
gap: 8px;
background: var(--accent-blue);
color: white;
border: none;
padding: 10px 20px;
border-radius: var(--radius-sm);
font-weight: 600;
font-size: 14px;
cursor: pointer;
transition: all 0.2s;
text-decoration: none;
}
.btn:hover {
background: #2563eb;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.btn-primary {
background: linear-gradient(135deg, #0284c7 0%, #6366f1 100%);
box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}
.btn-primary:hover {
background: linear-gradient(135deg, #0369a1 0%, #4f46e5 100%);
}
.btn-secondary {
background: var(--bg-card-alt);
color: var(--text-secondary);
border: 1px solid var(--border-color);
}
.btn-secondary:hover {
background: #334155;
color: var(--text-primary);
}
/* KPI DASHBOARD */
.kpi-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
gap: 14px;
margin-bottom: 24px;
}
.kpi-card {
background: var(--bg-elevated);
border: 1px solid var(--border-color);
border-radius: var(--radius-sm);
padding: 16px;
border-left: 4px solid var(--accent-cyan);
transition: transform 0.2s;
}
.kpi-card:hover { transform: translateY(-2px); }
.kpi-card.v-gene { border-left-color: #38bdf8; }
.kpi-card.d-gene { border-left-color: #c084fc; }
.kpi-card.j-gene { border-left-color: #fbbf24; }
.kpi-card.cdr3 { border-left-color: #34d399; }
.kpi-card.status { border-left-color: #f43f5e; }
.kpi-title { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.5px; }
.kpi-val { font-size: 1.15rem; font-weight: 800; color: var(--text-primary); margin-top: 4px; font-family: var(--font-mono); word-break: break-all; }
.kpi-sub { font-size: 11px; color: var(--text-secondary); margin-top: 4px; }
/* SECTION CONTAINERS */
.result-section {
background: var(--bg-elevated);
border: 1px solid var(--border-color);
border-radius: var(--radius-md);
padding: 20px;
margin-bottom: 20px;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 14px;
padding-bottom: 8px;
border-bottom: 1px solid var(--border-light);
}
.section-title {
font-size: 1rem;
font-weight: 700;
color: var(--accent-cyan);
display: flex;
align-items: center;
gap: 8px;
}
/* ALIGNMENT BLOCKS (PRE/MONO) */
.alignment-box {
background: #050811;
border: 1px solid #1e293b;
border-radius: var(--radius-sm);
padding: 16px;
font-family: var(--font-mono);
font-size: 12px;
line-height: 1.9;
color: #cbd5e1;
overflow-x: auto;
white-space: pre;
}
.al-row { display: flex; }
.al-label { width: 140px; flex-shrink: 0; font-weight: 700; }
.al-label.germ { color: #60a5fa; }
.al-label.match { color: #34d399; }
.al-label.query { color: #4ade80; }
.al-label.annot { color: #f43f5e; }
.al-label.ruler { color: #94a3b8; }
.al-seq { letter-spacing: 1px; }
.toggle-pill {
background: transparent;
border: none;
color: var(--text-muted);
font-size: 11px;
font-weight: 600;
padding: 3px 8px;
border-radius: 4px;
cursor: pointer;
transition: all 0.15s ease;
font-family: var(--font-sans);
}
.toggle-pill:hover {
color: var(--text-primary);
}
.toggle-pill.active {
background: var(--accent-cyan);
color: #030712;
font-weight: 700;
}
.mut-tag {
background: #f43f5e;
color: white;
font-weight: 800;
padding: 1px 3px;
border-radius: 3px;
}
.match-dot { color: #475569; }
/* JUNCTION BLOCK DIAGRAM */
.junction-diagram {
display: flex;
flex-wrap: wrap;
gap: 4px;
margin: 16px 0;
padding: 12px;
background: #050811;
border-radius: var(--radius-sm);
border: 1px solid var(--border-light);
}
.j-block {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 8px 12px;
border-radius: 6px;
font-family: var(--font-mono);
min-width: 70px;
}
.j-block .j-name { font-size: 10px; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.j-block .j-seq { font-size: 12px; font-weight: 800; letter-spacing: 0.5px; }
.j-block .j-len { font-size: 10px; opacity: 0.75; margin-top: 2px; }
.j-v { background: rgba(56, 189, 248, 0.15); border: 1px solid #38bdf8; color: #38bdf8; }
.j-p1 { background: rgba(245, 158, 11, 0.15); border: 1px solid #f59e0b; color: #f59e0b; }
.j-n1 { background: rgba(239, 68, 68, 0.15); border: 1px solid #ef4444; color: #ef4444; }
.j-d { background: rgba(168, 85, 247, 0.15); border: 1px solid #a855f7; color: #c084fc; }
.j-p2 { background: rgba(245, 158, 11, 0.15); border: 1px solid #f59e0b; color: #f59e0b; }
.j-n2 { background: rgba(239, 68, 68, 0.15); border: 1px solid #ef4444; color: #ef4444; }
.j-j { background: rgba(34, 197, 94, 0.15); border: 1px solid #22c55e; color: #4ade80; }
/* PROTEIN CHEMISTRY DISPLAY */
.protein-ribbon {
display: flex;
flex-wrap: wrap;
gap: 3px;
padding: 14px;
background: #050811;
border: 1px solid #1e293b;
border-radius: var(--radius-sm);
margin: 12px 0;
}
.aa-chip {
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 26px;
height: 38px;
border-radius: 4px;
font-family: var(--font-mono);
font-size: 12px;
font-weight: 700;
position: relative;
}
.aa-chip .aa-pos {
font-size: 8px;
color: rgba(255,255,255,0.5);
position: absolute;
top: 2px;
}
.aa-chip .aa-char {
margin-top: 10px;
}
/* AA Chemical Classes */
.aa-aliphatic { background: #1e3a8a; color: #93c5fd; } /* L, I, V, M, A */
.aa-aromatic { background: #581c87; color: #d8b4fe; } /* F, Y, W */
.aa-basic { background: #881337; color: #fda4af; } /* K, R, H */
.aa-acidic { background: #064e3b; color: #6ee7b7; } /* D, E */
.aa-polar { background: #78350f; color: #fcd34d; } /* S, T, N, Q */
.aa-cys { background: #ca8a04; color: #fef08a; border: 1px solid #fef08a; font-weight: 900; } /* C */
.aa-pro { background: #701a75; color: #f5d0fe; } /* P */
.aa-gly { background: #334155; color: #cbd5e1; } /* G */
.aa-legend {
display: flex;
gap: 12px;
flex-wrap: wrap;
font-size: 11px;
color: var(--text-secondary);
margin-top: 8px;
}
.aa-legend-item {
display: flex;
align-items: center;
gap: 6px;
}
.aa-legend-box {
width: 12px;
height: 12px;
border-radius: 2px;
}
/* TABLES */
.data-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
margin: 12px 0;
}
.data-table th, .data-table td {
padding: 10px 14px;
text-align: left;
border-bottom: 1px solid var(--border-light);
}
.data-table th {
background: var(--bg-card-alt);
color: var(--text-secondary);
font-weight: 600;
text-transform: uppercase;
font-size: 11px;
letter-spacing: 0.5px;
}
.data-table tr:hover td {
background: rgba(255,255,255,0.02);
}
/* COLLIER DE PERLES MODAL & 2D PEARL NECKLACE */
.collier-modal-backdrop {
position: fixed;
top: 0; left: 0; right: 0; bottom: 0;
background: rgba(4, 9, 16, 0.88);
backdrop-filter: blur(14px);
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
padding: 16px;
}
.collier-modal-card {
background: rgba(13, 27, 42, 0.98);
border: 1px solid var(--border-color);
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
border-radius: var(--radius-md);
width: 100%;
max-width: 1060px;
max-height: 94vh;
display: flex;
flex-direction: column;
overflow: hidden;
animation: modalFadeIn 0.2s ease-out;
}
@keyframes modalFadeIn {
from { opacity: 0; transform: scale(0.97); }
to { opacity: 1; transform: scale(1); }
}
.collier-modal-header {
padding: 16px 24px;
border-bottom: 1px solid var(--border-light);
display: flex;
justify-content: space-between;
align-items: center;
background: rgba(6, 13, 23, 0.9);
}
.collier-modal-body {
padding: 18px 24px 24px 24px;
overflow-y: auto;
display: flex;
flex-direction: column;
align-items: center;
}
.collier-canvas-box {
background: #060d17;
border: 1px solid var(--border-light);
border-radius: 12px;
width: 100%;
overflow-x: auto;
display: flex;
justify-content: center;
padding: 14px;
position: relative;
}
.pearl-circle {
cursor: pointer;
transition: transform 0.15s ease, filter 0.15s ease;
}
.pearl-circle:hover {
transform: scale(1.25);
filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.8));
}
/* TOAST NOTIFICATION */
#toast {
position: fixed;
bottom: 24px;
right: 24px;
background: #0284c7;
color: white;
padding: 12px 20px;
border-radius: var(--radius-sm);
font-weight: 600;
font-size: 14px;
box-shadow: 0 10px 25px rgba(0,0,0,0.5);
opacity: 0;
transform: translateY(20px);
transition: all 0.3s;
pointer-events: none;
z-index: 9999;
}
#toast.show {
opacity: 1;
transform: translateY(0);
}
</style>
</head>
<body>
<!-- HEADER -->
<div class="header-box">
<div class="header-top" style="display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap;">
<div style="display:flex; align-items:center; gap:16px;">
<a href="index.html" title="Return to VBASE3 Hub" style="display:flex; align-items:center; text-decoration:none;">
<img src="images/vbase3_logo.jpg" alt="VBASE3 Logo" style="height:48px; width:auto; border-radius:8px; box-shadow:0 2px 12px rgba(0,0,0,0.6); object-fit:contain; background:#ffffff; padding:2px; cursor:pointer;" />
</a>
<div>
<div class="header-title">
<span>🧬</span>
<span class="grad">DNAPLOT</span>
<span style="font-weight: 400; font-size: 1.5rem; color: var(--text-muted); margin: 0 4px;">|</span>
<span style="font-size: 1.3rem; font-weight: 600; color: var(--text-secondary);">Immunogenetic Alignment & Junction Analysis Portal</span>
</div>
<div class="header-sub">
The canonical high-speed V(D)J alignment, junction deconstruction, and somatic hypermutation analysis suite.
</div>
</div>
</div>
<div class="header-badges">
<span class="badge badge-simd" id="engineStatusBadge">⚡ RUST SIMD ENGINE</span>
<span class="badge badge-imgt">IMGT COLLINEAR GRID</span>
<span class="badge badge-tcr">BCR & TCR DUAL-STACK</span>
</div>
</div>
<div class="header-citation">
<strong>Historical Attribution:</strong> DNAPLOT was originally designed by Werner Müller and Hans-Helmar Althaus at the University of Cologne as the founding alignment algorithm that powered early <em>IMGT/V-QUEST</em> (Giudicelli V, Müller W, et al. <em>Nucleic Acids Res.</em> 1997, PMID: <a href="https://pubmed.ncbi.nlm.nih.gov/9016537/" target="_blank">9016537</a>; Lefranc MP, et al. <em>Nucleic Acids Res.</em> 1998, PMID: <a href="https://pubmed.ncbi.nlm.nih.gov/9399859/" target="_blank">9399859</a>). It subsequently served as the core sequence alignment and search page for the automated <em>VBASE2</em> relational database (Retter I, Althaus HH, Münch R, Müller W. <em>Nucleic Acids Res.</em> 2005, PMID: <a href="https://pubmed.ncbi.nlm.nih.gov/15608286/" target="_blank">15608286</a>; Retter I. PhD Thesis, TU Braunschweig 2006, <a href="https://leopard.tu-braunschweig.de/receive/dbbs_mods_00013341" target="_blank">leopard:dbbs_mods_00013341</a>).
</div>
</div>
<!-- NAVIGATION TABS -->
<div class="nav-tabs">
<button class="tab-btn" style="background:rgba(217,119,6,0.25); border:1px solid #f59e0b; color:#fbbf24; font-weight:700;" onclick="window.open('https://doi.org/10.5281/zenodo.22923345','_blank')" title="Download complete database tables and catalogs from Zenodo">📦 Zenodo Data ↗</button>
<button class="tab-btn" style="background:#0284c7; color:#ffffff; font-weight:700;" onclick="window.location.href='index.html'" title="Return to Portal Home">🏠 Portal Home</button>
<button class="tab-btn active" id="tabBtn_detailed" onclick="switchMainTab('detailed')">🔬 Detailed Analysis View</button>
<button class="tab-btn" id="tabBtn_synthesis" onclick="switchMainTab('synthesis')">📊 Synthesis View (Batch Comparison)</button>
<button class="tab-btn" style="margin-left: auto; color:#10b981; font-weight:700;" onclick="window.location.href='vbase3_status.html'">📊 Status & Coverage</button>
<button class="tab-btn" style="color:#38bdf8; font-weight:700;" onclick="window.location.href='repertoire_analysis.html'">📊 Repertoire Analysis</button>
<button class="tab-btn" onclick="window.location.href='mouse_vbase3_analyzer.html'" style="color:#34d399;">🐭 Mouse</button>
<button class="tab-btn" onclick="window.location.href='rabbit_vbase3_analyzer.html'" style="color:#60a5fa;">🐇 Rabbit</button>
<button class="tab-btn" onclick="window.location.href='camelid_vbase3_analyzer.html'" style="color:#c084fc;">🦙 Camelid (VHH)</button>
<button class="tab-btn" onclick="window.location.href='dog_vbase3_analyzer.html'" style="color:#fbbf24;">🐕 Dog</button>
<button class="tab-btn" onclick="window.location.href='chicken_vbase3_analyzer.html'" style="color:#f87171;">🐔 Chicken</button>
<button class="tab-btn" onclick="window.location.href='xenopus_du_pasquier_hsu.html'" style="color:#10b981;">🐸 Xenopus</button>
<button class="tab-btn" onclick="window.location.href='vgene_pacmap_universe.html'">🛡️ BCRbase</button>
<button class="tab-btn" onclick="window.location.href='tcr_universe.html'">🧬 TCRbase</button>
<button class="tab-btn" onclick="window.location.href='vbase2_universe.html'">🌐 VBASE2</button>
</div>
<!-- INPUT & SETTINGS CARD -->
<div class="card">
<div class="card-title">
<span class="icon">⚙️</span>
<span>Sequence Submission & Target Configuration</span>
</div>
<div class="controls-grid">
<div class="control-group">
<label class="control-label" for="speciesSelect">Species Target</label>
<select id="speciesSelect" class="select-input">
<option value="auto" selected>🌐 Auto-Deduce (All Vertebrates)</option>
<option value="human">👨 Human (Homo sapiens)</option>
<option value="mouse">🐭 Mouse (Mus musculus)</option>
<option value="rat">🐀 Rat (Rattus norvegicus)</option>
<option value="rhesus">🐒 Rhesus Macaque (Macaca mulatta)</option>
<option value="cynomolgus">🐵 Cynomolgus (Macaca fascicularis)</option>
<option value="pig">🐷 Pig (Sus domesticus)</option>
<option value="horse">🐴 Horse (Equus caballus)</option>
<option value="sheep">🐑 Sheep (Ovis aries)</option>
<option value="bovine">🐮 Cattle / Bovine (Bos taurus)</option>
<option value="dog">🐕 Dog (Canis lupus familiaris)</option>
<option value="rabbit">🐰 Rabbit (Oryctolagus cuniculus)</option>
<option value="alpaca">🐫 Alpaca / Camelid (Vicugna pacos)</option>
<option value="chicken">🐔 Chicken (Gallus gallus)</option>
<option value="xenopus">🐸 Xenopus (X. tropicalis / laevis)</option>
<option value="zebrafish">🐟 Zebrafish (Danio rerio)</option>
</select>
</div>
<div class="control-group">
<label class="control-label" for="locusSelect">Receptor / Chain Locus</label>
<select id="locusSelect" class="select-input">
<option value="auto" selected>⚡ Auto-Deduce (BCR & TCR)</option>
<option value="IGH">Heavy Chain (IGHV)</option>
<option value="IGK">Kappa Light Chain (IGKV)</option>
<option value="IGL">Lambda Light Chain (IGLV)</option>
<option value="TRB">T-Cell Receptor Beta (TRBV)</option>
<option value="TRA">T-Cell Receptor Alpha (TRAV)</option>
<option value="TRG">T-Cell Receptor Gamma (TRGV)</option>
<option value="TRD">T-Cell Receptor Delta (TRDV)</option>
</select>
</div>
<div class="control-group">
<label class="control-label" for="ntPerLine">Display Width (bp / line)</label>
<select id="ntPerLine" class="select-input">
<option value="60" selected>60 bp (Classic IMGT)</option>
<option value="90">90 bp</option>
<option value="120">120 bp</option>
<option value="1000">Single Line (Unwrapped)</option>
</select>
</div>
</div>
<!-- PRESET CHIPS -->
<div class="presets-row">
<span class="preset-label">Landmark Presets:</span>
<button class="preset-chip" onclick="loadSample('musIGHV044')">🐭 MMU_IGHV_C3F2.16_04*01 [musIGHV044 / V186.2]</button>
<button class="preset-chip" onclick="loadSample('humIGHV3-23')">👨 HSA_IGHV_C3F3.499_02*01 [humIGHV3-23 / DP-47]</button>
<button class="preset-chip" onclick="loadSample('humIGLV1-40')">👨 HSA_IGLV_C2F5.05_02*01 [humIGLV1-40]</button>
<button class="preset-chip" onclick="loadSample('musIGKV243')">🐭 MMU_IGKV_C1F6.16_03*00 [musIGKV243 / Vκ21D]</button>
<button class="preset-chip" onclick="loadSample('humTRBV12-4')">🧬 HSA_TRBV_C1F12.04_01*01 [humTRBV12-4]</button>
<button class="preset-chip" onclick="loadSample('humTRAV12-2')">🧬 HSA_TRAV_C1F12.02_01*01 [humTRAV12-2]</button>
<button class="preset-chip" onclick="loadSample('vicVHH')">🐫 VPA_IGHV_C3F3.599_01*01 [vicVHH / TFR1]</button>
</div>
<!-- INPUT TOOLBAR: FILE UPLOAD & FORMAT GUIDELINES -->
<div style="display:flex; justify-content:space-between; align-items:center; margin-top:14px; margin-bottom:10px; flex-wrap:wrap; gap:8px;">
<div style="display:flex; align-items:center; gap:8px;">
<button class="btn btn-secondary" style="padding:6px 14px; font-size:12px; background:#1e293b; border:1px solid #38bdf8; color:#f8fafc;" onclick="document.getElementById('dnaplotFileInput').click()">
<span>📂</span> <span>Upload FASTA / Text File</span>
</button>
<input type="file" id="dnaplotFileInput" accept=".fasta,.fa,.txt,.seq,.gb" style="display:none;" onchange="handleDnaplotFileUpload(event)">
<span id="dnaplotFileBadge" style="display:none; font-size:11px; color:#38bdf8; font-weight:700; background:rgba(56,189,248,0.1); padding:4px 8px; border-radius:4px; border:1px solid rgba(56,189,248,0.3);"></span>
</div>
<div style="display:flex; align-items:center; gap:8px; flex-wrap:wrap;">
<button class="btn btn-secondary" style="padding:6px 12px; font-size:12px; border-color:#38bdf8; color:#38bdf8;" onclick="toggleDnaplotGuide()">
<span>💡</span> <span>Sequence Format Guidelines</span>
</button>
<button class="btn btn-secondary" style="padding:6px 10px; font-size:11px;" onclick="insertDnaplotExample('dna')">
<span>📋</span> <span>Insert DNA Example</span>
</button>
<button class="btn btn-secondary" style="padding:6px 10px; font-size:11px;" onclick="insertDnaplotExample('protein')">
<span>📋</span> <span>Insert Protein Example</span>
</button>
</div>
</div>
<!-- FORMAT GUIDELINE DRAWER -->
<div id="dnaplotFormatGuide" class="guide-panel" style="display:none;">
<div style="font-size:12px; font-weight:700; color:#38bdf8; margin-bottom:8px; display:flex; justify-content:space-between; align-items:center;">
<span>📖 Sequence Format Guidelines & Physiological Boundary Invariants:</span>
<span style="font-size:11px; color:#94a3b8;">Choose format below or click 'Insert Example' to test immediately</span>
</div>
<div class="guide-tab-bar">
<button class="guide-tab active" id="dnaplotTab_dna" onclick="switchDnaplotGuideTab('dna')">1. Nucleotide DNA FASTA</button>
<button class="guide-tab" id="dnaplotTab_protein" onclick="switchDnaplotGuideTab('protein')">2. Amino Acid Protein FASTA</button>
<button class="guide-tab" id="dnaplotTab_raw" onclick="switchDnaplotGuideTab('raw')">3. Raw Unformatted String</button>
</div>
<div id="dnaplotGuideContent_dna" class="guide-content">
<p style="font-size:11.5px; color:#cbd5e1; margin-bottom:6px;">
<strong>Nucleotide DNA:</strong> Provide variable domain in any reading frame (the engine automatically detects the correct productive reading frame and mature FR1 anchor). Variable domain terminates strictly at canonical J-segment boundary (`TVSS`/`TVSA` or `VEIK`/`LEIK`/`TVL`).
</p>
<pre class="guide-code">>humIGHV3-23_VH Trastuzumab_Reference
GAGGTGCAGCTGGTGGAGTCTGGGGGAGGCTTGGTCCAGCCTGGGGGGTCCCTGAGACTCTCCTGTGCAGCCTCTGGATTCAACATCAAAGACACCTATATACACTGGGTGCGTCAGGCCCCGGGTAAGGGCCTGGAATGGGTTGCAAGGATTTATCCTACGAATGGTTATACTAGATATGCCGATAGCGTCAAGGGCCGTTTCACCATAAGCGCAGACACATCCAAAAACACAGCCTACCTGCAGATGAACAGCCTGAGAGCCGAGGACACGGCCGTGTATTACTGTTCGAGATGGGGAGGGGACGGCTTCTATGCTATGGACTACTGGGGCCAAGGAACCCTGGTCACCGTCTCCTCA</pre>
</div>
<div id="dnaplotGuideContent_protein" class="guide-content" style="display:none;">
<p style="font-size:11.5px; color:#cbd5e1; margin-bottom:6px;">
<strong>Protein Amino Acid:</strong> Standard IUPAC single-letter amino acid code. Variable domains are automatically numbered using the IMGT Unique Numbering scheme, anchoring at Cys23, Trp41, Leu89, and Cys104.
</p>
<pre class="guide-code">>humIGHV3-23_AA Canonical_Human_Framework
EVQLVESGGGLVQPGGSLRLSCAASGFNIKDTYIHWVRQAPGKGLEWVARIYPTNGYTRYADSVKGRFTISADTSKNTAYLQMNSLRAEDTAVYYCSRWGGDGFYAMDYWGQGTLVTVSS</pre>
</div>
<div id="dnaplotGuideContent_raw" class="guide-content" style="display:none;">
<p style="font-size:11.5px; color:#cbd5e1; margin-bottom:6px;">
<strong>Raw Sequence Intake:</strong> You can paste raw unformatted text directly into the box. Whitespace, numbers, FASTA headers, line breaks, and trailing spaces are automatically cleansed by WebAssembly.
</p>
<pre class="guide-code">EVQLVESGGGLVQPGGSLRLSCAASGFNIKDTYIHWVRQAPGKGLEWVARIYPTNGYTRYADSVKGRFTISADTSKNTAYLQMNSLRAEDTAVYYCSRWGGDGFYAMDYWGQGTLVTVSS</pre>
</div>
</div>
<!-- SEQUENCE INPUT -->
<textarea id="sequenceInput" placeholder=">Sequence_Identifier Paste nucleotide (DNA) or amino acid sequence(s) in FASTA or raw format, or drop file here..."></textarea>
<!-- ACTION BUTTONS -->
<div class="btn-row">
<button class="btn btn-primary" id="runAnalyzeBtn" onclick="executeDnaplotAnalysis()">
<span>⚡</span>
<span>Run DNAPLOT Analysis</span>
</button>
<button class="btn btn-secondary" onclick="clearInput()">
<span>🧹</span>
<span>Clear</span>
</button>
<span id="timingBadge" style="margin-left: auto; font-family: var(--font-mono); font-size: 12px; color: var(--text-muted);">Ready for analysis</span>
</div>
</div>
<!-- TAB CONTENT 1: DETAILED VIEW -->
<div id="tab_detailed" class="tab-content active">
<!-- KPI DASHBOARD -->
<div class="kpi-grid" id="kpiDashboard" style="display: none;">
<div class="kpi-card v-gene">
<div class="kpi-title">V-GENE & Allele</div>
<div class="kpi-val" id="kpi_vgene">—</div>
<div class="kpi-sub" id="kpi_vsub">—</div>
</div>
<div class="kpi-card d-gene">
<div class="kpi-title">D-GENE Match</div>
<div class="kpi-val" id="kpi_dgene">—</div>
<div class="kpi-sub" id="kpi_dsub">—</div>
</div>
<div class="kpi-card j-gene">
<div class="kpi-title">J-GENE & Boundary</div>
<div class="kpi-val" id="kpi_jgene">—</div>
<div class="kpi-sub" id="kpi_jsub">—</div>
</div>
<div class="kpi-card cdr3">
<div class="kpi-title">CDR3 & Lengths</div>
<div class="kpi-val" id="kpi_cdr3">—</div>
<div class="kpi-sub" id="kpi_cdrlengths">—</div>
</div>
<div class="kpi-card status">
<div class="kpi-title">Productivity Status</div>
<div class="kpi-val" id="kpi_status">—</div>
<div class="kpi-sub" id="kpi_statussub">—</div>
</div>
</div>
<!-- COLLIER DE PERLES ACTION BAR -->
<div style="display: flex; justify-content: space-between; align-items: center; margin: 14px 0 10px 0; background: rgba(13,27,42,0.6); padding: 12px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border-light);" id="collierActionBar">
<div>
<div style="font-size: 13.5px; font-weight: 600; color: #f1f5f9;">📿 IMGT Collier de Perles (2D Pearl Necklace)</div>
<div style="font-size: 11.5px; color: var(--text-muted); margin-top: 2px;">
Planar 2D structural layout published in <em>Nucleic Acids Res.</em> 1998 (Lefranc, Giudicelli, Busin, Bodmer, Müller et al. <a href="https://doi.org/10.1093/nar/26.1.297" target="_blank" rel="noopener" style="color:#38bdf8; text-decoration:underline;">DOI: 10.1093/nar/26.1.297 ↗</a> | <a href="https://pubmed.ncbi.nlm.nih.gov/9399859/" target="_blank" rel="noopener" style="color:#34d399; text-decoration:underline;">PMID: 9399859 ↗</a>)
</div>
</div>
<button class="btn btn-primary" onclick="openCollierDePerlesModal()" style="background: linear-gradient(135deg, #0284c7, #10b981); box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35); font-weight: 700; padding: 8px 18px; border-radius: 8px; display: inline-flex; align-items: center; gap: 8px;">
<span>📿</span>
<span>View IMGT Collier de Perles (2D)</span>
</button>
</div>
<!-- 1. V-GENE ALIGNMENT -->
<div class="result-section" id="vAlignSection" style="display: none;">
<div class="section-header" style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;">
<div class="section-title">
<span>1.</span>
<span>Alignment for V-GENE and Allele Identification</span>
</div>
<div style="display: flex; align-items: center; gap: 12px;">
<span style="font-size: 11px; color: var(--text-muted); font-family: var(--font-mono);">Bars (|) indicate identity; red indicates SHM mismatch</span>
<div style="display: flex; gap: 4px; background: rgba(15,23,42,0.8); padding: 2px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.08);">
<button id="btnAlignFull" class="toggle-pill active" onclick="setAlignDisplayMode('full')">Full Sequence</button>
<button id="btnAlignDots" class="toggle-pill" onclick="setAlignDisplayMode('dots')">Identity Dots (.)</button>
</div>
</div>
</div>
<div class="alignment-box" id="vAlignBox"></div>
</div>
<!-- 2. JUNCTION ANALYSIS DECONSTRUCTION -->
<div class="result-section" id="junctionSection" style="display: none;">
<div class="section-header">
<div class="section-title">
<span>2.</span>
<span>Results of IMGT/JunctionAnalysis Deconstruction</span>
</div>
<span style="font-size: 11px; color: var(--text-muted);">Decomposition into V, P, N1, D, N2, and J contributions</span>
</div>
<div class="junction-diagram" id="junctionDiagram"></div>
<div id="junctionStatsTable"></div>
</div>
<!-- 3. COLLINEAR IMGT UNIQUE NUMBERING GRID -->
<div class="result-section" id="imgtGridSection" style="display: none;">
<div class="section-header">
<div class="section-title">
<span>3.</span>
<span>Collinear IMGT Unique Numbering Grid (Positions 1 to 128)</span>
</div>
<span style="font-size: 11px; color: var(--text-muted); font-family: var(--font-mono);">FR1 (1-26) | CDR1 (27-38) | FR2 (39-55) | CDR2 (56-65) | FR3 (66-104) | CDR3 (105-117) | FR4 (118-128)</span>
</div>
<div class="alignment-box" id="imgtGridBox"></div>
</div>
<!-- 4. PROTEIN CHEMISTRY DISPLAY -->
<div class="result-section" id="proteinSection" style="display: none;">
<div class="section-header">
<div class="section-title">
<span>4.</span>
<span>V-REGION Protein Display (Chemical Property Colors)</span>
</div>
<span style="font-size: 11px; color: var(--text-muted);">Standard immunogenetic amino acid property stratification</span>
</div>
<div class="protein-ribbon" id="proteinRibbon"></div>
<div class="aa-legend">
<div class="aa-legend-item"><div class="aa-legend-box" style="background:#1e3a8a;"></div><span>Aliphatic/Hydrophobic (A,V,L,I,M)</span></div>
<div class="aa-legend-item"><div class="aa-legend-box" style="background:#581c87;"></div><span>Aromatic (F,Y,W)</span></div>
<div class="aa-legend-item"><div class="aa-legend-box" style="background:#881337;"></div><span>Basic Positive (K,R,H)</span></div>
<div class="aa-legend-item"><div class="aa-legend-box" style="background:#064e3b;"></div><span>Acidic Negative (D,E)</span></div>
<div class="aa-legend-item"><div class="aa-legend-box" style="background:#78350f;"></div><span>Polar Uncharged (S,T,N,Q)</span></div>
<div class="aa-legend-item"><div class="aa-legend-box" style="background:#ca8a04;"></div><span>Cysteine (Cys23/Cys104)</span></div>
<div class="aa-legend-item"><div class="aa-legend-box" style="background:#701a75;"></div><span>Proline</span></div>
<div class="aa-legend-item"><div class="aa-legend-box" style="background:#334155;"></div><span>Glycine</span></div>
</div>
</div>
<!-- 5. MUTATION & AA CHANGE TABLE -->
<div class="result-section" id="mutationSection" style="display: none;">
<div class="section-header">
<div class="section-title">
<span>5.</span>
<span>V-REGION Mutation and AA Change Statistics</span>
</div>
<span style="font-size: 11px; color: var(--text-muted);">Silent (S) vs. Replacement (R) somatic hypermutation rates</span>
</div>
<table class="data-table" id="mutationSummaryTable">