Skip to content

Commit c7c93a4

Browse files
committed
chore: upgrade Vega-Lite spec from v5 to v6
Update the schema URL to use Vega-Lite v6 to match the installed vega-lite package version (6.4.1). The spec is backward compatible and renders correctly with no changes needed.
1 parent 6df011b commit c7c93a4

File tree

1 file changed

+155
-40
lines changed

1 file changed

+155
-40
lines changed

public/learn/featured-analyses/evolutionary-dynamics-of-coding-overlaps-in-measles/nucleotide-changes-vega-spec.json

Lines changed: 155 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
{
2-
"config": { "view": { "continuousWidth": 300, "continuousHeight": 300 } },
2+
"config": {
3+
"view": {
4+
"continuousWidth": 300,
5+
"continuousHeight": 300
6+
}
7+
},
38
"vconcat": [
49
{
5-
"data": { "name": "data-a1ad66d96417cbab667365597f608ba0" },
6-
"mark": { "type": "tick", "thickness": 4 },
10+
"data": {
11+
"name": "data-a1ad66d96417cbab667365597f608ba0"
12+
},
13+
"mark": {
14+
"type": "tick",
15+
"thickness": 4
16+
},
717
"encoding": {
818
"color": {
919
"field": "effect_bin",
@@ -16,33 +26,85 @@
1626
},
1727
"opacity": {
1828
"field": "samples",
19-
"scale": { "range": [0.35, 1] },
29+
"scale": {
30+
"range": [0.35, 1]
31+
},
2032
"title": "Samples",
2133
"type": "quantitative"
2234
},
2335
"size": {
2436
"field": "af_range",
25-
"scale": { "range": [6, 28] },
37+
"scale": {
38+
"range": [6, 28]
39+
},
2640
"title": "AF range (max-min)",
2741
"type": "quantitative"
2842
},
2943
"tooltip": [
30-
{ "field": "var_id", "type": "nominal" },
31-
{ "field": "chr", "type": "nominal" },
32-
{ "field": "genome_pos", "type": "quantitative" },
33-
{ "field": "ref", "type": "nominal" },
34-
{ "field": "alt", "type": "nominal" },
35-
{ "field": "product", "type": "nominal" },
36-
{ "field": "gene", "type": "nominal" },
37-
{ "field": "effect_bin", "type": "nominal" },
38-
{ "field": "samples", "type": "quantitative" },
39-
{ "field": "af", "type": "quantitative" },
40-
{ "field": "af_min", "type": "quantitative" },
41-
{ "field": "af_max", "type": "quantitative" },
42-
{ "field": "ref_codon", "type": "nominal" },
43-
{ "field": "new_codon", "type": "nominal" },
44-
{ "field": "ref_aa", "type": "nominal" },
45-
{ "field": "new_aa", "type": "nominal" }
44+
{
45+
"field": "var_id",
46+
"type": "nominal"
47+
},
48+
{
49+
"field": "chr",
50+
"type": "nominal"
51+
},
52+
{
53+
"field": "genome_pos",
54+
"type": "quantitative"
55+
},
56+
{
57+
"field": "ref",
58+
"type": "nominal"
59+
},
60+
{
61+
"field": "alt",
62+
"type": "nominal"
63+
},
64+
{
65+
"field": "product",
66+
"type": "nominal"
67+
},
68+
{
69+
"field": "gene",
70+
"type": "nominal"
71+
},
72+
{
73+
"field": "effect_bin",
74+
"type": "nominal"
75+
},
76+
{
77+
"field": "samples",
78+
"type": "quantitative"
79+
},
80+
{
81+
"field": "af",
82+
"type": "quantitative"
83+
},
84+
{
85+
"field": "af_min",
86+
"type": "quantitative"
87+
},
88+
{
89+
"field": "af_max",
90+
"type": "quantitative"
91+
},
92+
{
93+
"field": "ref_codon",
94+
"type": "nominal"
95+
},
96+
{
97+
"field": "new_codon",
98+
"type": "nominal"
99+
},
100+
{
101+
"field": "ref_aa",
102+
"type": "nominal"
103+
},
104+
{
105+
"field": "new_aa",
106+
"type": "nominal"
107+
}
46108
],
47109
"x": {
48110
"field": "genome_pos",
@@ -64,31 +126,65 @@
64126
{
65127
"layer": [
66128
{
67-
"mark": { "type": "rect" },
129+
"mark": {
130+
"type": "rect"
131+
},
68132
"encoding": {
69133
"color": {
70134
"field": "aa_label",
71135
"title": "Amino acid",
72136
"type": "nominal"
73137
},
74138
"tooltip": [
75-
{ "field": "CHROM", "type": "nominal" },
76-
{ "field": "product", "type": "nominal" },
77-
{ "field": "gene", "type": "nominal" },
78-
{ "field": "genome_pos", "type": "quantitative" },
79-
{ "field": "cds_nt_index", "type": "quantitative" },
80-
{ "field": "codon_index", "type": "quantitative" },
81-
{ "field": "codon_pos", "type": "quantitative" },
82-
{ "field": "codon", "type": "nominal" },
83-
{ "field": "aa_label", "type": "nominal" },
84-
{ "field": "base", "type": "nominal" }
139+
{
140+
"field": "CHROM",
141+
"type": "nominal"
142+
},
143+
{
144+
"field": "product",
145+
"type": "nominal"
146+
},
147+
{
148+
"field": "gene",
149+
"type": "nominal"
150+
},
151+
{
152+
"field": "genome_pos",
153+
"type": "quantitative"
154+
},
155+
{
156+
"field": "cds_nt_index",
157+
"type": "quantitative"
158+
},
159+
{
160+
"field": "codon_index",
161+
"type": "quantitative"
162+
},
163+
{
164+
"field": "codon_pos",
165+
"type": "quantitative"
166+
},
167+
{
168+
"field": "codon",
169+
"type": "nominal"
170+
},
171+
{
172+
"field": "aa_label",
173+
"type": "nominal"
174+
},
175+
{
176+
"field": "base",
177+
"type": "nominal"
178+
}
85179
],
86180
"x": {
87181
"field": "genome_pos",
88182
"title": "Genome position (1-based)",
89183
"type": "quantitative"
90184
},
91-
"x2": { "field": "x2" },
185+
"x2": {
186+
"field": "x2"
187+
},
92188
"y": {
93189
"field": "product",
94190
"sort": [
@@ -117,8 +213,14 @@
117213
"strokeWidth": 1
118214
},
119215
"encoding": {
120-
"text": { "field": "base", "type": "nominal" },
121-
"x": { "field": "x_mid", "type": "quantitative" },
216+
"text": {
217+
"field": "base",
218+
"type": "nominal"
219+
},
220+
"x": {
221+
"field": "x_mid",
222+
"type": "quantitative"
223+
},
122224
"y": {
123225
"field": "product",
124226
"sort": [
@@ -136,7 +238,9 @@
136238
}
137239
}
138240
],
139-
"data": { "name": "data-8fb1d001c9584e6ee761d2bf63274f5c" },
241+
"data": {
242+
"name": "data-8fb1d001c9584e6ee761d2bf63274f5c"
243+
},
140244
"height": 144,
141245
"title": "Per-nucleotide amino acid context by product (centered nucleotide labels)",
142246
"width": 756
@@ -145,20 +249,31 @@
145249
"params": [
146250
{
147251
"name": "param_2",
148-
"select": { "type": "interval", "encodings": ["x", "y"] },
252+
"select": {
253+
"type": "interval",
254+
"encodings": ["x", "y"]
255+
},
149256
"bind": "scales",
150257
"views": ["view_6"]
151258
},
152259
{
153260
"name": "xzoom",
154-
"select": { "type": "interval", "encodings": ["x"] },
261+
"select": {
262+
"type": "interval",
263+
"encodings": ["x"]
264+
},
155265
"bind": "scales",
156266
"views": ["view_5", "view_6"]
157267
}
158268
],
159-
"resolve": { "scale": { "color": "independent", "x": "shared" } },
269+
"resolve": {
270+
"scale": {
271+
"color": "independent",
272+
"x": "shared"
273+
}
274+
},
160275
"spacing": 6,
161-
"$schema": "https://vega.github.io/schema/vega-lite/v5.20.1.json",
276+
"$schema": "https://vega.github.io/schema/vega-lite/v6.json",
162277
"datasets": {
163278
"data-a1ad66d96417cbab667365597f608ba0": [
164279
{

0 commit comments

Comments
 (0)