-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
859 lines (757 loc) · 25.7 KB
/
index.html
File metadata and controls
859 lines (757 loc) · 25.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>VCF-RDFizer Vocabulary</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="RDF vocabulary and SHACL shapes for VCF files, headers, records, and sample calls." />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap" rel="stylesheet" />
<style>
:root {
color-scheme: light;
--bg: #f6f1ea;
--bg-alt: #edf3f7;
--ink: #1d1f22;
--muted: #5f6b7a;
--accent: #1f6f78;
--accent-strong: #13535a;
--card: #ffffff;
--border: #d6dee6;
--shadow: 0 24px 60px rgba(20, 32, 45, 0.12);
--radius-lg: 22px;
--radius-md: 14px;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
color: var(--ink);
background: linear-gradient(120deg, var(--bg) 0%, var(--bg-alt) 65%, #f8f2e6 100%);
min-height: 100vh;
}
body::before,
body::after {
content: "";
position: fixed;
inset: auto;
width: 420px;
height: 420px;
background: radial-gradient(circle at top, rgba(31, 111, 120, 0.18), transparent 70%);
z-index: -1;
}
body::before {
top: -140px;
right: -120px;
}
body::after {
display: none;
}
a {
color: inherit;
text-decoration: none;
}
.container {
width: min(1120px, 92vw);
margin: 0 auto;
padding: 48px 0 80px;
}
.hero {
display: grid;
gap: 28px;
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
align-items: stretch;
margin-bottom: 48px;
}
.hero h1 {
font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
font-size: clamp(2.4rem, 4vw, 3.6rem);
margin: 0 0 12px;
letter-spacing: -0.02em;
}
.hero p {
font-size: 1.1rem;
line-height: 1.6;
color: var(--muted);
margin: 0 0 20px;
}
.hero__actions {
display: flex;
flex-wrap: wrap;
gap: 12px;
}
.hero__panel-actions {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 9px;
align-items: stretch;
}
.hero__panel-actions .btn {
width: 100%;
min-height: 28px;
padding: 5px 10px;
font-size: 0.82rem;
font-weight: 600;
border-radius: 8px;
letter-spacing: 0.01em;
white-space: nowrap;
}
.hero__panel-actions .btn.btn--ghost {
background: linear-gradient(180deg, #ffffff 0%, #f2f7fb 100%);
border-color: #bfd0de;
color: #154f58;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.hero__panel-actions .btn.btn--ghost:hover {
border-color: #8fa8bb;
background: linear-gradient(180deg, #ffffff 0%, #eaf2f8 100%);
box-shadow: 0 8px 14px rgba(19, 55, 70, 0.12);
}
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 11px 16px;
border-radius: 12px;
font-weight: 600;
font-size: 0.94rem;
border: 1px solid transparent;
transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
min-height: 20px;
}
.btn:hover {
transform: translateY(-1px);
box-shadow: 0 12px 24px rgba(19, 55, 70, 0.18);
}
.btn:focus-visible {
outline: 3px solid rgba(31, 111, 120, 0.25);
outline-offset: 2px;
}
.btn--primary {
background: linear-gradient(140deg, #248992 0%, var(--accent) 100%);
border-color: #1c7d86;
color: #fff;
box-shadow: 0 8px 18px rgba(31, 111, 120, 0.24);
}
.btn--ghost {
background: rgba(255, 255, 255, 0.92);
border-color: #c7d3de;
color: var(--accent-strong);
}
.btn--ghost:hover {
border-color: #9ab0c3;
background: #ffffff;
}
.btn--font-control {
background: linear-gradient(180deg, #ffffff 0%, #eef7f8 100%);
border-color: #8eb1b6;
color: var(--accent-strong);
font-weight: 700;
min-width: 132px;
}
.btn--font-control:hover {
border-color: #6b969c;
background: linear-gradient(180deg, #ffffff 0%, #e5f3f5 100%);
}
.hero__panel {
background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
border: 1px solid #ccd7e1;
border-radius: var(--radius-lg);
box-shadow: 0 18px 36px rgba(20, 32, 45, 0.1);
display: grid;
grid-template-rows: auto 1fr;
overflow: hidden;
min-height: 100%;
}
.hero__panel-header {
padding: 18px 20px 14px;
border-bottom: 1px solid #d8e1e8;
background: linear-gradient(135deg, rgba(31, 111, 120, 0.08) 0%, rgba(237, 243, 247, 0.4) 100%);
display: grid;
gap: 4px;
}
.hero__panel-header h2 {
margin: 0;
font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
font-size: 1.05rem;
letter-spacing: 0.01em;
color: #123e4c;
}
.hero__panel-header p {
margin: 0;
font-size: 0.88rem;
color: #4f6577;
line-height: 1.4;
}
.hero__panel-body {
padding: 16px 20px 18px;
display: grid;
gap: 14px;
align-content: start;
}
.hero__namespace {
border: 1px solid #d3dde6;
border-radius: 11px;
background: #ffffff;
padding: 10px 12px;
display: grid;
gap: 6px;
}
.hero__namespace-label {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.08em;
color: #5c6d7c;
font-weight: 600;
}
.hero__namespace code {
background: rgba(31, 111, 120, 0.08);
border: 1px solid rgba(31, 111, 120, 0.16);
padding: 6px 8px;
border-radius: 8px;
font-size: 0.88rem;
color: #164750;
display: block;
overflow-x: auto;
white-space: nowrap;
}
.hero__artifacts {
display: grid;
gap: 8px;
}
.hero__artifacts-label {
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.08em;
color: #5c6d7c;
font-weight: 600;
}
.hero__artifact-list {
display: flex;
flex-wrap: wrap;
gap: 7px;
}
.hero__artifact-item {
display: inline-flex;
align-items: center;
padding: 4px 9px;
border-radius: 999px;
border: 1px solid #c7d5e2;
background: #f6fafc;
color: #2d4f63;
font-size: 0.79rem;
font-weight: 600;
line-height: 1.2;
}
.pill {
display: inline-flex;
align-items: center;
gap: 8px;
background: rgba(31, 111, 120, 0.12);
color: var(--accent-strong);
font-weight: 600;
border-radius: 999px;
padding: 6px 12px;
font-size: 0.9rem;
}
.section {
margin-bottom: 48px;
}
.section h2 {
font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
font-size: 1.8rem;
margin: 0 0 18px;
}
.section-note {
margin: -6px 0 14px;
color: var(--muted);
font-size: 0.95rem;
line-height: 1.45;
}
.iri-pattern {
gap: 16px;
}
.iri-pattern__base {
display: grid;
gap: 8px;
padding: 12px 14px;
border: 1px solid #d3e0eb;
border-radius: 12px;
background: linear-gradient(180deg, #fbfdff 0%, #f3f8fc 100%);
color: #2f4254;
}
.iri-pattern__base-label {
font-size: 0.78rem;
text-transform: uppercase;
letter-spacing: 0.08em;
color: #5b6d7c;
font-weight: 700;
}
.iri-pattern__grid {
display: grid;
gap: 10px;
}
.iri-pattern__row {
display: grid;
grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
gap: 12px;
align-items: start;
background: #f7fbff;
border: 1px solid #d3e0eb;
border-radius: 12px;
padding: 10px 12px;
font-size: 0.92rem;
}
.iri-pattern__term {
min-width: 0;
}
.iri-pattern__term code {
white-space: nowrap;
font-weight: 600;
}
.iri-pattern__base code,
.iri-pattern__value {
display: block;
min-width: 0;
white-space: normal;
overflow-wrap: anywhere;
word-break: break-word;
line-height: 1.45;
}
.iri-pattern__note {
margin: 0;
font-size: 0.9rem;
color: var(--muted);
}
.card-grid {
display: grid;
gap: 18px;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
background: var(--card);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: 20px;
display: grid;
gap: 12px;
box-shadow: 0 18px 34px rgba(25, 39, 52, 0.08);
}
.card h3 {
margin: 0;
font-size: 1.2rem;
}
.card p {
margin: 0;
color: var(--muted);
line-height: 1.5;
}
.card__actions {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.artifacts-grid .card__actions {
display: grid;
grid-template-columns: 1fr;
gap: 10px;
}
.artifacts-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-template-rows: repeat(2, minmax(188px, auto));
gap: 18px;
align-items: stretch;
}
.artifact-card--primary {
grid-row: span 2;
padding: 18px 20px;
gap: 11px;
}
.artifact-card--compact {
padding: 16px 18px;
gap: 8px;
}
.artifact-card--compact p {
font-size: 0.97rem;
line-height: 1.38;
}
.artifact-card--primary .card__actions,
.artifact-card--compact .card__actions {
margin-top: auto;
}
.artifact-preview {
display: block;
border: 1px solid #c8d7e3;
border-radius: 11px;
overflow: hidden;
background: linear-gradient(180deg, #f6fbff 0%, #eef5fa 100%);
min-height: 148px;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.artifact-preview--link {
cursor: pointer;
transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.artifact-preview--link:hover {
border-color: #8fa8bb;
box-shadow: 0 12px 24px rgba(19, 55, 70, 0.16);
transform: translateY(-1px);
}
.artifact-preview--link:focus-visible {
outline: 3px solid rgba(31, 111, 120, 0.24);
outline-offset: 2px;
}
.artifact-preview img {
display: block;
width: 100%;
height: 100%;
object-fit: cover;
}
.artifacts-grid .card__actions .btn {
width: 100%;
border-radius: 10px;
min-height: 40px;
padding: 10px 14px;
justify-content: center;
}
.artifacts-grid .card__actions .btn--primary {
box-shadow: 0 6px 14px rgba(31, 111, 120, 0.2);
}
.artifacts-grid .card__actions .btn--ghost {
background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 252, 0.98));
}
.viewer {
background: var(--card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
padding: 22px;
box-shadow: var(--shadow);
display: grid;
gap: 16px;
}
.tabs {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.tab {
border: 1px solid var(--border);
background: rgba(255, 255, 255, 0.65);
border-radius: 999px;
padding: 8px 14px;
font-weight: 600;
color: var(--muted);
cursor: pointer;
transition: all 0.2s ease;
}
.tab.active {
border-color: var(--accent);
color: var(--accent-strong);
background: rgba(31, 111, 120, 0.12);
}
.viewer__toolbar {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 12px;
align-items: center;
}
.viewer__toolbar h3 {
margin: 0;
font-size: 1.15rem;
}
.viewer__actions {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
.viewer__status {
font-size: 0.9rem;
color: var(--muted);
}
pre {
margin: 0;
background: #101821;
color: #e9f4ff;
padding: 18px;
border-radius: 14px;
overflow: auto;
font-size: 0.9rem;
line-height: 1.55;
min-height: 320px;
}
pre code {
font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
white-space: pre;
}
footer {
border-top: 1px solid var(--border);
padding-top: 24px;
color: var(--muted);
font-size: 0.95rem;
display: grid;
gap: 10px;
}
@media (max-width: 1080px) {
.artifacts-grid {
grid-template-columns: repeat(2, minmax(0, 1fr));
grid-template-rows: none;
}
.artifact-card--primary {
grid-row: auto;
}
}
@media (max-width: 760px) {
.artifacts-grid {
grid-template-columns: 1fr;
}
}
@media (max-width: 680px) {
.hero__actions,
.card__actions,
.viewer__actions {
flex-direction: column;
align-items: stretch;
}
.hero__panel-actions {
grid-template-columns: 1fr;
}
.btn,
.tab {
width: 100%;
}
pre {
min-height: 240px;
}
.iri-pattern__row {
grid-template-columns: 1fr;
gap: 8px;
padding: 10px 12px;
}
.iri-pattern__base {
padding: 10px 12px;
}
.iri-pattern__base code,
.iri-pattern__value {
font-size: 0.84rem;
}
}
</style>
</head>
<body>
<div class="container">
<header class="hero">
<div>
<div class="pill">VCF → RDF</div>
<h1>VCF-RDFizer Vocabulary</h1>
<p>RDF vocabulary and SHACL shapes that model VCF files, headers, records, and sample calls. Explore the ontology, validate datasets, inspect relationships, and jump into working examples.</p>
<div class="hero__actions">
<a class="btn btn--primary" href="#viewer" title="Browse and inspect the example RDF, NT, and VCF files.">Open Example Explorer</a>
<a class="btn btn--ghost" href="ontology-reference.html" title="Read class and property documentation for the vocabulary.">Ontology Reference</a>
<a class="btn btn--ghost" href="ontology-graph.html" title="Explore ontology terms and relationships in an interactive graph.">Interactive Graph</a>
<a class="btn btn--ghost" href="https://github.com/ecrum19/VCF-RDFizer-vocabulary" target="_blank" rel="noreferrer" title="Open the source repository, history, and project files.">GitHub Repository</a>
</div>
</div>
<div class="hero__panel">
<div class="hero__panel-header">
<h2>Vocabulary Snapshot</h2>
<p>Core namespace and primary source artifacts for this documentation site.</p>
</div>
<div class="hero__panel-body">
<div class="hero__namespace">
<span class="hero__namespace-label">Namespace</span>
<code id="namespace">https://w3id.org/vcf-rdfizer/vocab#</code>
</div>
<div class="hero__panel-actions">
<button class="btn btn--ghost" id="copy-namespace" type="button">Copy Namespace</button>
<a class="btn btn--ghost" href="assets/vcf-rdfizer-vocabulary.ttl" target="_blank" rel="noreferrer">Open Ontology TTL</a>
</div>
<div class="hero__artifacts">
<span class="hero__artifacts-label">Artifacts Included</span>
<div class="hero__artifact-list">
<span class="hero__artifact-item">Ontology TTL</span>
<span class="hero__artifact-item">SHACL TTL</span>
<span class="hero__artifact-item">Reference Docs</span>
<span class="hero__artifact-item">Relationship Graph</span>
<span class="hero__artifact-item">Example Explorer</span>
</div>
</div>
</div>
</div>
</header>
<section class="section" aria-labelledby="canonical-iri-pattern">
<h2 id="canonical-iri-pattern">Suggested Canonical IRI Pattern</h2>
<p class="section-note">This website provides a suggested canonical IRI pattern for core instance resources, so users can generate RDF from VCF files with a consistent structure.</p>
<div class="card iri-pattern">
<div class="iri-pattern__base">
<span class="iri-pattern__base-label">Base URL</span>
<code>file://{vcfFilePath}</code>
</div>
<div class="iri-pattern__grid">
<div class="iri-pattern__row"><span class="iri-pattern__term"><code>VCFFile</code></span><code class="iri-pattern__value">file://{vcfFilePath}</code></div>
<div class="iri-pattern__row"><span class="iri-pattern__term"><code>VCFHeader</code></span><code class="iri-pattern__value">file://{vcfFilePath}#header</code></div>
<div class="iri-pattern__row"><span class="iri-pattern__term"><code>HeaderLine</code></span><code class="iri-pattern__value">file://{vcfFilePath}#header/line/{lineId}</code></div>
<div class="iri-pattern__row"><span class="iri-pattern__term"><code>VCFRecord</code></span><code class="iri-pattern__value">file://{vcfFilePath}#record/{recordId}</code></div>
<div class="iri-pattern__row"><span class="iri-pattern__term"><code>VariantCall</code></span><code class="iri-pattern__value">file://{vcfFilePath}#call/{recordId}</code></div>
<div class="iri-pattern__row"><span class="iri-pattern__term"><code>SampleCall</code></span><code class="iri-pattern__value">file://{vcfFilePath}#sample/{recordId}/{sampleId}</code></div>
<div class="iri-pattern__row"><span class="iri-pattern__term"><code>InfoFieldValue</code></span><code class="iri-pattern__value">file://{vcfFilePath}#call/{recordId}/info/{fieldKey}</code></div>
<div class="iri-pattern__row"><span class="iri-pattern__term"><code>FormatFieldValue</code></span><code class="iri-pattern__value">file://{vcfFilePath}#sample/{recordId}/{sampleId}/fmt/{fieldKey}</code></div>
</div>
<p class="iri-pattern__note">These templates are also formalized in the ontology via <a href="terms/iriTemplate.html"><code>vcfr:iriTemplate</code></a>.</p>
</div>
</section>
<section class="section" aria-labelledby="artifacts">
<h2 id="artifacts">Artifacts</h2>
<div class="card-grid artifacts-grid">
<div class="card artifact-card--primary">
<h3>Vocabulary Reference</h3>
<p>Structured documentation for classes, properties, external ontology alignment, and per-term pages.</p>
<a class="artifact-preview artifact-preview--link" href="ontology-reference.html" aria-label="Open Vocabulary Reference">
<img src="assets/class-hierarchy-preview.svg" alt="Preview of class hierarchy tree structure" />
</a>
<div class="card__actions">
<a class="btn btn--primary" href="ontology-reference.html">Open Reference</a>
<a class="btn btn--ghost" href="terms/index.html">Term Pages</a>
</div>
</div>
<div class="card artifact-card--primary">
<h3>Relationship Diagram</h3>
<p>Sigma.js ontology map with generated JSON graph data and serialized relationship overview.</p>
<a class="artifact-preview artifact-preview--link" href="ontology-graph.html" aria-label="Open Relationship Diagram">
<img src="assets/relationship_graph_preview.png" alt="Preview of ontology relationship graph terms" />
</a>
<div class="card__actions">
<a class="btn btn--primary" href="ontology-graph.html">Open Visual Graph</a>
<a class="btn btn--ghost" href="assets/ontology-graph-static.svg" target="_blank" rel="noreferrer">Concept Model SVG</a>
</div>
</div>
<div class="card artifact-card--compact">
<h3>Ontology (Turtle)</h3>
<p>Core vocabulary for representing VCF files and records.</p>
<div class="card__actions">
<a class="btn btn--primary" href="assets/vcf-rdfizer-vocabulary.ttl" target="_blank" rel="noreferrer">Open TTL</a>
</div>
</div>
<div class="card artifact-card--compact">
<h3>SHACL Shapes (Turtle)</h3>
<p>Validation rules to ensure VCF-derived RDF stays consistent.</p>
<div class="card__actions">
<a class="btn btn--primary" href="assets/vcf-rdfizer-vocabulary.shacl.ttl" target="_blank" rel="noreferrer">Open TTL</a>
</div>
</div>
</div>
</section>
<section class="section" aria-labelledby="viewer">
<h2 id="viewer">Example Explorer</h2>
<p class="section-note">This explorer shows only example files, including a first-mutation TTL example (`var1`) and the full all-variants TTL graph. Ontology and SHACL source files are available in the Artifacts section above.</p>
<div class="viewer">
<div class="tabs" role="tablist">
<button class="tab active" type="button" data-file="assets/example.vcf" data-label="Example Source (Raw VCF)">Example VCF</button>
<button class="tab" type="button" data-file="assets/example-headers.ttl" data-label="Header-Focused Example (TTL)">Header Example TTL</button>
<button class="tab" type="button" data-file="assets/example-minimal-record.ttl" data-label="First Mutation Example (var1, TTL)">First Mutation TTL</button>
<button class="tab" type="button" data-file="assets/example.ttl" data-label="Full Example Graph (All Variants, TTL)">Full Example TTL</button>
<button class="tab" type="button" data-file="assets/example.nt" data-label="Full Example Graph (N-Triples)">Example NT</button>
</div>
<div class="viewer__toolbar">
<h3 id="ttl-title">Example Source (Raw VCF)</h3>
<div class="viewer__actions">
<a class="btn btn--ghost" id="ttl-open" href="assets/example.vcf" target="_blank" rel="noreferrer">Open File</a>
<button class="btn btn--ghost btn--font-control" type="button" id="ttl-font-size">Font Size: M</button>
</div>
</div>
<div class="viewer__status" id="ttl-status">Loaded.</div>
<pre aria-live="polite"><code id="ttl-content">Loading...</code></pre>
</div>
</section>
<footer>
<div>RDF vocabulary + SHACL shapes for VCF files, headers, records, and sample calls.</div>
<div>Namespace: <code>https://w3id.org/vcf-rdfizer/vocab#</code></div>
</footer>
</div>
<script>
const tabs = Array.from(document.querySelectorAll(".tab"));
const content = document.getElementById("ttl-content");
const status = document.getElementById("ttl-status");
const title = document.getElementById("ttl-title");
const openLink = document.getElementById("ttl-open");
const fontSizeButton = document.getElementById("ttl-font-size");
const namespaceButton = document.getElementById("copy-namespace");
const namespaceValue = document.getElementById("namespace");
const viewerPre = document.querySelector("pre");
const viewerFontSizes = [
{ label: "S", value: "0.82rem" },
{ label: "M", value: "0.90rem" },
{ label: "L", value: "1.02rem" }
];
let viewerFontSizeIndex = 1;
async function loadFileContent(file, label) {
status.textContent = "Loading " + label + "...";
content.textContent = "Loading...";
openLink.href = file;
title.textContent = label;
try {
const response = await fetch(file, { cache: "no-store" });
if (!response.ok) {
throw new Error("HTTP " + response.status);
}
const text = await response.text();
const displayText = text.trim();
const lineCount = displayText ? displayText.split(/\r?\n/).length : 0;
const lineLabel = lineCount === 1 ? "line" : "lines";
content.textContent = displayText;
status.textContent = "Loaded " + label + " · " + lineCount + " " + lineLabel;
} catch (error) {
content.textContent = "Unable to load " + label + ".";
status.textContent = "Error loading file.";
}
}
tabs.forEach((tab) => {
tab.addEventListener("click", () => {
tabs.forEach((btn) => btn.classList.remove("active"));
tab.classList.add("active");
loadFileContent(tab.dataset.file, tab.dataset.label);
});
});
document.querySelectorAll("[data-file]").forEach((button) => {
if (button.classList.contains("tab")) {
return;
}
button.addEventListener("click", () => {
const file = button.dataset.file;
const label = button.dataset.label;
const target = tabs.find((tab) => tab.dataset.file === file);
if (target) {
target.click();
document.getElementById("viewer").scrollIntoView({ behavior: "smooth" });
return;
}
loadFileContent(file, label || "File");
});
});
function applyViewerFontSize(index) {
const selected = viewerFontSizes[index];
viewerPre.style.fontSize = selected.value;
fontSizeButton.textContent = `Font Size: ${selected.label}`;
}
fontSizeButton.addEventListener("click", () => {
viewerFontSizeIndex = (viewerFontSizeIndex + 1) % viewerFontSizes.length;
applyViewerFontSize(viewerFontSizeIndex);
});
namespaceButton.addEventListener("click", async () => {
try {
await navigator.clipboard.writeText(namespaceValue.textContent);
status.textContent = "Namespace copied.";
} catch (error) {
status.textContent = "Copy failed. Select the text manually.";
}
});
applyViewerFontSize(viewerFontSizeIndex);
loadFileContent("assets/example.vcf", "Example Source (Raw VCF)");
</script>
</body>
</html>