From fca813312e852072a2368ff166f1abe50dbcc65c Mon Sep 17 00:00:00 2001 From: manzt Date: Tue, 21 Nov 2023 17:57:40 +0000 Subject: [PATCH] Bump Gosling.js to `v0.12.0` --- gosling/schema/__init__.py | 4 +- gosling/schema/core.py | 229 ++++++-- gosling/schema/gosling-schema.json | 819 +++++++++++++++++++---------- 3 files changed, 719 insertions(+), 333 deletions(-) diff --git a/gosling/schema/__init__.py b/gosling/schema/__init__.py index 81eb3a0..7883326 100644 --- a/gosling/schema/__init__.py +++ b/gosling/schema/__init__.py @@ -1,6 +1,6 @@ # flake8: noqa from .core import * from .channels import * -SCHEMA_VERSION = 'v0.9.31' -SCHEMA_URL = 'https://raw.githubusercontent.com/gosling-lang/gosling.js/v0.9.31/schema/gosling.schema.json' +SCHEMA_VERSION = 'v0.12.0' +SCHEMA_URL = 'https://raw.githubusercontent.com/gosling-lang/gosling.js/v0.12.0/src/gosling-schema/gosling.schema.json' THEMES = {'dark', 'ensembl', 'excel', 'ggplot', 'google', 'igv', 'jbrowse', 'light', 'ucsc', 'warm', 'washu'} diff --git a/gosling/schema/core.py b/gosling/schema/core.py index 1234339..7e824e8 100644 --- a/gosling/schema/core.py +++ b/gosling/schema/core.py @@ -176,7 +176,7 @@ class DataDeep(GoslingSchema): anyOf(:class:`JsonData`, :class:`CsvData`, :class:`BedData`, :class:`BigWigData`, :class:`MultivecData`, :class:`BeddbData`, :class:`VectorData`, :class:`MatrixData`, - :class:`BamData`, :class:`VcfData`) + :class:`BamData`, :class:`VcfData`, :class:`GffData`) """ _schema = {'$ref': '#/definitions/DataDeep'} _rootschema = GoslingSchema._rootschema @@ -490,6 +490,38 @@ def __init__(self, *args): super(DisplacementType, self).__init__(*args) +class DummyTrackStyle(GoslingSchema): + """DummyTrackStyle schema wrapper + + Mapping(required=[]) + + Attributes + ---------- + + background : string + Background color of the track + outline : string + Color of the outline of the track + textFontSize : float + Specify the font size of the title + textFontWeight : enum('bold', 'normal') + Specify the font weight of the title. + textStroke : string + Specify the stroke color of title. + textStrokeWidth : float + Specify the stroke width of the title. + """ + _schema = {'$ref': '#/definitions/DummyTrackStyle'} + _rootschema = GoslingSchema._rootschema + + def __init__(self, background=Undefined, outline=Undefined, textFontSize=Undefined, + textFontWeight=Undefined, textStroke=Undefined, textStrokeWidth=Undefined, **kwds): + super(DummyTrackStyle, self).__init__(background=background, outline=outline, + textFontSize=textFontSize, textFontWeight=textFontWeight, + textStroke=textStroke, textStrokeWidth=textStrokeWidth, + **kwds) + + class EventStyle(GoslingSchema): """EventStyle schema wrapper @@ -666,6 +698,48 @@ def __init__(self, endField=Undefined, newField=Undefined, startField=Undefined, startField=startField, type=type, **kwds) +class GffData(DataDeep): + """GffData schema wrapper + + Mapping(required=[type, url, indexUrl]) + Generic Feature Format Version 3 (GFF3) format data. It parses files that follow the [GFF3 + specification](https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md). + + Attributes + ---------- + + indexUrl : string + URL link to the tabix index file + type : string + + url : string + URL link to the GFF file + attributesToFields : List(Mapping(required=[attribute, defaultValue])) + Specifies which attributes to include as a fields. GFF files have an "attributes" + column which contains a list of attributes which are each tag-value pairs + (`tag=value`). This option allows for specific attributes to be accessible as a + field. For example, if you have an attribute called "gene_name" and you want label + features on your track using those values, you can use this option so that you can + use `"field": "gene_name"` in the schema. + + If there is a single `value` corresponding to the `tag`, Gosling will parse that + value as a string. If there are multiple `value`s corresponding to a `tag`, Gosling + will parse it as a comma-separated list string. If a feature does not have a + particular attribute, then the attribute value will be set to the `defaultValue`. + sampleLength : float + The maximum number of samples to be shown on the track. Samples are uniformly + randomly selected so that this threshold is not exceeded. __Default:__ `1000` + """ + _schema = {'$ref': '#/definitions/GffData'} + _rootschema = GoslingSchema._rootschema + + def __init__(self, indexUrl=Undefined, type=Undefined, url=Undefined, attributesToFields=Undefined, + sampleLength=Undefined, **kwds): + super(GffData, self).__init__(indexUrl=indexUrl, type=type, url=url, + attributesToFields=attributesToFields, sampleLength=sampleLength, + **kwds) + + class GoslingSpec(GoslingSchema): """GoslingSpec schema wrapper @@ -935,6 +1009,9 @@ class MultipleViews(GoslingSchema): Proportion of the radius of the center white space. __Default:__ `0.3` + id : string + The ID of a view that is maintained for the use of JS API functions, e.g., positions + of a view layout : :class:`Layout` Specify the layout type of all tracks. linkingId : string @@ -975,14 +1052,14 @@ class MultipleViews(GoslingSchema): _rootschema = GoslingSchema._rootschema def __init__(self, views=Undefined, _assignedHeight=Undefined, _assignedWidth=Undefined, - arrangement=Undefined, assembly=Undefined, centerRadius=Undefined, layout=Undefined, - linkingId=Undefined, orientation=Undefined, spacing=Undefined, static=Undefined, - style=Undefined, xAxis=Undefined, xDomain=Undefined, xOffset=Undefined, - yDomain=Undefined, yOffset=Undefined, zoomLimits=Undefined, **kwds): + arrangement=Undefined, assembly=Undefined, centerRadius=Undefined, id=Undefined, + layout=Undefined, linkingId=Undefined, orientation=Undefined, spacing=Undefined, + static=Undefined, style=Undefined, xAxis=Undefined, xDomain=Undefined, + xOffset=Undefined, yDomain=Undefined, yOffset=Undefined, zoomLimits=Undefined, **kwds): super(MultipleViews, self).__init__(views=views, _assignedHeight=_assignedHeight, _assignedWidth=_assignedWidth, arrangement=arrangement, - assembly=assembly, centerRadius=centerRadius, layout=layout, - linkingId=linkingId, orientation=orientation, + assembly=assembly, centerRadius=centerRadius, id=id, + layout=layout, linkingId=linkingId, orientation=orientation, spacing=spacing, static=static, style=style, xAxis=xAxis, xDomain=xDomain, xOffset=xOffset, yDomain=yDomain, yOffset=yOffset, zoomLimits=zoomLimits, **kwds) @@ -1147,7 +1224,8 @@ class OverlaidTracks(GoslingSchema): height : float Specify the track height in pixels. id : string - + The ID of a view that is maintained for the use of JS API functions, e.g., positions + of a view innerRadius : float Specify the inner radius of tracks when (`{"layout": "circular"}`). layout : :class:`Layout` @@ -1294,9 +1372,11 @@ class PartialTrack(GoslingSchema): Internal: Used for responsive spec _invalidTrack : boolean internal + _overlay : List(Mapping(required=[])) + _renderingId : string internal - assembly : :class:`Assembly` + assembly : anyOf(:class:`Assembly`, string) A string that specifies the genome builds to use. Currently support `"hg38"`, `"hg19"`, `"hg18"`, `"hg17"`, `"hg16"`, `"mm10"`, `"mm9"`, and `"unknown"`. @@ -1327,10 +1407,10 @@ class PartialTrack(GoslingSchema): height : float Specify the track height in pixels. id : string - + Assigned to `uid` in a HiGlass view config, used for API and caching. innerRadius : float Specify the inner radius of tracks when (`{"layout": "circular"}`). - layout : :class:`Layout` + layout : anyOf(:class:`Layout`, string) Specify the layout type of all tracks. linkingId : string Specify an ID for [linking multiple @@ -1343,8 +1423,6 @@ class PartialTrack(GoslingSchema): Specify the orientation. outerRadius : float Specify the outer radius of tracks when `{"layout": "circular"}`. - overlay : List(Mapping(required=[])) - overlayOnPreviousTrack : boolean overrideTemplate : boolean @@ -1365,7 +1443,7 @@ class PartialTrack(GoslingSchema): startAngle : float Specify the start angle (in the range of [0, 360]) of circular tracks (`{"layout": "circular"}`). - static : boolean + static : anyOf(boolean, boolean) Whether to disable [Zooming and Panning](http://gosling-lang.org/docs/user-interaction#zooming-and-panning), __Default:__ `false`. @@ -1375,7 +1453,7 @@ class PartialTrack(GoslingSchema): strokeWidth : anyOf(:class:`StrokeWidth`, :class:`ChannelValue`) - style : :class:`Style` + style : anyOf(:class:`Style`, :class:`DummyTrackStyle`) Define the [style](http://gosling-lang.org/docs/visual-channel#style-related-properties) of multive views. Will be overwritten by the style of children elements (e.g., view, @@ -1390,6 +1468,8 @@ class PartialTrack(GoslingSchema): If defined, will show the textual label on the left-top corner of a track. tooltip : List(:class:`Tooltip`) + type : string + Used to specify the dummy track visibility : List(:class:`VisibilityCondition`) width : float @@ -1420,48 +1500,48 @@ class PartialTrack(GoslingSchema): Specify the y offset of views in the unit of pixels ye : anyOf(:class:`Y`, :class:`ChannelValue`) - zoomLimits : :class:`ZoomLimits` + zoomLimits : anyOf(:class:`ZoomLimits`, List(None)) """ _schema = {'$ref': '#/definitions/PartialTrack'} _rootschema = GoslingSchema._rootschema def __init__(self, _assignedHeight=Undefined, _assignedWidth=Undefined, _invalidTrack=Undefined, - _renderingId=Undefined, assembly=Undefined, baselineY=Undefined, + _overlay=Undefined, _renderingId=Undefined, assembly=Undefined, baselineY=Undefined, centerRadius=Undefined, color=Undefined, data=Undefined, dataTransform=Undefined, displacement=Undefined, encoding=Undefined, endAngle=Undefined, experimental=Undefined, flipY=Undefined, height=Undefined, id=Undefined, innerRadius=Undefined, layout=Undefined, linkingId=Undefined, mark=Undefined, opacity=Undefined, - orientation=Undefined, outerRadius=Undefined, overlay=Undefined, - overlayOnPreviousTrack=Undefined, overrideTemplate=Undefined, prerelease=Undefined, - row=Undefined, size=Undefined, spacing=Undefined, startAngle=Undefined, - static=Undefined, stretch=Undefined, stroke=Undefined, strokeWidth=Undefined, - style=Undefined, subtitle=Undefined, template=Undefined, text=Undefined, - title=Undefined, tooltip=Undefined, visibility=Undefined, width=Undefined, x=Undefined, - x1=Undefined, x1e=Undefined, xAxis=Undefined, xDomain=Undefined, xOffset=Undefined, - xe=Undefined, y=Undefined, y1=Undefined, y1e=Undefined, yDomain=Undefined, - yOffset=Undefined, ye=Undefined, zoomLimits=Undefined, **kwds): + orientation=Undefined, outerRadius=Undefined, overlayOnPreviousTrack=Undefined, + overrideTemplate=Undefined, prerelease=Undefined, row=Undefined, size=Undefined, + spacing=Undefined, startAngle=Undefined, static=Undefined, stretch=Undefined, + stroke=Undefined, strokeWidth=Undefined, style=Undefined, subtitle=Undefined, + template=Undefined, text=Undefined, title=Undefined, tooltip=Undefined, type=Undefined, + visibility=Undefined, width=Undefined, x=Undefined, x1=Undefined, x1e=Undefined, + xAxis=Undefined, xDomain=Undefined, xOffset=Undefined, xe=Undefined, y=Undefined, + y1=Undefined, y1e=Undefined, yDomain=Undefined, yOffset=Undefined, ye=Undefined, + zoomLimits=Undefined, **kwds): super(PartialTrack, self).__init__(_assignedHeight=_assignedHeight, _assignedWidth=_assignedWidth, _invalidTrack=_invalidTrack, - _renderingId=_renderingId, assembly=assembly, - baselineY=baselineY, centerRadius=centerRadius, color=color, - data=data, dataTransform=dataTransform, - displacement=displacement, encoding=encoding, - endAngle=endAngle, experimental=experimental, flipY=flipY, - height=height, id=id, innerRadius=innerRadius, layout=layout, - linkingId=linkingId, mark=mark, opacity=opacity, - orientation=orientation, outerRadius=outerRadius, - overlay=overlay, + _overlay=_overlay, _renderingId=_renderingId, + assembly=assembly, baselineY=baselineY, + centerRadius=centerRadius, color=color, data=data, + dataTransform=dataTransform, displacement=displacement, + encoding=encoding, endAngle=endAngle, + experimental=experimental, flipY=flipY, height=height, id=id, + innerRadius=innerRadius, layout=layout, linkingId=linkingId, + mark=mark, opacity=opacity, orientation=orientation, + outerRadius=outerRadius, overlayOnPreviousTrack=overlayOnPreviousTrack, overrideTemplate=overrideTemplate, prerelease=prerelease, row=row, size=size, spacing=spacing, startAngle=startAngle, static=static, stretch=stretch, stroke=stroke, strokeWidth=strokeWidth, style=style, subtitle=subtitle, template=template, text=text, title=title, tooltip=tooltip, - visibility=visibility, width=width, x=x, x1=x1, x1e=x1e, - xAxis=xAxis, xDomain=xDomain, xOffset=xOffset, xe=xe, y=y, - y1=y1, y1e=y1e, yDomain=yDomain, yOffset=yOffset, ye=ye, - zoomLimits=zoomLimits, **kwds) + type=type, visibility=visibility, width=width, x=x, x1=x1, + x1e=x1e, xAxis=xAxis, xDomain=xDomain, xOffset=xOffset, + xe=xe, y=y, y1=y1, y1e=y1e, yDomain=yDomain, yOffset=yOffset, + ye=ye, zoomLimits=zoomLimits, **kwds) class Range(GoslingSchema): @@ -1917,7 +1997,7 @@ class Track(GoslingSchema): """Track schema wrapper anyOf(:class:`SingleTrack`, :class:`OverlaidTrack`, :class:`DataTrack`, - :class:`TemplateTrack`) + :class:`TemplateTrack`, :class:`DummyTrack`) """ _schema = {'$ref': '#/definitions/Track'} _rootschema = GoslingSchema._rootschema @@ -1961,7 +2041,7 @@ class DataTrack(Track): height : float Specify the track height in pixels. id : string - + Assigned to `uid` in a HiGlass view config, used for API and caching. innerRadius : float Specify the inner radius of tracks when (`{"layout": "circular"}`). layout : :class:`Layout` @@ -2041,16 +2121,69 @@ def __init__(self, data=Undefined, _assignedHeight=Undefined, _assignedWidth=Und yDomain=yDomain, yOffset=yOffset, zoomLimits=zoomLimits, **kwds) +class DummyTrack(Track): + """DummyTrack schema wrapper + + Mapping(required=[type]) + A placeholder track. In contrast to other tracks, this track does not display any data. + Instead it provides empty space for third party tools to display their data on top of. + + Attributes + ---------- + + type : string + Used to specify the dummy track + _invalidTrack : boolean + internal + assembly : string + No assemblies can be associated with a dummy track + height : float + Specify the track height in pixels. + id : string + Assigned to `uid` in a HiGlass view config, used for API and caching. + layout : string + Only linear layout are supported at this time + orientation : :class:`Orientation` + Specify the orientation. + overlayOnPreviousTrack : boolean + + static : boolean + Whether to disable [Zooming and + Panning](http://gosling-lang.org/docs/user-interaction#zooming-and-panning), + __Default:__ `false`. + style : :class:`DummyTrackStyle` + Defines how the track is styled + title : string + Text that gets shown on the DummyTrack + width : float + Specify the track width in pixels. + zoomLimits : List(None) + Unused property for DummyTrack + """ + _schema = {'$ref': '#/definitions/DummyTrack'} + _rootschema = GoslingSchema._rootschema + + def __init__(self, type=Undefined, _invalidTrack=Undefined, assembly=Undefined, height=Undefined, + id=Undefined, layout=Undefined, orientation=Undefined, + overlayOnPreviousTrack=Undefined, static=Undefined, style=Undefined, title=Undefined, + width=Undefined, zoomLimits=Undefined, **kwds): + super(DummyTrack, self).__init__(type=type, _invalidTrack=_invalidTrack, assembly=assembly, + height=height, id=id, layout=layout, orientation=orientation, + overlayOnPreviousTrack=overlayOnPreviousTrack, static=static, + style=style, title=title, width=width, zoomLimits=zoomLimits, + **kwds) + + class OverlaidTrack(Track): """OverlaidTrack schema wrapper - Mapping(required=[overlay]) + Mapping(required=[_overlay]) Superposing multiple tracks. Attributes ---------- - overlay : List(Mapping(required=[])) + _overlay : List(Mapping(required=[])) _assignedHeight : float @@ -2089,7 +2222,7 @@ class OverlaidTrack(Track): height : float Specify the track height in pixels. id : string - + Assigned to `uid` in a HiGlass view config, used for API and caching. innerRadius : float Specify the inner radius of tracks when (`{"layout": "circular"}`). layout : :class:`Layout` @@ -2184,7 +2317,7 @@ class OverlaidTrack(Track): _schema = {'$ref': '#/definitions/OverlaidTrack'} _rootschema = GoslingSchema._rootschema - def __init__(self, overlay=Undefined, _assignedHeight=Undefined, _assignedWidth=Undefined, + def __init__(self, _overlay=Undefined, _assignedHeight=Undefined, _assignedWidth=Undefined, _invalidTrack=Undefined, _renderingId=Undefined, assembly=Undefined, baselineY=Undefined, centerRadius=Undefined, color=Undefined, data=Undefined, dataTransform=Undefined, displacement=Undefined, endAngle=Undefined, @@ -2199,7 +2332,7 @@ def __init__(self, overlay=Undefined, _assignedHeight=Undefined, _assignedWidth= x1e=Undefined, xAxis=Undefined, xDomain=Undefined, xOffset=Undefined, xe=Undefined, y=Undefined, y1=Undefined, y1e=Undefined, yDomain=Undefined, yOffset=Undefined, ye=Undefined, zoomLimits=Undefined, **kwds): - super(OverlaidTrack, self).__init__(overlay=overlay, _assignedHeight=_assignedHeight, + super(OverlaidTrack, self).__init__(_overlay=_overlay, _assignedHeight=_assignedHeight, _assignedWidth=_assignedWidth, _invalidTrack=_invalidTrack, _renderingId=_renderingId, assembly=assembly, baselineY=baselineY, centerRadius=centerRadius, color=color, @@ -2268,7 +2401,7 @@ class SingleTrack(Track): height : float Specify the track height in pixels. id : string - + Assigned to `uid` in a HiGlass view config, used for API and caching. innerRadius : float Specify the inner radius of tracks when (`{"layout": "circular"}`). layout : :class:`Layout` @@ -2435,7 +2568,7 @@ class TemplateTrack(Track): height : float Specify the track height in pixels. id : string - + Assigned to `uid` in a HiGlass view config, used for API and caching. innerRadius : float Specify the inner radius of tracks when (`{"layout": "circular"}`). layout : :class:`Layout` diff --git a/gosling/schema/gosling-schema.json b/gosling/schema/gosling-schema.json index cb352d8..e1bbed9 100644 --- a/gosling/schema/gosling-schema.json +++ b/gosling/schema/gosling-schema.json @@ -553,6 +553,9 @@ }, { "$ref": "#/definitions/VcfData" + }, + { + "$ref": "#/definitions/GffData" } ] }, @@ -595,6 +598,7 @@ "type": "number" }, "id": { + "description": "Assigned to `uid` in a HiGlass view config, used for API and caching.", "type": "string" }, "innerRadius": { @@ -876,6 +880,110 @@ ], "type": "object" }, + "DummyTrack": { + "additionalProperties": false, + "description": "A placeholder track. In contrast to other tracks, this track does not display any data. Instead it provides empty space for third party tools to display their data on top of.", + "properties": { + "_invalidTrack": { + "description": "internal", + "type": "boolean" + }, + "assembly": { + "const": "unknown", + "description": "No assemblies can be associated with a dummy track", + "type": "string" + }, + "height": { + "description": "Specify the track height in pixels.", + "type": "number" + }, + "id": { + "description": "Assigned to `uid` in a HiGlass view config, used for API and caching.", + "type": "string" + }, + "layout": { + "const": "linear", + "description": "Only linear layout are supported at this time", + "type": "string" + }, + "orientation": { + "$ref": "#/definitions/Orientation", + "description": "Specify the orientation." + }, + "overlayOnPreviousTrack": { + "type": "boolean" + }, + "static": { + "const": true, + "description": "Whether to disable [Zooming and Panning](http://gosling-lang.org/docs/user-interaction#zooming-and-panning), __Default:__ `false`.", + "type": "boolean" + }, + "style": { + "$ref": "#/definitions/DummyTrackStyle", + "description": "Defines how the track is styled" + }, + "title": { + "description": "Text that gets shown on the DummyTrack", + "type": "string" + }, + "type": { + "const": "dummy-track", + "description": "Used to specify the dummy track", + "type": "string" + }, + "width": { + "description": "Specify the track width in pixels.", + "type": "number" + }, + "zoomLimits": { + "description": "Unused property for DummyTrack", + "items": { + "type": "null" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "DummyTrackStyle": { + "additionalProperties": false, + "properties": { + "background": { + "description": "Background color of the track", + "type": "string" + }, + "outline": { + "description": "Color of the outline of the track", + "type": "string" + }, + "textFontSize": { + "description": "Specify the font size of the title", + "type": "number" + }, + "textFontWeight": { + "description": "Specify the font weight of the title.", + "enum": [ + "bold", + "normal" + ], + "type": "string" + }, + "textStroke": { + "description": "Specify the stroke color of title.", + "type": "string" + }, + "textStrokeWidth": { + "description": "Specify the stroke width of the title.", + "type": "number" + } + }, + "type": "object" + }, "EventStyle": { "additionalProperties": false, "description": "The styles defined here will be applied to the target marks of mouse events, such as a point mark after the user clicks on it.", @@ -1035,6 +1143,54 @@ ], "type": "object" }, + "GffData": { + "additionalProperties": false, + "description": "Generic Feature Format Version 3 (GFF3) format data. It parses files that follow the [GFF3 specification](https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md).", + "properties": { + "attributesToFields": { + "description": "Specifies which attributes to include as a fields. GFF files have an \"attributes\" column which contains a list of attributes which are each tag-value pairs (`tag=value`). This option allows for specific attributes to be accessible as a field. For example, if you have an attribute called \"gene_name\" and you want label features on your track using those values, you can use this option so that you can use `\"field\": \"gene_name\"` in the schema.\n\nIf there is a single `value` corresponding to the `tag`, Gosling will parse that value as a string. If there are multiple `value`s corresponding to a `tag`, Gosling will parse it as a comma-separated list string. If a feature does not have a particular attribute, then the attribute value will be set to the `defaultValue`.", + "items": { + "additionalProperties": false, + "properties": { + "attribute": { + "type": "string" + }, + "defaultValue": { + "type": "string" + } + }, + "required": [ + "attribute", + "defaultValue" + ], + "type": "object" + }, + "type": "array" + }, + "indexUrl": { + "description": "URL link to the tabix index file", + "type": "string" + }, + "sampleLength": { + "description": "The maximum number of samples to be shown on the track. Samples are uniformly randomly selected so that this threshold is not exceeded. __Default:__ `1000`", + "type": "number" + }, + "type": { + "const": "gff", + "type": "string" + }, + "url": { + "description": "URL link to the GFF file", + "type": "string" + } + }, + "required": [ + "type", + "url", + "indexUrl" + ], + "type": "object" + }, "GoslingSpec": { "anyOf": [ { @@ -1128,6 +1284,7 @@ "type": "number" }, "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", "type": "string" }, "innerRadius": { @@ -1279,6 +1436,7 @@ "type": "number" }, "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", "type": "string" }, "innerRadius": { @@ -1894,6 +2052,7 @@ "type": "number" }, "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", "type": "string" }, "innerRadius": { @@ -2045,6 +2204,7 @@ "type": "number" }, "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", "type": "string" }, "innerRadius": { @@ -2596,6 +2756,10 @@ "description": { "type": "string" }, + "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", + "type": "string" + }, "layout": { "$ref": "#/definitions/Layout", "description": "Specify the layout type of all tracks." @@ -2713,6 +2877,7 @@ "type": "number" }, "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", "type": "string" }, "innerRadius": { @@ -3113,6 +3278,10 @@ "description": { "type": "string" }, + "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", + "type": "string" + }, "layout": { "$ref": "#/definitions/Layout", "description": "Specify the layout type of all tracks." @@ -3167,6 +3336,10 @@ "description": "Proportion of the radius of the center white space.\n\n__Default:__ `0.3`", "type": "number" }, + "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", + "type": "string" + }, "layout": { "$ref": "#/definitions/Layout", "description": "Specify the layout type of all tracks." @@ -3633,6 +3806,10 @@ "description": "Proportion of the radius of the center white space.\n\n__Default:__ `0.3`", "type": "number" }, + "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", + "type": "string" + }, "layout": { "$ref": "#/definitions/Layout", "description": "Specify the layout type of all tracks." @@ -3856,112 +4033,7 @@ "description": "internal", "type": "boolean" }, - "_renderingId": { - "description": "internal", - "type": "string" - }, - "assembly": { - "$ref": "#/definitions/Assembly", - "description": "A string that specifies the genome builds to use. Currently support `\"hg38\"`, `\"hg19\"`, `\"hg18\"`, `\"hg17\"`, `\"hg16\"`, `\"mm10\"`, `\"mm9\"`, and `\"unknown\"`.\n\n__Note:__: with `\"unknown\"` assembly, genomic axes do not show chrN: in labels." - }, - "baselineY": { - "type": "number" - }, - "centerRadius": { - "description": "Proportion of the radius of the center white space.\n\n__Default:__ `0.3`", - "type": "number" - }, - "color": { - "anyOf": [ - { - "$ref": "#/definitions/Color" - }, - { - "$ref": "#/definitions/ChannelValue" - } - ] - }, - "data": { - "$ref": "#/definitions/DataDeep" - }, - "dataTransform": { - "items": { - "$ref": "#/definitions/DataTransform" - }, - "type": "array" - }, - "displacement": { - "$ref": "#/definitions/Displacement" - }, - "endAngle": { - "description": "Specify the end angle (in the range of [0, 360]) of circular tracks (`{\"layout\": \"circular\"}`).", - "type": "number" - }, - "experimental": { - "additionalProperties": false, - "properties": { - "mouseEvents": { - "anyOf": [ - { - "type": "boolean" - }, - { - "$ref": "#/definitions/MouseEventsDeep" - } - ] - }, - "performanceMode": { - "default": false, - "description": "Render visual marks with less smooth curves to increase rendering performance. Only supported for `elliptical` `linkStyle` `withinLink` currently.", - "type": "boolean" - } - }, - "type": "object" - }, - "flipY": { - "type": "boolean" - }, - "height": { - "description": "Specify the track height in pixels.", - "type": "number" - }, - "id": { - "type": "string" - }, - "innerRadius": { - "description": "Specify the inner radius of tracks when (`{\"layout\": \"circular\"}`).", - "type": "number" - }, - "layout": { - "$ref": "#/definitions/Layout", - "description": "Specify the layout type of all tracks." - }, - "linkingId": { - "description": "Specify an ID for [linking multiple views](http://gosling-lang.org/docs/user-interaction#linking-views)", - "type": "string" - }, - "mark": { - "$ref": "#/definitions/Mark" - }, - "opacity": { - "anyOf": [ - { - "$ref": "#/definitions/Opacity" - }, - { - "$ref": "#/definitions/ChannelValue" - } - ] - }, - "orientation": { - "$ref": "#/definitions/Orientation", - "description": "Specify the orientation." - }, - "outerRadius": { - "description": "Specify the outer radius of tracks when `{\"layout\": \"circular\"}`.", - "type": "number" - }, - "overlay": { + "_overlay": { "items": { "additionalProperties": false, "properties": { @@ -4042,6 +4114,7 @@ "type": "boolean" }, "id": { + "description": "Assigned to `uid` in a HiGlass view config, used for API and caching.", "type": "string" }, "innerRadius": { @@ -4293,6 +4366,112 @@ }, "type": "array" }, + "_renderingId": { + "description": "internal", + "type": "string" + }, + "assembly": { + "$ref": "#/definitions/Assembly", + "description": "A string that specifies the genome builds to use. Currently support `\"hg38\"`, `\"hg19\"`, `\"hg18\"`, `\"hg17\"`, `\"hg16\"`, `\"mm10\"`, `\"mm9\"`, and `\"unknown\"`.\n\n__Note:__: with `\"unknown\"` assembly, genomic axes do not show chrN: in labels." + }, + "baselineY": { + "type": "number" + }, + "centerRadius": { + "description": "Proportion of the radius of the center white space.\n\n__Default:__ `0.3`", + "type": "number" + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ChannelValue" + } + ] + }, + "data": { + "$ref": "#/definitions/DataDeep" + }, + "dataTransform": { + "items": { + "$ref": "#/definitions/DataTransform" + }, + "type": "array" + }, + "displacement": { + "$ref": "#/definitions/Displacement" + }, + "endAngle": { + "description": "Specify the end angle (in the range of [0, 360]) of circular tracks (`{\"layout\": \"circular\"}`).", + "type": "number" + }, + "experimental": { + "additionalProperties": false, + "properties": { + "mouseEvents": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/MouseEventsDeep" + } + ] + }, + "performanceMode": { + "default": false, + "description": "Render visual marks with less smooth curves to increase rendering performance. Only supported for `elliptical` `linkStyle` `withinLink` currently.", + "type": "boolean" + } + }, + "type": "object" + }, + "flipY": { + "type": "boolean" + }, + "height": { + "description": "Specify the track height in pixels.", + "type": "number" + }, + "id": { + "description": "Assigned to `uid` in a HiGlass view config, used for API and caching.", + "type": "string" + }, + "innerRadius": { + "description": "Specify the inner radius of tracks when (`{\"layout\": \"circular\"}`).", + "type": "number" + }, + "layout": { + "$ref": "#/definitions/Layout", + "description": "Specify the layout type of all tracks." + }, + "linkingId": { + "description": "Specify an ID for [linking multiple views](http://gosling-lang.org/docs/user-interaction#linking-views)", + "type": "string" + }, + "mark": { + "$ref": "#/definitions/Mark" + }, + "opacity": { + "anyOf": [ + { + "$ref": "#/definitions/Opacity" + }, + { + "$ref": "#/definitions/ChannelValue" + } + ] + }, + "orientation": { + "$ref": "#/definitions/Orientation", + "description": "Specify the orientation." + }, + "outerRadius": { + "description": "Specify the outer radius of tracks when `{\"layout\": \"circular\"}`.", + "type": "number" + }, "overlayOnPreviousTrack": { "type": "boolean" }, @@ -4521,7 +4700,7 @@ } }, "required": [ - "overlay" + "_overlay" ], "type": "object" }, @@ -4613,6 +4792,7 @@ "type": "number" }, "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", "type": "string" }, "innerRadius": { @@ -4823,196 +5003,85 @@ "anyOf": [ { "$ref": "#/definitions/Y" - }, - { - "$ref": "#/definitions/ChannelValue" - } - ] - }, - "y1": { - "anyOf": [ - { - "$ref": "#/definitions/Y" - }, - { - "$ref": "#/definitions/ChannelValue" - } - ] - }, - "y1e": { - "anyOf": [ - { - "$ref": "#/definitions/Y" - }, - { - "$ref": "#/definitions/ChannelValue" - } - ] - }, - "yDomain": { - "anyOf": [ - { - "$ref": "#/definitions/DomainInterval" - }, - { - "$ref": "#/definitions/DomainChrInterval" - }, - { - "$ref": "#/definitions/DomainChr" - } - ], - "description": "Specify the visible region of genomic y-axis" - }, - "yOffset": { - "description": "Specify the y offset of views in the unit of pixels", - "type": "number" - }, - "ye": { - "anyOf": [ - { - "$ref": "#/definitions/Y" - }, - { - "$ref": "#/definitions/ChannelValue" - } - ] - }, - "zoomLimits": { - "$ref": "#/definitions/ZoomLimits" - } - }, - "required": [ - "alignment", - "tracks" - ], - "type": "object" - }, - "PartialTrack": { - "additionalProperties": false, - "properties": { - "_assignedHeight": { - "type": "number" - }, - "_assignedWidth": { - "description": "Internal: Used for responsive spec", - "type": "number" - }, - "_invalidTrack": { - "description": "internal", - "type": "boolean" - }, - "_renderingId": { - "description": "internal", - "type": "string" - }, - "assembly": { - "$ref": "#/definitions/Assembly", - "description": "A string that specifies the genome builds to use. Currently support `\"hg38\"`, `\"hg19\"`, `\"hg18\"`, `\"hg17\"`, `\"hg16\"`, `\"mm10\"`, `\"mm9\"`, and `\"unknown\"`.\n\n__Note:__: with `\"unknown\"` assembly, genomic axes do not show chrN: in labels." - }, - "baselineY": { - "type": "number" - }, - "centerRadius": { - "description": "Proportion of the radius of the center white space.\n\n__Default:__ `0.3`", - "type": "number" - }, - "color": { - "anyOf": [ - { - "$ref": "#/definitions/Color" - }, - { - "$ref": "#/definitions/ChannelValue" - } - ] - }, - "data": { - "$ref": "#/definitions/DataDeep" - }, - "dataTransform": { - "items": { - "$ref": "#/definitions/DataTransform" - }, - "type": "array" - }, - "displacement": { - "$ref": "#/definitions/Displacement" - }, - "encoding": { - "additionalProperties": { - "$ref": "#/definitions/Channel" - }, - "type": "object" - }, - "endAngle": { - "description": "Specify the end angle (in the range of [0, 360]) of circular tracks (`{\"layout\": \"circular\"}`).", - "type": "number" - }, - "experimental": { - "additionalProperties": false, - "properties": { - "mouseEvents": { - "anyOf": [ - { - "type": "boolean" - }, - { - "$ref": "#/definitions/MouseEventsDeep" - } - ] - }, - "performanceMode": { - "default": false, - "description": "Render visual marks with less smooth curves to increase rendering performance. Only supported for `elliptical` `linkStyle` `withinLink` currently.", - "type": "boolean" + }, + { + "$ref": "#/definitions/ChannelValue" } - }, - "type": "object" + ] }, - "flipY": { - "type": "boolean" + "y1": { + "anyOf": [ + { + "$ref": "#/definitions/Y" + }, + { + "$ref": "#/definitions/ChannelValue" + } + ] }, - "height": { - "description": "Specify the track height in pixels.", - "type": "number" + "y1e": { + "anyOf": [ + { + "$ref": "#/definitions/Y" + }, + { + "$ref": "#/definitions/ChannelValue" + } + ] }, - "id": { - "type": "string" + "yDomain": { + "anyOf": [ + { + "$ref": "#/definitions/DomainInterval" + }, + { + "$ref": "#/definitions/DomainChrInterval" + }, + { + "$ref": "#/definitions/DomainChr" + } + ], + "description": "Specify the visible region of genomic y-axis" }, - "innerRadius": { - "description": "Specify the inner radius of tracks when (`{\"layout\": \"circular\"}`).", + "yOffset": { + "description": "Specify the y offset of views in the unit of pixels", "type": "number" }, - "layout": { - "$ref": "#/definitions/Layout", - "description": "Specify the layout type of all tracks." - }, - "linkingId": { - "description": "Specify an ID for [linking multiple views](http://gosling-lang.org/docs/user-interaction#linking-views)", - "type": "string" - }, - "mark": { - "$ref": "#/definitions/Mark" - }, - "opacity": { + "ye": { "anyOf": [ { - "$ref": "#/definitions/Opacity" + "$ref": "#/definitions/Y" }, { "$ref": "#/definitions/ChannelValue" } ] }, - "orientation": { - "$ref": "#/definitions/Orientation", - "description": "Specify the orientation." + "zoomLimits": { + "$ref": "#/definitions/ZoomLimits" + } + }, + "required": [ + "alignment", + "tracks" + ], + "type": "object" + }, + "PartialTrack": { + "additionalProperties": false, + "properties": { + "_assignedHeight": { + "type": "number" }, - "outerRadius": { - "description": "Specify the outer radius of tracks when `{\"layout\": \"circular\"}`.", + "_assignedWidth": { + "description": "Internal: Used for responsive spec", "type": "number" }, - "overlay": { + "_invalidTrack": { + "description": "internal", + "type": "boolean" + }, + "_overlay": { "items": { "additionalProperties": false, "properties": { @@ -5093,6 +5162,7 @@ "type": "boolean" }, "id": { + "description": "Assigned to `uid` in a HiGlass view config, used for API and caching.", "type": "string" }, "innerRadius": { @@ -5344,6 +5414,138 @@ }, "type": "array" }, + "_renderingId": { + "description": "internal", + "type": "string" + }, + "assembly": { + "anyOf": [ + { + "$ref": "#/definitions/Assembly", + "description": "A string that specifies the genome builds to use. Currently support `\"hg38\"`, `\"hg19\"`, `\"hg18\"`, `\"hg17\"`, `\"hg16\"`, `\"mm10\"`, `\"mm9\"`, and `\"unknown\"`.\n\n__Note:__: with `\"unknown\"` assembly, genomic axes do not show chrN: in labels." + }, + { + "const": "unknown", + "description": "No assemblies can be associated with a dummy track", + "type": "string" + } + ], + "description": "A string that specifies the genome builds to use. Currently support `\"hg38\"`, `\"hg19\"`, `\"hg18\"`, `\"hg17\"`, `\"hg16\"`, `\"mm10\"`, `\"mm9\"`, and `\"unknown\"`.\n\n__Note:__: with `\"unknown\"` assembly, genomic axes do not show chrN: in labels." + }, + "baselineY": { + "type": "number" + }, + "centerRadius": { + "description": "Proportion of the radius of the center white space.\n\n__Default:__ `0.3`", + "type": "number" + }, + "color": { + "anyOf": [ + { + "$ref": "#/definitions/Color" + }, + { + "$ref": "#/definitions/ChannelValue" + } + ] + }, + "data": { + "$ref": "#/definitions/DataDeep" + }, + "dataTransform": { + "items": { + "$ref": "#/definitions/DataTransform" + }, + "type": "array" + }, + "displacement": { + "$ref": "#/definitions/Displacement" + }, + "encoding": { + "additionalProperties": { + "$ref": "#/definitions/Channel" + }, + "type": "object" + }, + "endAngle": { + "description": "Specify the end angle (in the range of [0, 360]) of circular tracks (`{\"layout\": \"circular\"}`).", + "type": "number" + }, + "experimental": { + "additionalProperties": false, + "properties": { + "mouseEvents": { + "anyOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/definitions/MouseEventsDeep" + } + ] + }, + "performanceMode": { + "default": false, + "description": "Render visual marks with less smooth curves to increase rendering performance. Only supported for `elliptical` `linkStyle` `withinLink` currently.", + "type": "boolean" + } + }, + "type": "object" + }, + "flipY": { + "type": "boolean" + }, + "height": { + "description": "Specify the track height in pixels.", + "type": "number" + }, + "id": { + "description": "Assigned to `uid` in a HiGlass view config, used for API and caching.", + "type": "string" + }, + "innerRadius": { + "description": "Specify the inner radius of tracks when (`{\"layout\": \"circular\"}`).", + "type": "number" + }, + "layout": { + "anyOf": [ + { + "$ref": "#/definitions/Layout", + "description": "Specify the layout type of all tracks." + }, + { + "const": "linear", + "description": "Only linear layout are supported at this time", + "type": "string" + } + ], + "description": "Specify the layout type of all tracks." + }, + "linkingId": { + "description": "Specify an ID for [linking multiple views](http://gosling-lang.org/docs/user-interaction#linking-views)", + "type": "string" + }, + "mark": { + "$ref": "#/definitions/Mark" + }, + "opacity": { + "anyOf": [ + { + "$ref": "#/definitions/Opacity" + }, + { + "$ref": "#/definitions/ChannelValue" + } + ] + }, + "orientation": { + "$ref": "#/definitions/Orientation", + "description": "Specify the orientation." + }, + "outerRadius": { + "description": "Specify the outer radius of tracks when `{\"layout\": \"circular\"}`.", + "type": "number" + }, "overlayOnPreviousTrack": { "type": "boolean" }, @@ -5384,8 +5586,18 @@ "type": "number" }, "static": { - "description": "Whether to disable [Zooming and Panning](http://gosling-lang.org/docs/user-interaction#zooming-and-panning), __Default:__ `false`.", - "type": "boolean" + "anyOf": [ + { + "description": "Whether to disable [Zooming and Panning](http://gosling-lang.org/docs/user-interaction#zooming-and-panning), __Default:__ `false`.", + "type": "boolean" + }, + { + "const": true, + "description": "Whether to disable [Zooming and Panning](http://gosling-lang.org/docs/user-interaction#zooming-and-panning), __Default:__ `false`.", + "type": "boolean" + } + ], + "description": "Whether to disable [Zooming and Panning](http://gosling-lang.org/docs/user-interaction#zooming-and-panning), __Default:__ `false`." }, "stretch": { "type": "boolean" @@ -5411,7 +5623,16 @@ ] }, "style": { - "$ref": "#/definitions/Style", + "anyOf": [ + { + "$ref": "#/definitions/Style", + "description": "Define the [style](http://gosling-lang.org/docs/visual-channel#style-related-properties) of multive views. Will be overwritten by the style of children elements (e.g., view, track)." + }, + { + "$ref": "#/definitions/DummyTrackStyle", + "description": "Defines how the track is styled" + } + ], "description": "Define the [style](http://gosling-lang.org/docs/visual-channel#style-related-properties) of multive views. Will be overwritten by the style of children elements (e.g., view, track)." }, "subtitle": { @@ -5440,6 +5661,11 @@ }, "type": "array" }, + "type": { + "const": "dummy-track", + "description": "Used to specify the dummy track", + "type": "string" + }, "visibility": { "items": { "$ref": "#/definitions/VisibilityCondition" @@ -5571,7 +5797,20 @@ ] }, "zoomLimits": { - "$ref": "#/definitions/ZoomLimits" + "anyOf": [ + { + "$ref": "#/definitions/ZoomLimits" + }, + { + "description": "Unused property for DummyTrack", + "items": { + "type": "null" + }, + "maxItems": 2, + "minItems": 2, + "type": "array" + } + ] } }, "type": "object" @@ -5806,6 +6045,7 @@ "type": "number" }, "id": { + "description": "Assigned to `uid` in a HiGlass view config, used for API and caching.", "type": "string" }, "innerRadius": { @@ -6164,6 +6404,7 @@ "type": "number" }, "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", "type": "string" }, "innerRadius": { @@ -6311,6 +6552,7 @@ "type": "number" }, "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", "type": "string" }, "innerRadius": { @@ -6923,6 +7165,7 @@ "type": "number" }, "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", "type": "string" }, "innerRadius": { @@ -7070,6 +7313,7 @@ "type": "number" }, "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", "type": "string" }, "innerRadius": { @@ -7618,6 +7862,10 @@ "description": "Proportion of the radius of the center white space.\n\n__Default:__ `0.3`", "type": "number" }, + "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", + "type": "string" + }, "layout": { "$ref": "#/definitions/Layout", "description": "Specify the layout type of all tracks." @@ -7731,6 +7979,7 @@ "type": "number" }, "id": { + "description": "The ID of a view that is maintained for the use of JS API functions, e.g., positions of a view", "type": "string" }, "innerRadius": { @@ -8606,6 +8855,7 @@ "type": "number" }, "id": { + "description": "Assigned to `uid` in a HiGlass view config, used for API and caching.", "type": "string" }, "innerRadius": { @@ -8787,6 +9037,9 @@ }, { "$ref": "#/definitions/TemplateTrack" + }, + { + "$ref": "#/definitions/DummyTrack" } ] },