@genome-spy/core 0.72.0 → 0.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/dist/bundle/index.es.js +6779 -5393
- package/dist/bundle/index.js +133 -121
- package/dist/schema.json +281 -17
- package/dist/src/data/formats/bed.d.ts +8 -0
- package/dist/src/data/formats/bed.d.ts.map +1 -0
- package/dist/src/data/formats/bed.js +53 -0
- package/dist/src/data/formats/bedpe.d.ts +8 -0
- package/dist/src/data/formats/bedpe.d.ts.map +1 -0
- package/dist/src/data/formats/bedpe.js +160 -0
- package/dist/src/data/sources/dataUtils.d.ts +16 -0
- package/dist/src/data/sources/dataUtils.d.ts.map +1 -1
- package/dist/src/data/sources/dataUtils.js +53 -3
- package/dist/src/data/sources/urlSource.d.ts +4 -0
- package/dist/src/data/sources/urlSource.d.ts.map +1 -1
- package/dist/src/data/sources/urlSource.js +133 -14
- package/dist/src/genome/assemblyPreflight.d.ts +31 -0
- package/dist/src/genome/assemblyPreflight.d.ts.map +1 -0
- package/dist/src/genome/assemblyPreflight.js +99 -0
- package/dist/src/genome/genome.d.ts +2 -2
- package/dist/src/genome/genome.d.ts.map +1 -1
- package/dist/src/genome/genome.js +4 -0
- package/dist/src/genome/genomeStore.d.ts +34 -3
- package/dist/src/genome/genomeStore.d.ts.map +1 -1
- package/dist/src/genome/genomeStore.js +409 -18
- package/dist/src/genome/rootGenomeConfig.d.ts +26 -0
- package/dist/src/genome/rootGenomeConfig.d.ts.map +1 -0
- package/dist/src/genome/rootGenomeConfig.js +94 -0
- package/dist/src/genomeSpy/interactionController.d.ts +5 -1
- package/dist/src/genomeSpy/interactionController.d.ts.map +1 -1
- package/dist/src/genomeSpy/interactionController.js +244 -29
- package/dist/src/genomeSpy/renderCoordinator.js +1 -1
- package/dist/src/genomeSpy.d.ts +13 -3
- package/dist/src/genomeSpy.d.ts.map +1 -1
- package/dist/src/genomeSpy.js +81 -7
- package/dist/src/gl/canvasSizeHelper.d.ts +74 -0
- package/dist/src/gl/canvasSizeHelper.d.ts.map +1 -0
- package/dist/src/gl/canvasSizeHelper.js +203 -0
- package/dist/src/gl/webGLHelper.d.ts +25 -11
- package/dist/src/gl/webGLHelper.d.ts.map +1 -1
- package/dist/src/gl/webGLHelper.js +59 -33
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +5 -2
- package/dist/src/marks/link.d.ts.map +1 -1
- package/dist/src/marks/link.js +5 -3
- package/dist/src/marks/mark.d.ts.map +1 -1
- package/dist/src/marks/mark.js +6 -1
- package/dist/src/scales/domainPlanner.d.ts +34 -3
- package/dist/src/scales/domainPlanner.d.ts.map +1 -1
- package/dist/src/scales/domainPlanner.js +247 -26
- package/dist/src/scales/scaleInstanceManager.d.ts +2 -1
- package/dist/src/scales/scaleInstanceManager.d.ts.map +1 -1
- package/dist/src/scales/scaleInstanceManager.js +10 -11
- package/dist/src/scales/scaleInteractionController.d.ts.map +1 -1
- package/dist/src/scales/scaleInteractionController.js +16 -14
- package/dist/src/scales/scaleResolution.d.ts +16 -0
- package/dist/src/scales/scaleResolution.d.ts.map +1 -1
- package/dist/src/scales/scaleResolution.js +314 -54
- package/dist/src/scales/scaleResolutionTestUtils.d.ts +21 -0
- package/dist/src/scales/scaleResolutionTestUtils.d.ts.map +1 -0
- package/dist/src/scales/scaleResolutionTestUtils.js +33 -0
- package/dist/src/scales/selectionDomainUtils.d.ts +22 -0
- package/dist/src/scales/selectionDomainUtils.d.ts.map +1 -0
- package/dist/src/scales/selectionDomainUtils.js +79 -0
- package/dist/src/scales/zoomDomainUtils.d.ts +18 -0
- package/dist/src/scales/zoomDomainUtils.d.ts.map +1 -0
- package/dist/src/scales/zoomDomainUtils.js +69 -0
- package/dist/src/screenshotHarness.d.ts +16 -0
- package/dist/src/screenshotHarness.d.ts.map +1 -0
- package/dist/src/screenshotHarness.js +242 -0
- package/dist/src/singlePageApp.js +1 -1
- package/dist/src/spec/data.d.ts +23 -3
- package/dist/src/spec/genome.d.ts +22 -2
- package/dist/src/spec/parameter.d.ts +39 -2
- package/dist/src/spec/root.d.ts +20 -1
- package/dist/src/spec/scale.d.ts +41 -5
- package/dist/src/styles/genome-spy.css +8 -0
- package/dist/src/styles/genome-spy.css.d.ts +1 -1
- package/dist/src/styles/genome-spy.css.d.ts.map +1 -1
- package/dist/src/styles/genome-spy.css.js +8 -0
- package/dist/src/tooltip/dataTooltipHandler.js +59 -10
- package/dist/src/types/embedApi.d.ts +19 -0
- package/dist/src/utils/inferSpecBaseUrl.d.ts +14 -0
- package/dist/src/utils/inferSpecBaseUrl.d.ts.map +1 -0
- package/dist/src/utils/inferSpecBaseUrl.js +73 -0
- package/dist/src/utils/interactionEvent.d.ts +53 -3
- package/dist/src/utils/interactionEvent.d.ts.map +1 -1
- package/dist/src/utils/interactionEvent.js +62 -1
- package/dist/src/view/containerMutationHelper.d.ts.map +1 -1
- package/dist/src/view/containerMutationHelper.js +8 -0
- package/dist/src/view/dataReadiness.d.ts +2 -2
- package/dist/src/view/dataReadiness.d.ts.map +1 -1
- package/dist/src/view/dataReadiness.js +63 -58
- package/dist/src/view/facetView.js +1 -1
- package/dist/src/view/gridView/gridChild.d.ts +7 -0
- package/dist/src/view/gridView/gridChild.d.ts.map +1 -1
- package/dist/src/view/gridView/gridChild.js +180 -11
- package/dist/src/view/gridView/gridView.d.ts.map +1 -1
- package/dist/src/view/gridView/gridView.js +60 -17
- package/dist/src/view/zoom.d.ts +14 -2
- package/dist/src/view/zoom.d.ts.map +1 -1
- package/dist/src/view/zoom.js +373 -76
- package/package.json +4 -2
package/dist/schema.json
CHANGED
|
@@ -398,6 +398,63 @@
|
|
|
398
398
|
],
|
|
399
399
|
"type": "string"
|
|
400
400
|
},
|
|
401
|
+
"BedDataFormat": {
|
|
402
|
+
"additionalProperties": false,
|
|
403
|
+
"properties": {
|
|
404
|
+
"parse": {
|
|
405
|
+
"anyOf": [
|
|
406
|
+
{
|
|
407
|
+
"$ref": "#/definitions/Parse"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"type": "null"
|
|
411
|
+
}
|
|
412
|
+
],
|
|
413
|
+
"description": "If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)). For example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: \"date:'%m%d%Y'\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \"utc:'%m%d%Y'\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)"
|
|
414
|
+
},
|
|
415
|
+
"type": {
|
|
416
|
+
"const": "bed",
|
|
417
|
+
"description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL. Compression suffixes such as `.gz` are ignored during inference. If no extension is detected, `\"json\"` will be used by default.",
|
|
418
|
+
"type": "string"
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"required": [
|
|
422
|
+
"type"
|
|
423
|
+
],
|
|
424
|
+
"type": "object"
|
|
425
|
+
},
|
|
426
|
+
"BedpeDataFormat": {
|
|
427
|
+
"additionalProperties": false,
|
|
428
|
+
"properties": {
|
|
429
|
+
"columns": {
|
|
430
|
+
"description": "Optional ordered list of field names for headerless BEDPE input. If omitted, BEDPE fields are resolved from the default BEDPE column order or from a matching header row when present.",
|
|
431
|
+
"items": {
|
|
432
|
+
"type": "string"
|
|
433
|
+
},
|
|
434
|
+
"type": "array"
|
|
435
|
+
},
|
|
436
|
+
"parse": {
|
|
437
|
+
"anyOf": [
|
|
438
|
+
{
|
|
439
|
+
"$ref": "#/definitions/Parse"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
"type": "null"
|
|
443
|
+
}
|
|
444
|
+
],
|
|
445
|
+
"description": "If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)). For example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: \"date:'%m%d%Y'\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \"utc:'%m%d%Y'\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)"
|
|
446
|
+
},
|
|
447
|
+
"type": {
|
|
448
|
+
"const": "bedpe",
|
|
449
|
+
"description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL. Compression suffixes such as `.gz` are ignored during inference. If no extension is detected, `\"json\"` will be used by default.",
|
|
450
|
+
"type": "string"
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
"required": [
|
|
454
|
+
"type"
|
|
455
|
+
],
|
|
456
|
+
"type": "object"
|
|
457
|
+
},
|
|
401
458
|
"BigBedData": {
|
|
402
459
|
"additionalProperties": false,
|
|
403
460
|
"properties": {
|
|
@@ -1559,6 +1616,10 @@
|
|
|
1559
1616
|
"$schema": {
|
|
1560
1617
|
"type": "string"
|
|
1561
1618
|
},
|
|
1619
|
+
"assembly": {
|
|
1620
|
+
"description": "Default assembly for locus scales that do not define `scale.assembly`.\n\nCan reference either a key in `genomes` or a built-in assembly name.",
|
|
1621
|
+
"type": "string"
|
|
1622
|
+
},
|
|
1562
1623
|
"background": {
|
|
1563
1624
|
"description": "Background color of the canvas.",
|
|
1564
1625
|
"type": "string"
|
|
@@ -1602,7 +1663,15 @@
|
|
|
1602
1663
|
"description": "Specifies how data are [encoded](https://genomespy.app/docs/grammar/mark/#encoding) using the visual channels."
|
|
1603
1664
|
},
|
|
1604
1665
|
"genome": {
|
|
1605
|
-
"$ref": "#/definitions/GenomeConfig"
|
|
1666
|
+
"$ref": "#/definitions/GenomeConfig",
|
|
1667
|
+
"deprecated": "Legacy root-level genome config. Use `genomes` and `assembly` instead."
|
|
1668
|
+
},
|
|
1669
|
+
"genomes": {
|
|
1670
|
+
"additionalProperties": {
|
|
1671
|
+
"$ref": "#/definitions/NamedGenomeConfig"
|
|
1672
|
+
},
|
|
1673
|
+
"description": "Named genome assembly definitions.\n\nEach object key is the assembly name.",
|
|
1674
|
+
"type": "object"
|
|
1606
1675
|
},
|
|
1607
1676
|
"height": {
|
|
1608
1677
|
"anyOf": [
|
|
@@ -1911,6 +1980,10 @@
|
|
|
1911
1980
|
"$schema": {
|
|
1912
1981
|
"type": "string"
|
|
1913
1982
|
},
|
|
1983
|
+
"assembly": {
|
|
1984
|
+
"description": "Default assembly for locus scales that do not define `scale.assembly`.\n\nCan reference either a key in `genomes` or a built-in assembly name.",
|
|
1985
|
+
"type": "string"
|
|
1986
|
+
},
|
|
1914
1987
|
"background": {
|
|
1915
1988
|
"description": "Background color of the canvas.",
|
|
1916
1989
|
"type": "string"
|
|
@@ -1954,7 +2027,15 @@
|
|
|
1954
2027
|
"description": "Specifies how data are [encoded](https://genomespy.app/docs/grammar/mark/#encoding) using the visual channels."
|
|
1955
2028
|
},
|
|
1956
2029
|
"genome": {
|
|
1957
|
-
"$ref": "#/definitions/GenomeConfig"
|
|
2030
|
+
"$ref": "#/definitions/GenomeConfig",
|
|
2031
|
+
"deprecated": "Legacy root-level genome config. Use `genomes` and `assembly` instead."
|
|
2032
|
+
},
|
|
2033
|
+
"genomes": {
|
|
2034
|
+
"additionalProperties": {
|
|
2035
|
+
"$ref": "#/definitions/NamedGenomeConfig"
|
|
2036
|
+
},
|
|
2037
|
+
"description": "Named genome assembly definitions.\n\nEach object key is the assembly name.",
|
|
2038
|
+
"type": "object"
|
|
1958
2039
|
},
|
|
1959
2040
|
"height": {
|
|
1960
2041
|
"anyOf": [
|
|
@@ -2270,6 +2351,10 @@
|
|
|
2270
2351
|
"$schema": {
|
|
2271
2352
|
"type": "string"
|
|
2272
2353
|
},
|
|
2354
|
+
"assembly": {
|
|
2355
|
+
"description": "Default assembly for locus scales that do not define `scale.assembly`.\n\nCan reference either a key in `genomes` or a built-in assembly name.",
|
|
2356
|
+
"type": "string"
|
|
2357
|
+
},
|
|
2273
2358
|
"background": {
|
|
2274
2359
|
"description": "Background color of the canvas.",
|
|
2275
2360
|
"type": "string"
|
|
@@ -2313,7 +2398,15 @@
|
|
|
2313
2398
|
"description": "Specifies how data are [encoded](https://genomespy.app/docs/grammar/mark/#encoding) using the visual channels."
|
|
2314
2399
|
},
|
|
2315
2400
|
"genome": {
|
|
2316
|
-
"$ref": "#/definitions/GenomeConfig"
|
|
2401
|
+
"$ref": "#/definitions/GenomeConfig",
|
|
2402
|
+
"deprecated": "Legacy root-level genome config. Use `genomes` and `assembly` instead."
|
|
2403
|
+
},
|
|
2404
|
+
"genomes": {
|
|
2405
|
+
"additionalProperties": {
|
|
2406
|
+
"$ref": "#/definitions/NamedGenomeConfig"
|
|
2407
|
+
},
|
|
2408
|
+
"description": "Named genome assembly definitions.\n\nEach object key is the assembly name.",
|
|
2409
|
+
"type": "object"
|
|
2317
2410
|
},
|
|
2318
2411
|
"height": {
|
|
2319
2412
|
"anyOf": [
|
|
@@ -2634,6 +2727,10 @@
|
|
|
2634
2727
|
"$schema": {
|
|
2635
2728
|
"type": "string"
|
|
2636
2729
|
},
|
|
2730
|
+
"assembly": {
|
|
2731
|
+
"description": "Default assembly for locus scales that do not define `scale.assembly`.\n\nCan reference either a key in `genomes` or a built-in assembly name.",
|
|
2732
|
+
"type": "string"
|
|
2733
|
+
},
|
|
2637
2734
|
"background": {
|
|
2638
2735
|
"description": "Background color of the canvas.",
|
|
2639
2736
|
"type": "string"
|
|
@@ -2677,7 +2774,15 @@
|
|
|
2677
2774
|
"description": "Specifies how data are [encoded](https://genomespy.app/docs/grammar/mark/#encoding) using the visual channels."
|
|
2678
2775
|
},
|
|
2679
2776
|
"genome": {
|
|
2680
|
-
"$ref": "#/definitions/GenomeConfig"
|
|
2777
|
+
"$ref": "#/definitions/GenomeConfig",
|
|
2778
|
+
"deprecated": "Legacy root-level genome config. Use `genomes` and `assembly` instead."
|
|
2779
|
+
},
|
|
2780
|
+
"genomes": {
|
|
2781
|
+
"additionalProperties": {
|
|
2782
|
+
"$ref": "#/definitions/NamedGenomeConfig"
|
|
2783
|
+
},
|
|
2784
|
+
"description": "Named genome assembly definitions.\n\nEach object key is the assembly name.",
|
|
2785
|
+
"type": "object"
|
|
2681
2786
|
},
|
|
2682
2787
|
"height": {
|
|
2683
2788
|
"anyOf": [
|
|
@@ -2995,6 +3100,10 @@
|
|
|
2995
3100
|
"$schema": {
|
|
2996
3101
|
"type": "string"
|
|
2997
3102
|
},
|
|
3103
|
+
"assembly": {
|
|
3104
|
+
"description": "Default assembly for locus scales that do not define `scale.assembly`.\n\nCan reference either a key in `genomes` or a built-in assembly name.",
|
|
3105
|
+
"type": "string"
|
|
3106
|
+
},
|
|
2998
3107
|
"background": {
|
|
2999
3108
|
"description": "Background color of the canvas.",
|
|
3000
3109
|
"type": "string"
|
|
@@ -3038,7 +3147,15 @@
|
|
|
3038
3147
|
"description": "Specifies how data are [encoded](https://genomespy.app/docs/grammar/mark/#encoding) using the visual channels."
|
|
3039
3148
|
},
|
|
3040
3149
|
"genome": {
|
|
3041
|
-
"$ref": "#/definitions/GenomeConfig"
|
|
3150
|
+
"$ref": "#/definitions/GenomeConfig",
|
|
3151
|
+
"deprecated": "Legacy root-level genome config. Use `genomes` and `assembly` instead."
|
|
3152
|
+
},
|
|
3153
|
+
"genomes": {
|
|
3154
|
+
"additionalProperties": {
|
|
3155
|
+
"$ref": "#/definitions/NamedGenomeConfig"
|
|
3156
|
+
},
|
|
3157
|
+
"description": "Named genome assembly definitions.\n\nEach object key is the assembly name.",
|
|
3158
|
+
"type": "object"
|
|
3042
3159
|
},
|
|
3043
3160
|
"hconcat": {
|
|
3044
3161
|
"items": {
|
|
@@ -3356,6 +3473,10 @@
|
|
|
3356
3473
|
"$schema": {
|
|
3357
3474
|
"type": "string"
|
|
3358
3475
|
},
|
|
3476
|
+
"assembly": {
|
|
3477
|
+
"description": "Default assembly for locus scales that do not define `scale.assembly`.\n\nCan reference either a key in `genomes` or a built-in assembly name.",
|
|
3478
|
+
"type": "string"
|
|
3479
|
+
},
|
|
3359
3480
|
"background": {
|
|
3360
3481
|
"description": "Background color of the canvas.",
|
|
3361
3482
|
"type": "string"
|
|
@@ -3416,7 +3537,15 @@
|
|
|
3416
3537
|
"description": "Specifies how data are [encoded](https://genomespy.app/docs/grammar/mark/#encoding) using the visual channels."
|
|
3417
3538
|
},
|
|
3418
3539
|
"genome": {
|
|
3419
|
-
"$ref": "#/definitions/GenomeConfig"
|
|
3540
|
+
"$ref": "#/definitions/GenomeConfig",
|
|
3541
|
+
"deprecated": "Legacy root-level genome config. Use `genomes` and `assembly` instead."
|
|
3542
|
+
},
|
|
3543
|
+
"genomes": {
|
|
3544
|
+
"additionalProperties": {
|
|
3545
|
+
"$ref": "#/definitions/NamedGenomeConfig"
|
|
3546
|
+
},
|
|
3547
|
+
"description": "Named genome assembly definitions.\n\nEach object key is the assembly name.",
|
|
3548
|
+
"type": "object"
|
|
3420
3549
|
},
|
|
3421
3550
|
"height": {
|
|
3422
3551
|
"anyOf": [
|
|
@@ -3781,7 +3910,7 @@
|
|
|
3781
3910
|
"description": "If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)). For example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: \"date:'%m%d%Y'\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \"utc:'%m%d%Y'\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)"
|
|
3782
3911
|
},
|
|
3783
3912
|
"type": {
|
|
3784
|
-
"description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL. If no extension is detected, `\"json\"` will be used by default.",
|
|
3913
|
+
"description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL. Compression suffixes such as `.gz` are ignored during inference. If no extension is detected, `\"json\"` will be used by default.",
|
|
3785
3914
|
"enum": [
|
|
3786
3915
|
"csv",
|
|
3787
3916
|
"tsv"
|
|
@@ -3812,6 +3941,12 @@
|
|
|
3812
3941
|
{
|
|
3813
3942
|
"$ref": "#/definitions/JsonDataFormat"
|
|
3814
3943
|
},
|
|
3944
|
+
{
|
|
3945
|
+
"$ref": "#/definitions/BedDataFormat"
|
|
3946
|
+
},
|
|
3947
|
+
{
|
|
3948
|
+
"$ref": "#/definitions/BedpeDataFormat"
|
|
3949
|
+
},
|
|
3815
3950
|
{
|
|
3816
3951
|
"$ref": "#/definitions/OtherDataFormat"
|
|
3817
3952
|
}
|
|
@@ -3841,7 +3976,9 @@
|
|
|
3841
3976
|
"click",
|
|
3842
3977
|
"dblclick",
|
|
3843
3978
|
"mouseover",
|
|
3844
|
-
"pointerover"
|
|
3979
|
+
"pointerover",
|
|
3980
|
+
"mousedown",
|
|
3981
|
+
"wheel"
|
|
3845
3982
|
],
|
|
3846
3983
|
"type": "string"
|
|
3847
3984
|
},
|
|
@@ -3867,7 +4004,7 @@
|
|
|
3867
4004
|
},
|
|
3868
4005
|
"type": {
|
|
3869
4006
|
"const": "dsv",
|
|
3870
|
-
"description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL. If no extension is detected, `\"json\"` will be used by default.",
|
|
4007
|
+
"description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL. Compression suffixes such as `.gz` are ignored during inference. If no extension is detected, `\"json\"` will be used by default.",
|
|
3871
4008
|
"type": "string"
|
|
3872
4009
|
}
|
|
3873
4010
|
},
|
|
@@ -5349,7 +5486,8 @@
|
|
|
5349
5486
|
{
|
|
5350
5487
|
"$ref": "#/definitions/GenomeConfigBase"
|
|
5351
5488
|
}
|
|
5352
|
-
]
|
|
5489
|
+
],
|
|
5490
|
+
"deprecated": "Use root `genomes` and `assembly` instead of root `genome`."
|
|
5353
5491
|
},
|
|
5354
5492
|
"GenomeConfigBase": {
|
|
5355
5493
|
"additionalProperties": false,
|
|
@@ -5364,6 +5502,17 @@
|
|
|
5364
5502
|
],
|
|
5365
5503
|
"type": "object"
|
|
5366
5504
|
},
|
|
5505
|
+
"GenomeDefinition": {
|
|
5506
|
+
"anyOf": [
|
|
5507
|
+
{
|
|
5508
|
+
"$ref": "#/definitions/UrlGenomeDefinition"
|
|
5509
|
+
},
|
|
5510
|
+
{
|
|
5511
|
+
"$ref": "#/definitions/InlineGenomeDefinition"
|
|
5512
|
+
}
|
|
5513
|
+
],
|
|
5514
|
+
"description": "Genome definition for contexts where the name is provided externally (for example, as a key in root `genomes`) or not needed (for example, inline `scale.assembly`)."
|
|
5515
|
+
},
|
|
5367
5516
|
"Gff3Data": {
|
|
5368
5517
|
"additionalProperties": false,
|
|
5369
5518
|
"properties": {
|
|
@@ -5944,6 +6093,7 @@
|
|
|
5944
6093
|
},
|
|
5945
6094
|
"InlineGenomeConfig": {
|
|
5946
6095
|
"additionalProperties": false,
|
|
6096
|
+
"deprecated": "Use `GenomeDefinition` in root `genomes` entries and `scale.assembly`.",
|
|
5947
6097
|
"properties": {
|
|
5948
6098
|
"contigs": {
|
|
5949
6099
|
"description": "An array of contigs/sequences in the genome assembly.",
|
|
@@ -5963,6 +6113,25 @@
|
|
|
5963
6113
|
],
|
|
5964
6114
|
"type": "object"
|
|
5965
6115
|
},
|
|
6116
|
+
"InlineGenomeDefinition": {
|
|
6117
|
+
"additionalProperties": false,
|
|
6118
|
+
"properties": {
|
|
6119
|
+
"contigs": {
|
|
6120
|
+
"description": "An array of contigs/sequences in the genome assembly.",
|
|
6121
|
+
"items": {
|
|
6122
|
+
"$ref": "#/definitions/Contig"
|
|
6123
|
+
},
|
|
6124
|
+
"type": "array"
|
|
6125
|
+
}
|
|
6126
|
+
},
|
|
6127
|
+
"required": [
|
|
6128
|
+
"contigs"
|
|
6129
|
+
],
|
|
6130
|
+
"type": "object"
|
|
6131
|
+
},
|
|
6132
|
+
"InlineLocusAssembly": {
|
|
6133
|
+
"$ref": "#/definitions/GenomeDefinition"
|
|
6134
|
+
},
|
|
5966
6135
|
"IntervalSelectionConfig": {
|
|
5967
6136
|
"additionalProperties": false,
|
|
5968
6137
|
"properties": {
|
|
@@ -6006,12 +6175,29 @@
|
|
|
6006
6175
|
"type": "string"
|
|
6007
6176
|
}
|
|
6008
6177
|
],
|
|
6009
|
-
"description": "A string or object that defines the events to which the selection should listen."
|
|
6178
|
+
"description": "A string or object that defines the events to which the selection should listen.\n\n__Default value:__\n\n- point selections: `\"click\"`\n- interval selections: - `\"mousedown[event.shiftKey]\"` when any brushed channel is zoomable - `\"mousedown\"` otherwise"
|
|
6010
6179
|
},
|
|
6011
6180
|
"type": {
|
|
6012
6181
|
"const": "interval",
|
|
6013
6182
|
"description": "The selection type.\n\n- `\"point\"` -- to select multiple discrete data values; the first value is selected on `click` and additional values toggled on shift-click.\n- `\"interval\"` -- to select a continuous range of data values on `drag`.",
|
|
6014
6183
|
"type": "string"
|
|
6184
|
+
},
|
|
6185
|
+
"zoom": {
|
|
6186
|
+
"anyOf": [
|
|
6187
|
+
{
|
|
6188
|
+
"$ref": "#/definitions/DomEventType"
|
|
6189
|
+
},
|
|
6190
|
+
{
|
|
6191
|
+
"$ref": "#/definitions/EventConfig"
|
|
6192
|
+
},
|
|
6193
|
+
{
|
|
6194
|
+
"type": "string"
|
|
6195
|
+
},
|
|
6196
|
+
{
|
|
6197
|
+
"type": "boolean"
|
|
6198
|
+
}
|
|
6199
|
+
],
|
|
6200
|
+
"description": "Controls whether an active interval selection can be resized by mouse wheel. The wheel interaction only applies when the cursor is over the interval.\n\nCan be:\n\n- `true` / `false`\n- event type string such as `\"wheel\"` or `\"wheel[event.altKey]\"`\n- an `EventConfig` object\n\nCurrently, only `\"wheel\"` events are supported.\n\n__Default value:__\n\n- `false` when any brushed channel uses a zoomable scale\n- `true` otherwise"
|
|
6015
6201
|
}
|
|
6016
6202
|
},
|
|
6017
6203
|
"required": [
|
|
@@ -6039,7 +6225,7 @@
|
|
|
6039
6225
|
},
|
|
6040
6226
|
"type": {
|
|
6041
6227
|
"const": "json",
|
|
6042
|
-
"description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL. If no extension is detected, `\"json\"` will be used by default.",
|
|
6228
|
+
"description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL. Compression suffixes such as `.gz` are ignored during inference. If no extension is detected, `\"json\"` will be used by default.",
|
|
6043
6229
|
"type": "string"
|
|
6044
6230
|
}
|
|
6045
6231
|
},
|
|
@@ -7293,6 +7479,19 @@
|
|
|
7293
7479
|
],
|
|
7294
7480
|
"type": "object"
|
|
7295
7481
|
},
|
|
7482
|
+
"NamedGenomeConfig": {
|
|
7483
|
+
"anyOf": [
|
|
7484
|
+
{
|
|
7485
|
+
"$ref": "#/definitions/GenomeDefinition"
|
|
7486
|
+
},
|
|
7487
|
+
{
|
|
7488
|
+
"additionalProperties": {
|
|
7489
|
+
"not": {}
|
|
7490
|
+
},
|
|
7491
|
+
"type": "object"
|
|
7492
|
+
}
|
|
7493
|
+
]
|
|
7494
|
+
},
|
|
7296
7495
|
"NumericDomain": {
|
|
7297
7496
|
"items": {
|
|
7298
7497
|
"type": "number"
|
|
@@ -7319,7 +7518,19 @@
|
|
|
7319
7518
|
"additionalProperties": false,
|
|
7320
7519
|
"description": "Other data format, such as `\"fasta\"`",
|
|
7321
7520
|
"properties": {
|
|
7521
|
+
"parse": {
|
|
7522
|
+
"anyOf": [
|
|
7523
|
+
{
|
|
7524
|
+
"$ref": "#/definitions/Parse"
|
|
7525
|
+
},
|
|
7526
|
+
{
|
|
7527
|
+
"type": "null"
|
|
7528
|
+
}
|
|
7529
|
+
],
|
|
7530
|
+
"description": "If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `\"number\"`, `\"boolean\"`, `\"date\"`, or null (do not parse the field)). For example, `\"parse\": {\"modified_on\": \"date\"}` parses the `modified_on` field in each input record a Date value.\n\nFor `\"date\"`, we parse data based using Javascript's [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: \"date:'%m%d%Y'\"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: \"utc:'%m%d%Y'\"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)"
|
|
7531
|
+
},
|
|
7322
7532
|
"type": {
|
|
7533
|
+
"description": "Type of input data: `\"json\"`, `\"csv\"`, `\"tsv\"`, `\"dsv\"`.\n\n__Default value:__ The default format type is determined by the extension of the file URL. Compression suffixes such as `.gz` are ignored during inference. If no extension is detected, `\"json\"` will be used by default.",
|
|
7323
7534
|
"type": "string"
|
|
7324
7535
|
}
|
|
7325
7536
|
},
|
|
@@ -7694,7 +7905,7 @@
|
|
|
7694
7905
|
"type": "string"
|
|
7695
7906
|
}
|
|
7696
7907
|
],
|
|
7697
|
-
"description": "A string or object that defines the events to which the selection should listen."
|
|
7908
|
+
"description": "A string or object that defines the events to which the selection should listen.\n\n__Default value:__\n\n- point selections: `\"click\"`\n- interval selections: - `\"mousedown[event.shiftKey]\"` when any brushed channel is zoomable - `\"mousedown\"` otherwise"
|
|
7698
7909
|
},
|
|
7699
7910
|
"toggle": {
|
|
7700
7911
|
"description": "Controls whether data values should be toggled (inserted or removed from a point selection) when clicking with the shift key pressed.\n\n- `true` -- additional values can be selected by shift-clicking.\n- `false` -- only a single value can be selected at a time.\n\n__Default value:__ `true`",
|
|
@@ -8745,8 +8956,15 @@
|
|
|
8745
8956
|
"type": "number"
|
|
8746
8957
|
},
|
|
8747
8958
|
"assembly": {
|
|
8748
|
-
"
|
|
8749
|
-
|
|
8959
|
+
"anyOf": [
|
|
8960
|
+
{
|
|
8961
|
+
"type": "string"
|
|
8962
|
+
},
|
|
8963
|
+
{
|
|
8964
|
+
"$ref": "#/definitions/InlineLocusAssembly"
|
|
8965
|
+
}
|
|
8966
|
+
],
|
|
8967
|
+
"description": "Genome assembly definition for locus scales.\n\nThis can be:\n\n- A string reference to a named assembly (built-in or root-configured).\n- An inline anonymous assembly that defines either `contigs` or `url`.\n\nIf undefined, the default genome from the genome store is used."
|
|
8750
8968
|
},
|
|
8751
8969
|
"base": {
|
|
8752
8970
|
"description": "The logarithm base of the `log` scale (default `10`).",
|
|
@@ -8774,6 +8992,9 @@
|
|
|
8774
8992
|
},
|
|
8775
8993
|
{
|
|
8776
8994
|
"$ref": "#/definitions/ComplexDomain"
|
|
8995
|
+
},
|
|
8996
|
+
{
|
|
8997
|
+
"$ref": "#/definitions/SelectionDomainRef"
|
|
8777
8998
|
}
|
|
8778
8999
|
],
|
|
8779
9000
|
"description": "Customized domain values.\n\nFor _quantitative_ fields, `domain` can take the form of a two-element array with minimum and maximum values. [Piecewise scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise) can be created by providing a `domain` with more than two entries.\n\nFor _temporal_ fields, `domain` can be a two-element array minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\n\nFor _ordinal_ and _nominal_ fields, `domain` can be an array that lists valid input values."
|
|
@@ -9066,6 +9287,35 @@
|
|
|
9066
9287
|
],
|
|
9067
9288
|
"type": "string"
|
|
9068
9289
|
},
|
|
9290
|
+
"SelectionDomainRef": {
|
|
9291
|
+
"additionalProperties": false,
|
|
9292
|
+
"properties": {
|
|
9293
|
+
"encoding": {
|
|
9294
|
+
"description": "Selection interval channel to use.\n\nIf omitted, GenomeSpy infers the channel from the scale channel when possible (e.g., `x` -> `x`, `x2` -> `x`, `y` -> `y`, `y2` -> `y`).",
|
|
9295
|
+
"enum": [
|
|
9296
|
+
"x",
|
|
9297
|
+
"y"
|
|
9298
|
+
],
|
|
9299
|
+
"type": "string"
|
|
9300
|
+
},
|
|
9301
|
+
"param": {
|
|
9302
|
+
"description": "Name of an interval selection parameter that provides the domain.",
|
|
9303
|
+
"type": "string"
|
|
9304
|
+
},
|
|
9305
|
+
"sync": {
|
|
9306
|
+
"description": "Domain synchronization mode.\n\n- `\"oneWay\"`: selection drives the domain.\n- `\"twoWay\"`: selection drives the domain and zoom/pan updates selection.\n\n__Default value:__ implicit auto mode:\n\n- `\"twoWay\"` when the linked scale is zoomable\n- `\"oneWay\"` otherwise",
|
|
9307
|
+
"enum": [
|
|
9308
|
+
"oneWay",
|
|
9309
|
+
"twoWay"
|
|
9310
|
+
],
|
|
9311
|
+
"type": "string"
|
|
9312
|
+
}
|
|
9313
|
+
},
|
|
9314
|
+
"required": [
|
|
9315
|
+
"param"
|
|
9316
|
+
],
|
|
9317
|
+
"type": "object"
|
|
9318
|
+
},
|
|
9069
9319
|
"SelectionFilterParams": {
|
|
9070
9320
|
"additionalProperties": false,
|
|
9071
9321
|
"properties": {
|
|
@@ -10456,7 +10706,7 @@
|
|
|
10456
10706
|
"$ref": "#/definitions/UrlList"
|
|
10457
10707
|
}
|
|
10458
10708
|
],
|
|
10459
|
-
"description": "An URL or an array of URLs from which to load the data set. Use the `format.type` property to ensure the loaded data is correctly parsed."
|
|
10709
|
+
"description": "An URL or an array of URLs from which to load the data set. Gzip-compressed resources are decompressed transparently when the URL, MIME type, or payload indicates gzip content. Use the `format.type` property to ensure the loaded data is correctly parsed."
|
|
10460
10710
|
}
|
|
10461
10711
|
},
|
|
10462
10712
|
"required": [
|
|
@@ -10466,6 +10716,7 @@
|
|
|
10466
10716
|
},
|
|
10467
10717
|
"UrlGenomeConfig": {
|
|
10468
10718
|
"additionalProperties": false,
|
|
10719
|
+
"deprecated": "Use `GenomeDefinition` in root `genomes` entries and `scale.assembly`.",
|
|
10469
10720
|
"properties": {
|
|
10470
10721
|
"name": {
|
|
10471
10722
|
"description": "Name of the genome assembly, e.g., `hg19` or `hg38`.",
|
|
@@ -10482,6 +10733,19 @@
|
|
|
10482
10733
|
],
|
|
10483
10734
|
"type": "object"
|
|
10484
10735
|
},
|
|
10736
|
+
"UrlGenomeDefinition": {
|
|
10737
|
+
"additionalProperties": false,
|
|
10738
|
+
"properties": {
|
|
10739
|
+
"url": {
|
|
10740
|
+
"description": "A URL to a `chrom.sizes` file, which is a tab-separated file with two columns: the sequence name and its size.\n\nYou may want to strip alternative loci, haplotypes, and other non-canonical contigs from the file.\n\nExample: `\"https://genomespy.app/data/genomes/hg19/chrom.sizes\"`",
|
|
10741
|
+
"type": "string"
|
|
10742
|
+
}
|
|
10743
|
+
},
|
|
10744
|
+
"required": [
|
|
10745
|
+
"url"
|
|
10746
|
+
],
|
|
10747
|
+
"type": "object"
|
|
10748
|
+
},
|
|
10485
10749
|
"UrlImport": {
|
|
10486
10750
|
"additionalProperties": false,
|
|
10487
10751
|
"properties": {
|
|
@@ -10499,7 +10763,7 @@
|
|
|
10499
10763
|
"additionalProperties": false,
|
|
10500
10764
|
"properties": {
|
|
10501
10765
|
"type": {
|
|
10502
|
-
"description": "The format of the data in the list. If the type is `\"json\"`, the list is expected to be an array of strings. If the type is `\"csv\"` or `\"tsv\"`, the list is expected to be a table with a single column named `
|
|
10766
|
+
"description": "The format of the data in the list. If the type is `\"json\"`, the list is expected to be an array of strings. If the type is `\"csv\"` or `\"tsv\"`, the list is expected to be a table with a single column named `url`.\n\n__Default value:__ `\"txt\"`",
|
|
10503
10767
|
"enum": [
|
|
10504
10768
|
"json",
|
|
10505
10769
|
"csv",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bed.d.ts","sourceRoot":"","sources":["../../../../src/data/formats/bed.js"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,kCAHW,MAAM,GACJ,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,CAqC1C"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const blankLinePattern = /^\s*$/;
|
|
2
|
+
const controlLinePattern = /^\s*(?:browser\b|track\b|#)/;
|
|
3
|
+
|
|
4
|
+
/** @type {Promise<any> | undefined} */
|
|
5
|
+
let bedParserPromise;
|
|
6
|
+
|
|
7
|
+
async function loadBedParser() {
|
|
8
|
+
bedParserPromise ??= import("@gmod/bed").then((mod) => mod.default);
|
|
9
|
+
return bedParserPromise;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Parse BED text data.
|
|
14
|
+
*
|
|
15
|
+
* @param {string} data
|
|
16
|
+
* @returns {Promise<Record<string, any>[]>}
|
|
17
|
+
*/
|
|
18
|
+
export default async function bed(data) {
|
|
19
|
+
const BED = await loadBedParser();
|
|
20
|
+
const parser = new BED();
|
|
21
|
+
let dataStarted = false;
|
|
22
|
+
|
|
23
|
+
/** @type {Record<string, any>[]} */
|
|
24
|
+
const rows = [];
|
|
25
|
+
|
|
26
|
+
const lines = data.split(/\r?\n/);
|
|
27
|
+
|
|
28
|
+
for (let i = 0; i < lines.length; i++) {
|
|
29
|
+
const line = lines[i];
|
|
30
|
+
if (line.length == 0) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (!dataStarted) {
|
|
35
|
+
if (blankLinePattern.test(line) || controlLinePattern.test(line)) {
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
dataStarted = true;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
try {
|
|
42
|
+
rows.push(parser.parseLine(line));
|
|
43
|
+
} catch (error) {
|
|
44
|
+
throw new Error(
|
|
45
|
+
`Cannot parse BED line ${i + 1}: ${
|
|
46
|
+
/** @type {Error} */ (error).message
|
|
47
|
+
}`
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return rows;
|
|
53
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bedpe.d.ts","sourceRoot":"","sources":["../../../../src/data/formats/bedpe.js"],"names":[],"mappings":"AA+EA;;;GAGG;AACH,oCAHW,MAAM,WACN;IAAE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,yBA8EhC"}
|