genome-spy-python 0.1.0__py3-none-any.whl
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.
- genome_spy/__init__.py +199 -0
- genome_spy/_chart_authoring.py +231 -0
- genome_spy/_conditions.py +72 -0
- genome_spy/_embed.py +87 -0
- genome_spy/_expressions.py +271 -0
- genome_spy/_parameters.py +267 -0
- genome_spy/_render.py +207 -0
- genome_spy/_utils.py +75 -0
- genome_spy/_widget.py +262 -0
- genome_spy/api.py +198 -0
- genome_spy/arrow.py +155 -0
- genome_spy/channels.py +193 -0
- genome_spy/chart.py +1240 -0
- genome_spy/data.py +56 -0
- genome_spy/data_transformers.py +267 -0
- genome_spy/datasets/__init__.py +189 -0
- genome_spy/datasets/_airway.py +219 -0
- genome_spy/datasets/_annotations.py +37 -0
- genome_spy/datasets/_gistic.py +43 -0
- genome_spy/datasets/_grammar.py +66 -0
- genome_spy/datasets/_hapmap.py +180 -0
- genome_spy/datasets/_mutation.py +289 -0
- genome_spy/datasets/_oncoprint.py +523 -0
- genome_spy/datasets/data/airway_metadata.csv +9 -0
- genome_spy/datasets/data/airway_scaledcounts.csv +38695 -0
- genome_spy/datasets/data/brca.maf.gz +0 -0
- genome_spy/datasets/data/hapmap_gwas.csv +14413 -0
- genome_spy/datasets/data/mutation_impact_reference.json +27 -0
- genome_spy/datasets/data/oncoprint_dataset3.json +266 -0
- genome_spy/datasets/data/p53_sequence_comparison.json.gz +0 -0
- genome_spy/datasets/data/pik3ca_mutations.json +1 -0
- genome_spy/datasets/data/pik3ca_tcga_brca_lollipop.json +38 -0
- genome_spy/datasets/data/refseq_gene_bodies.csv.gz +0 -0
- genome_spy/datasets/data/tal1_alphagenome_reference.json.gz +0 -0
- genome_spy/datasets/data/tcga.tsv +146 -0
- genome_spy/datasets/data/tcga_laml.maf.gz +0 -0
- genome_spy/datasets/data/tcga_laml_annot.tsv +201 -0
- genome_spy/datasets/data/tcga_laml_combined_oncoplot.json.gz +0 -0
- genome_spy/datasets/data/tcga_ov_gistic_lesions.tsv.gz +0 -0
- genome_spy/datasets/data/tcga_ov_gistic_scores.tsv.gz +0 -0
- genome_spy/helpers.py +185 -0
- genome_spy/jupyter.py +5 -0
- genome_spy/py.typed +0 -0
- genome_spy/schema/__init__.py +784 -0
- genome_spy/schema/_kwds.py +1394 -0
- genome_spy/schema/_typing.py +186 -0
- genome_spy/schema/capabilities.json +593 -0
- genome_spy/schema/channels.py +8943 -0
- genome_spy/schema/composition.py +1064 -0
- genome_spy/schema/core.py +51821 -0
- genome_spy/schema/ergonomics.py +2056 -0
- genome_spy/schema/expressions.py +476 -0
- genome_spy/schema/genome-spy-schema.json +33657 -0
- genome_spy/schema/lazy.py +326 -0
- genome_spy/schema/mixins.py +11684 -0
- genome_spy/schemapi.py +264 -0
- genome_spy/static/widget.js +345 -0
- genome_spy_python-0.1.0.dist-info/METADATA +185 -0
- genome_spy_python-0.1.0.dist-info/RECORD +64 -0
- genome_spy_python-0.1.0.dist-info/WHEEL +4 -0
- genome_spy_python-0.1.0.dist-info/licenses/LICENSE +21 -0
- genome_spy_python-0.1.0.dist-info/licenses/LICENSES/ALTAIR-BSD-3-Clause.txt +27 -0
- genome_spy_python-0.1.0.dist-info/licenses/LICENSES/GALLERY-DATA-MIT.txt +22 -0
- genome_spy_python-0.1.0.dist-info/licenses/THIRD_PARTY_NOTICES.md +42 -0
|
@@ -0,0 +1,2056 @@
|
|
|
1
|
+
"""Generated from the GenomeSpy JSON Schema. Do not edit by hand."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
from collections.abc import Sequence
|
|
5
|
+
from typing import Any, Self, Literal, overload
|
|
6
|
+
|
|
7
|
+
from typing import TYPE_CHECKING
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from genome_spy.channels import DatumChannel, LocusChannel, ValueChannel
|
|
11
|
+
from genome_spy._parameters import Parameter
|
|
12
|
+
from genome_spy._expressions import ExpressionOperand
|
|
13
|
+
|
|
14
|
+
from genome_spy._expressions import DatumExpression
|
|
15
|
+
from genome_spy.schema._typing import (
|
|
16
|
+
Align_T,
|
|
17
|
+
AxisOrient_T,
|
|
18
|
+
AxisPlacement_T,
|
|
19
|
+
Baseline_T,
|
|
20
|
+
ChannelWithScale_T,
|
|
21
|
+
DomEventType_T,
|
|
22
|
+
FieldName_T,
|
|
23
|
+
Field_T,
|
|
24
|
+
FontStyle_T,
|
|
25
|
+
FontWeight_T,
|
|
26
|
+
PrimaryPositionalChannel_T,
|
|
27
|
+
RulerClear_T,
|
|
28
|
+
RulerDisplay_T,
|
|
29
|
+
RulerEventType_T,
|
|
30
|
+
RulerExtent_T,
|
|
31
|
+
RulerSnap_T,
|
|
32
|
+
RulerSource_T,
|
|
33
|
+
ScalarDomain_T,
|
|
34
|
+
Scalar_T,
|
|
35
|
+
ScaleInterpolate_T,
|
|
36
|
+
ScaleType_T,
|
|
37
|
+
SelectionExtent_T,
|
|
38
|
+
SelectionType_T,
|
|
39
|
+
SortOrder_T,
|
|
40
|
+
TitleAnchor_T,
|
|
41
|
+
TitleFrame_T,
|
|
42
|
+
TitleOrient_T,
|
|
43
|
+
Type_T,
|
|
44
|
+
)
|
|
45
|
+
from genome_spy.schema._kwds import (
|
|
46
|
+
AxisConfigKwds,
|
|
47
|
+
BindCheckboxKwds,
|
|
48
|
+
BindInputKwds,
|
|
49
|
+
BindRadioSelectKwds,
|
|
50
|
+
BindRangeKwds,
|
|
51
|
+
EventConfigKwds,
|
|
52
|
+
GenomeAxisKwds,
|
|
53
|
+
LegendConfigKwds,
|
|
54
|
+
LinkConfigKwds,
|
|
55
|
+
MarkConfigKwds,
|
|
56
|
+
ParseKwds,
|
|
57
|
+
PointConfigKwds,
|
|
58
|
+
RangeConfigKwds,
|
|
59
|
+
RectConfigKwds,
|
|
60
|
+
RuleConfigKwds,
|
|
61
|
+
RulerConfigKwds,
|
|
62
|
+
RulerEventConfigKwds,
|
|
63
|
+
RulerMarkConfigKwds,
|
|
64
|
+
ScaleConfigKwds,
|
|
65
|
+
ScaleInterpolateParamsKwds,
|
|
66
|
+
ScaleKwds,
|
|
67
|
+
SchemeParamsKwds,
|
|
68
|
+
StepKwds,
|
|
69
|
+
TextConfigKwds,
|
|
70
|
+
TitleConfigKwds,
|
|
71
|
+
ViewConfigKwds,
|
|
72
|
+
ZoomParamsKwds,
|
|
73
|
+
)
|
|
74
|
+
from genome_spy.schemapi import Undefined, UndefinedType
|
|
75
|
+
from genome_spy.schema import core
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class DatumChannelMethodMixin:
|
|
79
|
+
"""Schema-derived methods for ``datum`` channels."""
|
|
80
|
+
|
|
81
|
+
def axis(
|
|
82
|
+
self,
|
|
83
|
+
value: core.GenomeAxis | GenomeAxisKwds | None | object = Undefined,
|
|
84
|
+
/,
|
|
85
|
+
*,
|
|
86
|
+
chromGrid: bool | UndefinedType = Undefined,
|
|
87
|
+
chromGridCap: Literal["butt", "round", "square"] | UndefinedType = Undefined,
|
|
88
|
+
chromGridColor: str | UndefinedType = Undefined,
|
|
89
|
+
chromGridDash: Sequence[float] | UndefinedType = Undefined,
|
|
90
|
+
chromGridDashOffset: float | UndefinedType = Undefined,
|
|
91
|
+
chromGridFillEven: str | UndefinedType = Undefined,
|
|
92
|
+
chromGridFillOdd: str | UndefinedType = Undefined,
|
|
93
|
+
chromGridOpacity: float | UndefinedType = Undefined,
|
|
94
|
+
chromGridWidth: float | UndefinedType = Undefined,
|
|
95
|
+
chromLabelAlign: Align_T | UndefinedType = Undefined,
|
|
96
|
+
chromLabelColor: str | UndefinedType = Undefined,
|
|
97
|
+
chromLabelFont: str | UndefinedType = Undefined,
|
|
98
|
+
chromLabelFontSize: float | UndefinedType = Undefined,
|
|
99
|
+
chromLabelFontStyle: FontStyle_T | UndefinedType = Undefined,
|
|
100
|
+
chromLabelFontWeight: FontWeight_T | UndefinedType = Undefined,
|
|
101
|
+
chromLabelPadding: float | UndefinedType = Undefined,
|
|
102
|
+
chromLabels: bool | UndefinedType = Undefined,
|
|
103
|
+
chromTickColor: str | UndefinedType = Undefined,
|
|
104
|
+
chromTickDash: Sequence[float] | UndefinedType = Undefined,
|
|
105
|
+
chromTickDashOffset: float | UndefinedType = Undefined,
|
|
106
|
+
chromTickSize: float | UndefinedType = Undefined,
|
|
107
|
+
chromTickWidth: float | UndefinedType = Undefined,
|
|
108
|
+
chromTicks: bool | UndefinedType = Undefined,
|
|
109
|
+
domain: bool | UndefinedType = Undefined,
|
|
110
|
+
domainCap: Literal["butt", "round", "square"] | UndefinedType = Undefined,
|
|
111
|
+
domainColor: str | UndefinedType = Undefined,
|
|
112
|
+
domainDash: Sequence[float] | UndefinedType = Undefined,
|
|
113
|
+
domainDashOffset: float | UndefinedType = Undefined,
|
|
114
|
+
domainWidth: float | UndefinedType = Undefined,
|
|
115
|
+
extraValues: Sequence[float] | UndefinedType = Undefined,
|
|
116
|
+
format: str | UndefinedType = Undefined,
|
|
117
|
+
grid: bool | UndefinedType = Undefined,
|
|
118
|
+
gridCap: Literal["butt", "round", "square"] | UndefinedType = Undefined,
|
|
119
|
+
gridColor: str | UndefinedType = Undefined,
|
|
120
|
+
gridDash: Sequence[float] | UndefinedType = Undefined,
|
|
121
|
+
gridDashOffset: float | UndefinedType = Undefined,
|
|
122
|
+
gridOpacity: float | UndefinedType = Undefined,
|
|
123
|
+
gridWidth: float | UndefinedType = Undefined,
|
|
124
|
+
labelAlign: Align_T | UndefinedType = Undefined,
|
|
125
|
+
labelAngle: float | UndefinedType = Undefined,
|
|
126
|
+
labelBaseline: Baseline_T | UndefinedType = Undefined,
|
|
127
|
+
labelColor: str | UndefinedType = Undefined,
|
|
128
|
+
labelFlush: bool | float | UndefinedType = Undefined,
|
|
129
|
+
labelFlushOffset: float | UndefinedType = Undefined,
|
|
130
|
+
labelFont: str | UndefinedType = Undefined,
|
|
131
|
+
labelFontSize: float | UndefinedType = Undefined,
|
|
132
|
+
labelFontStyle: FontStyle_T | UndefinedType = Undefined,
|
|
133
|
+
labelFontWeight: FontWeight_T | UndefinedType = Undefined,
|
|
134
|
+
labelLimit: float | UndefinedType = Undefined,
|
|
135
|
+
labelOverlap: bool
|
|
136
|
+
| Literal["parity"]
|
|
137
|
+
| Literal["greedy"]
|
|
138
|
+
| UndefinedType = Undefined,
|
|
139
|
+
labelPadding: float | UndefinedType = Undefined,
|
|
140
|
+
labelSeparation: float | UndefinedType = Undefined,
|
|
141
|
+
labels: bool | UndefinedType = Undefined,
|
|
142
|
+
maxExtent: float | UndefinedType = Undefined,
|
|
143
|
+
minExtent: float | UndefinedType = Undefined,
|
|
144
|
+
offset: float | UndefinedType = Undefined,
|
|
145
|
+
orient: AxisOrient_T | UndefinedType = Undefined,
|
|
146
|
+
placement: AxisPlacement_T | UndefinedType = Undefined,
|
|
147
|
+
style: str | Sequence[str] | None | UndefinedType = Undefined,
|
|
148
|
+
tickCap: Literal["butt", "round", "square"] | UndefinedType = Undefined,
|
|
149
|
+
tickColor: str | UndefinedType = Undefined,
|
|
150
|
+
tickCount: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
151
|
+
tickDash: Sequence[float] | UndefinedType = Undefined,
|
|
152
|
+
tickDashOffset: float | UndefinedType = Undefined,
|
|
153
|
+
tickMinStep: float | UndefinedType = Undefined,
|
|
154
|
+
tickSize: float | UndefinedType = Undefined,
|
|
155
|
+
tickWidth: float | UndefinedType = Undefined,
|
|
156
|
+
ticks: bool | UndefinedType = Undefined,
|
|
157
|
+
title: str | None | UndefinedType = Undefined,
|
|
158
|
+
titleColor: str | UndefinedType = Undefined,
|
|
159
|
+
titleFit: Literal["point", "range"] | UndefinedType = Undefined,
|
|
160
|
+
titleFont: str | UndefinedType = Undefined,
|
|
161
|
+
titleFontSize: float | UndefinedType = Undefined,
|
|
162
|
+
titleFontStyle: FontStyle_T | UndefinedType = Undefined,
|
|
163
|
+
titleFontWeight: FontWeight_T | UndefinedType = Undefined,
|
|
164
|
+
titleOpacity: float | UndefinedType = Undefined,
|
|
165
|
+
titlePadding: float | UndefinedType = Undefined,
|
|
166
|
+
values: Sequence[Any] | UndefinedType = Undefined,
|
|
167
|
+
zindex: float | UndefinedType = Undefined,
|
|
168
|
+
) -> Self:
|
|
169
|
+
"""Return a channel with a axis configuration.
|
|
170
|
+
|
|
171
|
+
Args:
|
|
172
|
+
chromGrid (bool): A boolean flag indicating if chromosome grid lines should be included as part of the axis. __Default value:__ ``false``
|
|
173
|
+
chromGridCap (Literal['butt', 'round', 'square']): The stroke cap for the chromosome grid line's ending style. One of ``"butt"``, ``"round"`` or ``"square"``. __Default value:__ ``"butt"``
|
|
174
|
+
chromGridColor (str): Color of grid lines. __Default value:__ ``lightgray``
|
|
175
|
+
chromGridDash (Sequence[float]): An array of alternating [stroke, space] lengths for dashed chromosome grid mark lines.
|
|
176
|
+
chromGridDashOffset (float): The pixel offset at which to start drawing with the chromosome grid mark dash array.
|
|
177
|
+
chromGridFillEven (str): Fill color of odd chromosomes. __Default value:__ (none)
|
|
178
|
+
chromGridFillOdd (str): Fill color of odd chromosomes. __Default value:__ (none)
|
|
179
|
+
chromGridOpacity (float): The opacity of the chromosome grid lines. __Default value:__ ``1``
|
|
180
|
+
chromGridWidth (float): Width of the chromosome grid lines. __Default value:__ ``1``
|
|
181
|
+
chromLabelAlign (Align_T): Horizontal text alignment of chromosome name labels. __Default value:__ ``"left"``
|
|
182
|
+
chromLabelColor (str): Text color of chromosome name labels. __Default value:__ ``"black"``
|
|
183
|
+
chromLabelFont (str): The font of chromosome name labels.
|
|
184
|
+
chromLabelFontSize (float): Font size of chromosome name labels, in pixels. __Default value:__ ``13``
|
|
185
|
+
chromLabelFontStyle (FontStyle_T): Font style of chromosome name labels. __Default value:__ ``"normal"``
|
|
186
|
+
chromLabelFontWeight (FontWeight_T): Font weight of chromosome name labels. __Default value:__ ``"normal"``
|
|
187
|
+
chromLabelPadding (float): The padding, in pixels, between chromosome boundary ticks and chromosome name labels. __Default value:__ ``7``
|
|
188
|
+
chromLabels (bool): A boolean flag indicating if chromosome name labels should be included as part of the genome axis. __Default value:__ ``true``
|
|
189
|
+
chromTickColor (str): The color of chromosome boundary ticks. __Default value:__ ``"#989898"``
|
|
190
|
+
chromTickDash (Sequence[float]): An array of alternating [stroke, space] lengths for dashed chromosome boundary ticks. __Default value:__ ``[4, 2]``
|
|
191
|
+
chromTickDashOffset (float): The pixel offset at which to start drawing with the chromosome tick dash array. __Default value:__ ``1``
|
|
192
|
+
chromTickSize (float): The size in pixels of chromosome boundary ticks. __Default value:__ ``18``
|
|
193
|
+
chromTickWidth (float): The width, in pixels, of chromosome boundary ticks. __Default value:__ ``1``
|
|
194
|
+
chromTicks (bool): A boolean flag indicating if chromosome boundary ticks should be included as part of the genome axis. __Default value:__ ``true``
|
|
195
|
+
domain (bool): A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis. __Default value:__ ``true``
|
|
196
|
+
domainCap (Literal['butt', 'round', 'square']): The stroke cap for the domain line's ending style. One of ``"butt"``, ``"round"`` or ``"square"``. __Default value:__ ``"butt"``
|
|
197
|
+
domainColor (str): Color of axis domain line. __Default value:__ ``"gray"``.
|
|
198
|
+
domainDash (Sequence[float]): An array of alternating [stroke, space] lengths for dashed domain lines.
|
|
199
|
+
domainDashOffset (float): The pixel offset at which to start drawing with the domain dash array.
|
|
200
|
+
domainWidth (float): Stroke width of axis domain line __Default value:__ ``1``
|
|
201
|
+
extraValues (Sequence[float]): Additional tick and label values to include alongside automatically generated ticks on continuous scales. Values outside the visible scale range are omitted and duplicates are removed. During automatic overlap removal, these labels are reduced against other explicitly specified labels but take precedence over automatically generated labels. This property is ignored on discrete scales and when ``values`` is set.
|
|
202
|
+
format (str): The format specifier pattern for axis labels. Must be a legal d3-format specifier.
|
|
203
|
+
grid (bool): A boolean flag indicating if grid lines should be included as part of the axis. __Default value:__ ``false``
|
|
204
|
+
gridCap (Literal['butt', 'round', 'square']): The stroke cap for the grid line's ending style. One of ``"butt"``, ``"round"`` or ``"square"``. __Default value:__ ``"butt"``
|
|
205
|
+
gridColor (str): Color of grid lines. __Default value:__ ``lightgray``
|
|
206
|
+
gridDash (Sequence[float]): An array of alternating [stroke, space] lengths for dashed grid mark lines.
|
|
207
|
+
gridDashOffset (float): The pixel offset at which to start drawing with the grid mark dash array.
|
|
208
|
+
gridOpacity (float): The opacity of the grid lines. __Default value:__ ``1``
|
|
209
|
+
gridWidth (float): Width of the grid lines. __Default value:__ ``1``
|
|
210
|
+
labelAlign (Align_T): Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation.
|
|
211
|
+
labelAngle (float): The rotation angle of the axis labels. __Default value:__ ``-90`` for nominal and ordinal fields; ``0`` otherwise.
|
|
212
|
+
labelBaseline (Baseline_T): Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. One of ``"alphabetic"`` (default), ``"top"``, ``"middle"``, ``"bottom"``.
|
|
213
|
+
labelColor (str): The color of the tick label, can be in hex color code or regular color name.
|
|
214
|
+
labelFlush (bool | float): Indicates whether labels near the beginning or end of the axis should be aligned flush with the scale range. A number specifies the endpoint distance threshold in pixels. ``true`` uses a threshold of one pixel. Flushing is supported for quantitative, index, and locus axes. By default, it is enabled for non-zoomable x axes of these types. On a zoomable x axis with a configured bounded zoom extent, ticks matching the extent boundaries are flushed while they remain visible. Other zoomable ticks and y-axis ticks are not flushed by default. Flushing supports label angles that are multiples of 90 degrees. The automatic behavior is disabled at other angles.
|
|
215
|
+
labelFlushOffset (float): The number of pixels by which to move flush-adjusted labels outward from the axis range. __Default value:__ ``0``
|
|
216
|
+
labelFont (str): The font of the tick label.
|
|
217
|
+
labelFontSize (float): The font size of the label, in pixels.
|
|
218
|
+
labelFontStyle (FontStyle_T): Font style of the title.
|
|
219
|
+
labelFontWeight (FontWeight_T): Font weight of axis tick labels.
|
|
220
|
+
labelLimit (float): Maximum allowed pixel width of axis tick labels. __Default value:__ ``180``
|
|
221
|
+
labelOverlap (bool | Literal['parity'] | Literal['greedy']): The strategy for removing overlapping axis labels. ``true`` uses the ``"parity"`` strategy. ``"parity"`` removes every other label until the remaining labels no longer overlap. ``"greedy"`` keeps each label that does not overlap the previously retained label. ``false`` disables overlap removal. By default, overlap removal uses ``"parity"`` for linear-like continuous scales and ``"greedy"`` for logarithmic and symlog scales. It is disabled for discrete scales. Overlap removal supports label angles that are multiples of 90 degrees. The automatic behavior is disabled at other angles.
|
|
222
|
+
labelPadding (float): The padding, in pixels, between axis and text labels. __Default value:__ ``2``
|
|
223
|
+
labelSeparation (float): The minimum separation, in pixels, between retained axis labels. __Default value:__ ``2``
|
|
224
|
+
labels (bool): A boolean flag indicating if labels should be included as part of the axis. __Default value:__ ``true``.
|
|
225
|
+
maxExtent (float): The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles. __Default value:__ ``undefined``.
|
|
226
|
+
minExtent (float): The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles. __Default value:__ ``30`` for y-axis; ``undefined`` for x-axis.
|
|
227
|
+
offset (float): The orthogonal offset in pixels by which to displace the axis from its position along the edge of the chart.
|
|
228
|
+
orient (AxisOrient_T): The orientation of the axis. One of ``"top"``, ``"bottom"``, ``"left"`` or ``"right"``. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart). __Default value:__ ``"bottom"`` for x-axes and ``"left"`` for y-axes.
|
|
229
|
+
placement (AxisPlacement_T): Placement of the axis relative to the plotting area. Outside axes reserve layout space outside the plot. Inside axes are mirrored into the plot and do not reserve external layout space. __Default value:__ ``"outside"``.
|
|
230
|
+
style (str | Sequence[str] | None): Named style reference(s) resolved from ``config.style``. If an array is provided, later styles override earlier ones. Set to ``null`` to reset inherited axis styles.
|
|
231
|
+
tickCap (Literal['butt', 'round', 'square']): The stroke cap for the tick lines' ending style. One of ``"butt"``, ``"round"`` or ``"square"``. __Default value:__ ``"butt"``
|
|
232
|
+
tickColor (str): The color of the axis's tick. __Default value:__ ``"gray"``
|
|
233
|
+
tickCount (float | ExprRef | dict[str, Any]): A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are "nice" (multiples of ``2``, ``5``, ``10``) and lie within the underlying scale's range. An expression reference can use ``axisLength`` for the current length of the axis in pixels. For example, ``{ "expr": "ceil(axisLength / 40)" }`` requests one tick per 40 pixels. __Default value:__ an expression based on ``axisLength``
|
|
234
|
+
tickDash (Sequence[float]): An array of alternating [stroke, space] lengths for dashed tick mark lines.
|
|
235
|
+
tickDashOffset (float): The pixel offset at which to start drawing with the tick mark dash array.
|
|
236
|
+
tickMinStep (float): The minimum desired step between axis ticks, in terms of scale domain values. For example, a value of ``1`` indicates that ticks should not be less than 1 unit apart. If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if necessary, to enforce the minimum step value.
|
|
237
|
+
tickSize (float): The size in pixels of axis ticks. __Default value:__ ``5``
|
|
238
|
+
tickWidth (float): The width, in pixels, of ticks. __Default value:__ ``1``
|
|
239
|
+
ticks (bool): Boolean value that determines whether the axis should include ticks. __Default value:__ ``true``
|
|
240
|
+
title (str | None): A title for the axis. By default, the title is derived from the encoding title, field, or expression. Set to ``null`` to remove it.
|
|
241
|
+
titleColor (str): Color of the title, can be in hex color code or regular color name.
|
|
242
|
+
titleFit (Literal['point', 'range']): Fitting mode for the axis title. ``"point"`` anchors the title at the center of the axis without constraining its length. ``"range"`` constrains the title to the axis span using ranged text, allowing it to be squeezed to fit and kept visible inside scrollable viewports. __Default value:__ ``"point"``
|
|
243
|
+
titleFont (str): Font of the title. (e.g., ``"Helvetica Neue"``).
|
|
244
|
+
titleFontSize (float): Font size of the title.
|
|
245
|
+
titleFontStyle (FontStyle_T): Font style of the title.
|
|
246
|
+
titleFontWeight (FontWeight_T): Font weight of the title. This can be either a string (e.g ``"bold"``, ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``).
|
|
247
|
+
titleOpacity (float): Opacity of the axis title.
|
|
248
|
+
titlePadding (float): The padding, in pixels, between title and axis.
|
|
249
|
+
values (Sequence[Any]): Explicitly set the visible axis tick and label values. During automatic overlap removal, these labels are reduced against each other but take precedence over automatically generated labels.
|
|
250
|
+
zindex (float): Z-order of the axis relative to the view content. Values greater than ``0`` render after the view marks. Values less than or equal to ``0`` render before the marks. __Default value:__ ``0``, or ``10`` when the view content is clipped or scrollable.
|
|
251
|
+
"""
|
|
252
|
+
defined = {
|
|
253
|
+
"chromGrid": chromGrid,
|
|
254
|
+
"chromGridCap": chromGridCap,
|
|
255
|
+
"chromGridColor": chromGridColor,
|
|
256
|
+
"chromGridDash": chromGridDash,
|
|
257
|
+
"chromGridDashOffset": chromGridDashOffset,
|
|
258
|
+
"chromGridFillEven": chromGridFillEven,
|
|
259
|
+
"chromGridFillOdd": chromGridFillOdd,
|
|
260
|
+
"chromGridOpacity": chromGridOpacity,
|
|
261
|
+
"chromGridWidth": chromGridWidth,
|
|
262
|
+
"chromLabelAlign": chromLabelAlign,
|
|
263
|
+
"chromLabelColor": chromLabelColor,
|
|
264
|
+
"chromLabelFont": chromLabelFont,
|
|
265
|
+
"chromLabelFontSize": chromLabelFontSize,
|
|
266
|
+
"chromLabelFontStyle": chromLabelFontStyle,
|
|
267
|
+
"chromLabelFontWeight": chromLabelFontWeight,
|
|
268
|
+
"chromLabelPadding": chromLabelPadding,
|
|
269
|
+
"chromLabels": chromLabels,
|
|
270
|
+
"chromTickColor": chromTickColor,
|
|
271
|
+
"chromTickDash": chromTickDash,
|
|
272
|
+
"chromTickDashOffset": chromTickDashOffset,
|
|
273
|
+
"chromTickSize": chromTickSize,
|
|
274
|
+
"chromTickWidth": chromTickWidth,
|
|
275
|
+
"chromTicks": chromTicks,
|
|
276
|
+
"domain": domain,
|
|
277
|
+
"domainCap": domainCap,
|
|
278
|
+
"domainColor": domainColor,
|
|
279
|
+
"domainDash": domainDash,
|
|
280
|
+
"domainDashOffset": domainDashOffset,
|
|
281
|
+
"domainWidth": domainWidth,
|
|
282
|
+
"extraValues": extraValues,
|
|
283
|
+
"format": format,
|
|
284
|
+
"grid": grid,
|
|
285
|
+
"gridCap": gridCap,
|
|
286
|
+
"gridColor": gridColor,
|
|
287
|
+
"gridDash": gridDash,
|
|
288
|
+
"gridDashOffset": gridDashOffset,
|
|
289
|
+
"gridOpacity": gridOpacity,
|
|
290
|
+
"gridWidth": gridWidth,
|
|
291
|
+
"labelAlign": labelAlign,
|
|
292
|
+
"labelAngle": labelAngle,
|
|
293
|
+
"labelBaseline": labelBaseline,
|
|
294
|
+
"labelColor": labelColor,
|
|
295
|
+
"labelFlush": labelFlush,
|
|
296
|
+
"labelFlushOffset": labelFlushOffset,
|
|
297
|
+
"labelFont": labelFont,
|
|
298
|
+
"labelFontSize": labelFontSize,
|
|
299
|
+
"labelFontStyle": labelFontStyle,
|
|
300
|
+
"labelFontWeight": labelFontWeight,
|
|
301
|
+
"labelLimit": labelLimit,
|
|
302
|
+
"labelOverlap": labelOverlap,
|
|
303
|
+
"labelPadding": labelPadding,
|
|
304
|
+
"labelSeparation": labelSeparation,
|
|
305
|
+
"labels": labels,
|
|
306
|
+
"maxExtent": maxExtent,
|
|
307
|
+
"minExtent": minExtent,
|
|
308
|
+
"offset": offset,
|
|
309
|
+
"orient": orient,
|
|
310
|
+
"placement": placement,
|
|
311
|
+
"style": style,
|
|
312
|
+
"tickCap": tickCap,
|
|
313
|
+
"tickColor": tickColor,
|
|
314
|
+
"tickCount": tickCount,
|
|
315
|
+
"tickDash": tickDash,
|
|
316
|
+
"tickDashOffset": tickDashOffset,
|
|
317
|
+
"tickMinStep": tickMinStep,
|
|
318
|
+
"tickSize": tickSize,
|
|
319
|
+
"tickWidth": tickWidth,
|
|
320
|
+
"ticks": ticks,
|
|
321
|
+
"title": title,
|
|
322
|
+
"titleColor": titleColor,
|
|
323
|
+
"titleFit": titleFit,
|
|
324
|
+
"titleFont": titleFont,
|
|
325
|
+
"titleFontSize": titleFontSize,
|
|
326
|
+
"titleFontStyle": titleFontStyle,
|
|
327
|
+
"titleFontWeight": titleFontWeight,
|
|
328
|
+
"titleOpacity": titleOpacity,
|
|
329
|
+
"titlePadding": titlePadding,
|
|
330
|
+
"values": values,
|
|
331
|
+
"zindex": zindex,
|
|
332
|
+
}
|
|
333
|
+
defined = {key: item for key, item in defined.items() if item is not Undefined}
|
|
334
|
+
return self._with_nested("axis", value, **defined) # type: ignore[attr-defined, no-any-return]
|
|
335
|
+
|
|
336
|
+
def band(
|
|
337
|
+
self,
|
|
338
|
+
value: float,
|
|
339
|
+
) -> Self:
|
|
340
|
+
"""Return a channel with ``band`` updated."""
|
|
341
|
+
return self._with_property("band", value) # type: ignore[attr-defined, no-any-return]
|
|
342
|
+
|
|
343
|
+
def buildIndex(
|
|
344
|
+
self,
|
|
345
|
+
value: bool,
|
|
346
|
+
) -> Self:
|
|
347
|
+
"""Return a channel with ``buildIndex`` updated."""
|
|
348
|
+
return self._with_property("buildIndex", value) # type: ignore[attr-defined, no-any-return]
|
|
349
|
+
|
|
350
|
+
def condition(
|
|
351
|
+
self,
|
|
352
|
+
value: Any,
|
|
353
|
+
) -> Self:
|
|
354
|
+
"""Return a channel with ``condition`` updated."""
|
|
355
|
+
return self._with_property("condition", value) # type: ignore[attr-defined, no-any-return]
|
|
356
|
+
|
|
357
|
+
def description(
|
|
358
|
+
self,
|
|
359
|
+
value: str,
|
|
360
|
+
) -> Self:
|
|
361
|
+
"""Return a channel with ``description`` updated."""
|
|
362
|
+
return self._with_property("description", value) # type: ignore[attr-defined, no-any-return]
|
|
363
|
+
|
|
364
|
+
def domainInert(
|
|
365
|
+
self,
|
|
366
|
+
value: bool,
|
|
367
|
+
) -> Self:
|
|
368
|
+
"""Return a channel with ``domainInert`` updated."""
|
|
369
|
+
return self._with_property("domainInert", value) # type: ignore[attr-defined, no-any-return]
|
|
370
|
+
|
|
371
|
+
def format(
|
|
372
|
+
self,
|
|
373
|
+
value: str,
|
|
374
|
+
) -> Self:
|
|
375
|
+
"""Return a channel with ``format`` updated."""
|
|
376
|
+
return self._with_property("format", value) # type: ignore[attr-defined, no-any-return]
|
|
377
|
+
|
|
378
|
+
def resolutionChannel(
|
|
379
|
+
self,
|
|
380
|
+
value: ChannelWithScale_T,
|
|
381
|
+
) -> Self:
|
|
382
|
+
"""Return a channel with ``resolutionChannel`` updated."""
|
|
383
|
+
return self._with_property("resolutionChannel", value) # type: ignore[attr-defined, no-any-return]
|
|
384
|
+
|
|
385
|
+
def scale(
|
|
386
|
+
self,
|
|
387
|
+
value: core.Scale | ScaleKwds | None | object = Undefined,
|
|
388
|
+
/,
|
|
389
|
+
*,
|
|
390
|
+
align: float | UndefinedType = Undefined,
|
|
391
|
+
assembly: str
|
|
392
|
+
| core.UrlGenomeDefinition
|
|
393
|
+
| dict[str, Any]
|
|
394
|
+
| core.InlineGenomeDefinition
|
|
395
|
+
| UndefinedType = Undefined,
|
|
396
|
+
base: float | UndefinedType = Undefined,
|
|
397
|
+
bins: Sequence[float] | UndefinedType = Undefined,
|
|
398
|
+
clamp: bool | UndefinedType = Undefined,
|
|
399
|
+
constant: float | UndefinedType = Undefined,
|
|
400
|
+
domain: ScalarDomain_T
|
|
401
|
+
| Sequence[core.ChromosomalLocus | dict[str, Any]]
|
|
402
|
+
| core.SelectionDomainRef
|
|
403
|
+
| dict[str, Any]
|
|
404
|
+
| core.ViewportDomainRef
|
|
405
|
+
| core.ExprRef
|
|
406
|
+
| Sequence[float | str | bool | core.ExprRef | dict[str, Any]]
|
|
407
|
+
| UndefinedType = Undefined,
|
|
408
|
+
domainMax: float | UndefinedType = Undefined,
|
|
409
|
+
domainMid: float | UndefinedType = Undefined,
|
|
410
|
+
domainMin: float | UndefinedType = Undefined,
|
|
411
|
+
domainTransition: bool | UndefinedType = Undefined,
|
|
412
|
+
exponent: float | UndefinedType = Undefined,
|
|
413
|
+
interpolate: ScaleInterpolate_T
|
|
414
|
+
| core.ScaleInterpolateParams
|
|
415
|
+
| ScaleInterpolateParamsKwds
|
|
416
|
+
| UndefinedType = Undefined,
|
|
417
|
+
name: str | UndefinedType = Undefined,
|
|
418
|
+
nice: bool | float | dict[str, Any] | UndefinedType = Undefined,
|
|
419
|
+
numberingOffset: float | UndefinedType = Undefined,
|
|
420
|
+
padding: float | UndefinedType = Undefined,
|
|
421
|
+
paddingInner: float | UndefinedType = Undefined,
|
|
422
|
+
paddingOuter: float | UndefinedType = Undefined,
|
|
423
|
+
range: Sequence[float | str | core.ExprRef | dict[str, Any]]
|
|
424
|
+
| str
|
|
425
|
+
| UndefinedType = Undefined,
|
|
426
|
+
reverse: bool | UndefinedType = Undefined,
|
|
427
|
+
round: bool | UndefinedType = Undefined,
|
|
428
|
+
scheme: str | core.SchemeParams | SchemeParamsKwds | UndefinedType = Undefined,
|
|
429
|
+
type: ScaleType_T | UndefinedType = Undefined,
|
|
430
|
+
zero: bool | UndefinedType = Undefined,
|
|
431
|
+
zoom: bool | core.ZoomParams | ZoomParamsKwds | UndefinedType = Undefined,
|
|
432
|
+
) -> Self:
|
|
433
|
+
"""Return a channel with a scale configuration.
|
|
434
|
+
|
|
435
|
+
Args:
|
|
436
|
+
align (float): The alignment of the steps within the scale range. This value must lie in the range ``[0,1]``. A value of ``0.5`` indicates that the steps should be centered within the range. A value of ``0`` or ``1`` may be used to shift the bands to one side, say to position them adjacent to an axis. __Default value:__ ``0.5``
|
|
437
|
+
assembly (str | UrlGenomeDefinition | dict[str, Any] | InlineGenomeDefinition): Genome assembly definition for locus scales. This can be: - A string reference to a named assembly (built-in or root-configured). - An inline anonymous assembly that defines either ``contigs`` or ``url``. If undefined, the default genome from the genome store is used.
|
|
438
|
+
base (float): The logarithm base of the ``log`` scale (default ``10``).
|
|
439
|
+
bins (Sequence[float]): An array of bin boundaries over the scale domain. If provided, axes and legends will use the bin boundaries to inform the choice of tick marks and text labels.
|
|
440
|
+
clamp (bool): If ``true``, values that exceed the data domain are clamped to either the minimum or maximum range value __Default value:__ derived from the Vega-Lite scale config's ``clamp`` (``true`` by default).
|
|
441
|
+
constant (float): A constant determining the slope of the symlog function around zero. Only used for ``symlog`` scales. __Default value:__ ``1``
|
|
442
|
+
domain (ScalarDomain_T | Sequence[ChromosomalLocus | dict[str, Any]] | SelectionDomainRef | dict[str, Any] | ViewportDomainRef | ExprRef | Sequence[float | str | bool | ExprRef | dict[str, Any]]): Customized domain values. For quantitative fields, ``domain`` can take the form of a two-element array with minimum and maximum values. Vega-Lite piecewise scales can be created by providing a ``domain`` with more than two entries. For ordinal and nominal fields, ``domain`` can be an array that lists valid input values. The domain can also be defined by an expression reference that evaluates to the domain array. Array elements may also be expression references. All parameter names referenced by a scale, including selection-domain parameters, resolve from the view that owns the scale resolution. For a shared scale, declare controlling parameters on that owning composed view or an ancestor.
|
|
443
|
+
domainMax (float): Sets the maximum value in the scale domain, overriding the ``domain`` property. This property is only intended for use with scales having continuous domains.
|
|
444
|
+
domainMid (float): Inserts a single mid-point value into a two-element domain. The mid-point value must lie between the domain minimum and maximum values. This property can be useful for setting a midpoint for Vega-Lite diverging color scales. The domainMid property is only intended for use with scales supporting continuous, piecewise domains.
|
|
445
|
+
domainMin (float): Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.
|
|
446
|
+
domainTransition (bool): Controls whether domain updates are applied immediately or with a smooth transition. Set this to ``false`` to apply domain updates immediately. The default is ``true``, except for domains that include ``ExprRef``s, which default to ``false`` unless overridden. __Default value:__ ``true``, except ``false`` for ``ExprRef``-driven domains.
|
|
447
|
+
exponent (float): The exponent of the ``pow`` scale.
|
|
448
|
+
interpolate (ScaleInterpolate_T | ScaleInterpolateParams | ScaleInterpolateParamsKwds): The interpolation method for range values. By default, a general interpolator for numbers, dates, strings and colors (in HCL space) is used. For color ranges, this property allows interpolation in alternative color spaces. Legal values include ``rgb``, ``hsl``, ``hsl-long``, ``lab``, ``hcl``, ``hcl-long``, ``cubehelix`` and ``cubehelix-long`` ('-long' variants use longer paths in polar coordinate spaces). If object-valued, this property accepts an object with a string-valued type property and an optional numeric gamma property applicable to rgb and cubehelix interpolators. For more, see the d3-interpolate documentation. __Default value:__ ``hcl``
|
|
449
|
+
name (str): The name of the scale. Names are optional but allow the scales to be referenced and found with the API.
|
|
450
|
+
nice (bool | float | dict[str, Any]): Extending the domain so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. Nicing is useful if the domain is computed from data and may be irregular. For example, for a domain of [0.201479…, 0.996679…], a nice domain might be [0.2, 1.0]. For quantitative scales such as linear, ``nice`` can be either a boolean flag or a number. If ``nice`` is a number, it will represent a desired tick count. This allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain. __Default value:__ ``true`` for unbinned quantitative fields; ``false`` otherwise.
|
|
451
|
+
numberingOffset (float): The offset added to data values when formatting tick labels on index and locus scales. This property does not transform data values. __Default value:__ ``0``
|
|
452
|
+
padding (float): For Vega-Lite continuous scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the ``zero``, ``nice``, ``domainMin``, and ``domainMax`` properties. For Vega-Lite band scales, shortcut for setting ``paddingInner`` and ``paddingOuter`` to the same value. For Vega-Lite point scales, alias for ``paddingOuter``. __Default value:__ For continuous scales, derived from the Vega-Lite scale config's ``continuousPadding``. For band and point scales, see ``paddingInner`` and ``paddingOuter``. By default, Vega-Lite sets padding such that width/height = number of unique values * step.
|
|
453
|
+
paddingInner (float): The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1]. For point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands). __Default value:__ derived from the Vega-Lite scale config's ``bandPaddingInner``.
|
|
454
|
+
paddingOuter (float): The outer padding (spacing) at the ends of the range of band and point scales, as a fraction of the step size. This value must lie in the range [0,1]. __Default value:__ derived from the Vega-Lite scale config's ``bandPaddingOuter`` for band scales and ``pointPadding`` for point scales. By default, Vega-Lite sets outer padding such that width/height = number of unique values * step.
|
|
455
|
+
range (Sequence[float | str | ExprRef | dict[str, Any]] | str): The range of the scale. One of: - A string indicating a pre-defined named scale range from Vega-Lite (e.g., example, ``"symbol"``, or ``"diverging"``). - For Vega-Lite continuous scales, two-element array indicating minimum and maximum values, or an array with more than two entries for specifying a Vega-Lite piecewise scale. Array elements may also be expression references, which use the parameter scope of the view that owns the scale resolution. - For Vega-Lite discrete and Vega-Lite discretizing scales, an array of desired output values. Array elements may also be expression references, which use the parameter scope of the view that owns the scale resolution. __Notes:__ 1) For color scales you can also specify a color ``scheme`` instead of ``range``. 2) Any directly specified ``range`` for ``x`` and ``y`` channels will be ignored. Range can be customized via the view's corresponding Vega-Lite size (``width`` and ``height``).
|
|
456
|
+
reverse (bool): If true, reverses the order of the scale range. __Default value:__ ``false``.
|
|
457
|
+
round (bool): If ``true``, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. __Default value:__ ``false``.
|
|
458
|
+
scheme (str | SchemeParams | SchemeParamsKwds): A string indicating a color Vega-Lite scheme name (e.g., ``"category10"`` or ``"blues"``) or a Vega-Lite scheme parameter object. Discrete color schemes may be used with Vega-Lite discrete or Vega-Lite discretizing scales. Continuous color schemes are intended for use with color scales. For the full list of supported schemes, please refer to the Vega Scheme reference.
|
|
459
|
+
type (ScaleType_T): The type of scale. GenomeSpy follows the Vega-Lite scale model; the links below refer to the Vega-Lite documentation: 1) **Continuous Scales** -- mapping continuous domains to continuous output ranges (``"linear"``, ``"pow"``, ``"sqrt"``, ``"symlog"``, ``"log"``, ``"time"``, ``"utc"``). 2) **Discrete Scales** -- mapping discrete domains to discrete (``"ordinal"``) or continuous (``"band"`` and ``"point"``) output ranges. 3) **Discretizing Scales** -- mapping continuous domains to discrete output ranges ``"bin-ordinal"``, ``"quantile"``, ``"quantize"`` and ``"threshold"``. GenomeSpy also provides index and locus scales for sequence and genomic coordinates. __Default value:__ please see the Vega-Lite scale type table.
|
|
460
|
+
zero (bool): If ``true``, ensures that a zero baseline value is included in the scale domain. __Default value:__ ``true`` for x and y channels if the quantitative field is not binned and no custom ``domain`` is provided; ``false`` otherwise. __Note:__ Log scales do not support ``zero``.
|
|
461
|
+
zoom (bool | ZoomParams | ZoomParamsKwds): If ``true`` and the scale is used on a positional channel, it can bee zoomed and translated interactively.
|
|
462
|
+
"""
|
|
463
|
+
defined = {
|
|
464
|
+
"align": align,
|
|
465
|
+
"assembly": assembly,
|
|
466
|
+
"base": base,
|
|
467
|
+
"bins": bins,
|
|
468
|
+
"clamp": clamp,
|
|
469
|
+
"constant": constant,
|
|
470
|
+
"domain": domain,
|
|
471
|
+
"domainMax": domainMax,
|
|
472
|
+
"domainMid": domainMid,
|
|
473
|
+
"domainMin": domainMin,
|
|
474
|
+
"domainTransition": domainTransition,
|
|
475
|
+
"exponent": exponent,
|
|
476
|
+
"interpolate": interpolate,
|
|
477
|
+
"name": name,
|
|
478
|
+
"nice": nice,
|
|
479
|
+
"numberingOffset": numberingOffset,
|
|
480
|
+
"padding": padding,
|
|
481
|
+
"paddingInner": paddingInner,
|
|
482
|
+
"paddingOuter": paddingOuter,
|
|
483
|
+
"range": range,
|
|
484
|
+
"reverse": reverse,
|
|
485
|
+
"round": round,
|
|
486
|
+
"scheme": scheme,
|
|
487
|
+
"type": type,
|
|
488
|
+
"zero": zero,
|
|
489
|
+
"zoom": zoom,
|
|
490
|
+
}
|
|
491
|
+
defined = {key: item for key, item in defined.items() if item is not Undefined}
|
|
492
|
+
return self._with_nested("scale", value, **defined) # type: ignore[attr-defined, no-any-return]
|
|
493
|
+
|
|
494
|
+
def title(
|
|
495
|
+
self,
|
|
496
|
+
value: str | None,
|
|
497
|
+
) -> Self:
|
|
498
|
+
"""Return a channel with ``title`` updated."""
|
|
499
|
+
return self._with_property("title", value) # type: ignore[attr-defined, no-any-return]
|
|
500
|
+
|
|
501
|
+
def type(
|
|
502
|
+
self,
|
|
503
|
+
value: Type_T,
|
|
504
|
+
) -> Self:
|
|
505
|
+
"""Return a channel with ``type`` updated."""
|
|
506
|
+
return self._with_property("type", value) # type: ignore[attr-defined, no-any-return]
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
class ValueChannelMethodMixin:
|
|
510
|
+
"""Schema-derived methods for ``value`` channels."""
|
|
511
|
+
|
|
512
|
+
def buildIndex(
|
|
513
|
+
self,
|
|
514
|
+
value: bool,
|
|
515
|
+
) -> Self:
|
|
516
|
+
"""Return a channel with ``buildIndex`` updated."""
|
|
517
|
+
return self._with_property("buildIndex", value) # type: ignore[attr-defined, no-any-return]
|
|
518
|
+
|
|
519
|
+
def condition(
|
|
520
|
+
self,
|
|
521
|
+
value: Any,
|
|
522
|
+
) -> Self:
|
|
523
|
+
"""Return a channel with ``condition`` updated."""
|
|
524
|
+
return self._with_property("condition", value) # type: ignore[attr-defined, no-any-return]
|
|
525
|
+
|
|
526
|
+
def description(
|
|
527
|
+
self,
|
|
528
|
+
value: str,
|
|
529
|
+
) -> Self:
|
|
530
|
+
"""Return a channel with ``description`` updated."""
|
|
531
|
+
return self._with_property("description", value) # type: ignore[attr-defined, no-any-return]
|
|
532
|
+
|
|
533
|
+
def title(
|
|
534
|
+
self,
|
|
535
|
+
value: str | None,
|
|
536
|
+
) -> Self:
|
|
537
|
+
"""Return a channel with ``title`` updated."""
|
|
538
|
+
return self._with_property("title", value) # type: ignore[attr-defined, no-any-return]
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
class LocusChannelMethodMixin:
|
|
542
|
+
"""Schema-derived nested setters for locus channels."""
|
|
543
|
+
|
|
544
|
+
def axis(
|
|
545
|
+
self,
|
|
546
|
+
value: core.GenomeAxis | GenomeAxisKwds | None | object = Undefined,
|
|
547
|
+
/,
|
|
548
|
+
*,
|
|
549
|
+
chromGrid: bool | UndefinedType = Undefined,
|
|
550
|
+
chromGridCap: Literal["butt", "round", "square"] | UndefinedType = Undefined,
|
|
551
|
+
chromGridColor: str | UndefinedType = Undefined,
|
|
552
|
+
chromGridDash: Sequence[float] | UndefinedType = Undefined,
|
|
553
|
+
chromGridDashOffset: float | UndefinedType = Undefined,
|
|
554
|
+
chromGridFillEven: str | UndefinedType = Undefined,
|
|
555
|
+
chromGridFillOdd: str | UndefinedType = Undefined,
|
|
556
|
+
chromGridOpacity: float | UndefinedType = Undefined,
|
|
557
|
+
chromGridWidth: float | UndefinedType = Undefined,
|
|
558
|
+
chromLabelAlign: Align_T | UndefinedType = Undefined,
|
|
559
|
+
chromLabelColor: str | UndefinedType = Undefined,
|
|
560
|
+
chromLabelFont: str | UndefinedType = Undefined,
|
|
561
|
+
chromLabelFontSize: float | UndefinedType = Undefined,
|
|
562
|
+
chromLabelFontStyle: FontStyle_T | UndefinedType = Undefined,
|
|
563
|
+
chromLabelFontWeight: FontWeight_T | UndefinedType = Undefined,
|
|
564
|
+
chromLabelPadding: float | UndefinedType = Undefined,
|
|
565
|
+
chromLabels: bool | UndefinedType = Undefined,
|
|
566
|
+
chromTickColor: str | UndefinedType = Undefined,
|
|
567
|
+
chromTickDash: Sequence[float] | UndefinedType = Undefined,
|
|
568
|
+
chromTickDashOffset: float | UndefinedType = Undefined,
|
|
569
|
+
chromTickSize: float | UndefinedType = Undefined,
|
|
570
|
+
chromTickWidth: float | UndefinedType = Undefined,
|
|
571
|
+
chromTicks: bool | UndefinedType = Undefined,
|
|
572
|
+
domain: bool | UndefinedType = Undefined,
|
|
573
|
+
domainCap: Literal["butt", "round", "square"] | UndefinedType = Undefined,
|
|
574
|
+
domainColor: str | UndefinedType = Undefined,
|
|
575
|
+
domainDash: Sequence[float] | UndefinedType = Undefined,
|
|
576
|
+
domainDashOffset: float | UndefinedType = Undefined,
|
|
577
|
+
domainWidth: float | UndefinedType = Undefined,
|
|
578
|
+
extraValues: Sequence[float] | UndefinedType = Undefined,
|
|
579
|
+
format: str | UndefinedType = Undefined,
|
|
580
|
+
grid: bool | UndefinedType = Undefined,
|
|
581
|
+
gridCap: Literal["butt", "round", "square"] | UndefinedType = Undefined,
|
|
582
|
+
gridColor: str | UndefinedType = Undefined,
|
|
583
|
+
gridDash: Sequence[float] | UndefinedType = Undefined,
|
|
584
|
+
gridDashOffset: float | UndefinedType = Undefined,
|
|
585
|
+
gridOpacity: float | UndefinedType = Undefined,
|
|
586
|
+
gridWidth: float | UndefinedType = Undefined,
|
|
587
|
+
labelAlign: Align_T | UndefinedType = Undefined,
|
|
588
|
+
labelAngle: float | UndefinedType = Undefined,
|
|
589
|
+
labelBaseline: Baseline_T | UndefinedType = Undefined,
|
|
590
|
+
labelColor: str | UndefinedType = Undefined,
|
|
591
|
+
labelFlush: bool | float | UndefinedType = Undefined,
|
|
592
|
+
labelFlushOffset: float | UndefinedType = Undefined,
|
|
593
|
+
labelFont: str | UndefinedType = Undefined,
|
|
594
|
+
labelFontSize: float | UndefinedType = Undefined,
|
|
595
|
+
labelFontStyle: FontStyle_T | UndefinedType = Undefined,
|
|
596
|
+
labelFontWeight: FontWeight_T | UndefinedType = Undefined,
|
|
597
|
+
labelLimit: float | UndefinedType = Undefined,
|
|
598
|
+
labelOverlap: bool
|
|
599
|
+
| Literal["parity"]
|
|
600
|
+
| Literal["greedy"]
|
|
601
|
+
| UndefinedType = Undefined,
|
|
602
|
+
labelPadding: float | UndefinedType = Undefined,
|
|
603
|
+
labelSeparation: float | UndefinedType = Undefined,
|
|
604
|
+
labels: bool | UndefinedType = Undefined,
|
|
605
|
+
maxExtent: float | UndefinedType = Undefined,
|
|
606
|
+
minExtent: float | UndefinedType = Undefined,
|
|
607
|
+
offset: float | UndefinedType = Undefined,
|
|
608
|
+
orient: AxisOrient_T | UndefinedType = Undefined,
|
|
609
|
+
placement: AxisPlacement_T | UndefinedType = Undefined,
|
|
610
|
+
style: str | Sequence[str] | None | UndefinedType = Undefined,
|
|
611
|
+
tickCap: Literal["butt", "round", "square"] | UndefinedType = Undefined,
|
|
612
|
+
tickColor: str | UndefinedType = Undefined,
|
|
613
|
+
tickCount: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
614
|
+
tickDash: Sequence[float] | UndefinedType = Undefined,
|
|
615
|
+
tickDashOffset: float | UndefinedType = Undefined,
|
|
616
|
+
tickMinStep: float | UndefinedType = Undefined,
|
|
617
|
+
tickSize: float | UndefinedType = Undefined,
|
|
618
|
+
tickWidth: float | UndefinedType = Undefined,
|
|
619
|
+
ticks: bool | UndefinedType = Undefined,
|
|
620
|
+
title: str | None | UndefinedType = Undefined,
|
|
621
|
+
titleColor: str | UndefinedType = Undefined,
|
|
622
|
+
titleFit: Literal["point", "range"] | UndefinedType = Undefined,
|
|
623
|
+
titleFont: str | UndefinedType = Undefined,
|
|
624
|
+
titleFontSize: float | UndefinedType = Undefined,
|
|
625
|
+
titleFontStyle: FontStyle_T | UndefinedType = Undefined,
|
|
626
|
+
titleFontWeight: FontWeight_T | UndefinedType = Undefined,
|
|
627
|
+
titleOpacity: float | UndefinedType = Undefined,
|
|
628
|
+
titlePadding: float | UndefinedType = Undefined,
|
|
629
|
+
values: Sequence[Any] | UndefinedType = Undefined,
|
|
630
|
+
zindex: float | UndefinedType = Undefined,
|
|
631
|
+
) -> Self:
|
|
632
|
+
"""Return a locus channel with an axis configuration.
|
|
633
|
+
|
|
634
|
+
Args:
|
|
635
|
+
chromGrid (bool): A boolean flag indicating if chromosome grid lines should be included as part of the axis. __Default value:__ ``false``
|
|
636
|
+
chromGridCap (Literal['butt', 'round', 'square']): The stroke cap for the chromosome grid line's ending style. One of ``"butt"``, ``"round"`` or ``"square"``. __Default value:__ ``"butt"``
|
|
637
|
+
chromGridColor (str): Color of grid lines. __Default value:__ ``lightgray``
|
|
638
|
+
chromGridDash (Sequence[float]): An array of alternating [stroke, space] lengths for dashed chromosome grid mark lines.
|
|
639
|
+
chromGridDashOffset (float): The pixel offset at which to start drawing with the chromosome grid mark dash array.
|
|
640
|
+
chromGridFillEven (str): Fill color of odd chromosomes. __Default value:__ (none)
|
|
641
|
+
chromGridFillOdd (str): Fill color of odd chromosomes. __Default value:__ (none)
|
|
642
|
+
chromGridOpacity (float): The opacity of the chromosome grid lines. __Default value:__ ``1``
|
|
643
|
+
chromGridWidth (float): Width of the chromosome grid lines. __Default value:__ ``1``
|
|
644
|
+
chromLabelAlign (Align_T): Horizontal text alignment of chromosome name labels. __Default value:__ ``"left"``
|
|
645
|
+
chromLabelColor (str): Text color of chromosome name labels. __Default value:__ ``"black"``
|
|
646
|
+
chromLabelFont (str): The font of chromosome name labels.
|
|
647
|
+
chromLabelFontSize (float): Font size of chromosome name labels, in pixels. __Default value:__ ``13``
|
|
648
|
+
chromLabelFontStyle (FontStyle_T): Font style of chromosome name labels. __Default value:__ ``"normal"``
|
|
649
|
+
chromLabelFontWeight (FontWeight_T): Font weight of chromosome name labels. __Default value:__ ``"normal"``
|
|
650
|
+
chromLabelPadding (float): The padding, in pixels, between chromosome boundary ticks and chromosome name labels. __Default value:__ ``7``
|
|
651
|
+
chromLabels (bool): A boolean flag indicating if chromosome name labels should be included as part of the genome axis. __Default value:__ ``true``
|
|
652
|
+
chromTickColor (str): The color of chromosome boundary ticks. __Default value:__ ``"#989898"``
|
|
653
|
+
chromTickDash (Sequence[float]): An array of alternating [stroke, space] lengths for dashed chromosome boundary ticks. __Default value:__ ``[4, 2]``
|
|
654
|
+
chromTickDashOffset (float): The pixel offset at which to start drawing with the chromosome tick dash array. __Default value:__ ``1``
|
|
655
|
+
chromTickSize (float): The size in pixels of chromosome boundary ticks. __Default value:__ ``18``
|
|
656
|
+
chromTickWidth (float): The width, in pixels, of chromosome boundary ticks. __Default value:__ ``1``
|
|
657
|
+
chromTicks (bool): A boolean flag indicating if chromosome boundary ticks should be included as part of the genome axis. __Default value:__ ``true``
|
|
658
|
+
domain (bool): A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis. __Default value:__ ``true``
|
|
659
|
+
domainCap (Literal['butt', 'round', 'square']): The stroke cap for the domain line's ending style. One of ``"butt"``, ``"round"`` or ``"square"``. __Default value:__ ``"butt"``
|
|
660
|
+
domainColor (str): Color of axis domain line. __Default value:__ ``"gray"``.
|
|
661
|
+
domainDash (Sequence[float]): An array of alternating [stroke, space] lengths for dashed domain lines.
|
|
662
|
+
domainDashOffset (float): The pixel offset at which to start drawing with the domain dash array.
|
|
663
|
+
domainWidth (float): Stroke width of axis domain line __Default value:__ ``1``
|
|
664
|
+
extraValues (Sequence[float]): Additional tick and label values to include alongside automatically generated ticks on continuous scales. Values outside the visible scale range are omitted and duplicates are removed. During automatic overlap removal, these labels are reduced against other explicitly specified labels but take precedence over automatically generated labels. This property is ignored on discrete scales and when ``values`` is set.
|
|
665
|
+
format (str): The format specifier pattern for axis labels. Must be a legal d3-format specifier.
|
|
666
|
+
grid (bool): A boolean flag indicating if grid lines should be included as part of the axis. __Default value:__ ``false``
|
|
667
|
+
gridCap (Literal['butt', 'round', 'square']): The stroke cap for the grid line's ending style. One of ``"butt"``, ``"round"`` or ``"square"``. __Default value:__ ``"butt"``
|
|
668
|
+
gridColor (str): Color of grid lines. __Default value:__ ``lightgray``
|
|
669
|
+
gridDash (Sequence[float]): An array of alternating [stroke, space] lengths for dashed grid mark lines.
|
|
670
|
+
gridDashOffset (float): The pixel offset at which to start drawing with the grid mark dash array.
|
|
671
|
+
gridOpacity (float): The opacity of the grid lines. __Default value:__ ``1``
|
|
672
|
+
gridWidth (float): Width of the grid lines. __Default value:__ ``1``
|
|
673
|
+
labelAlign (Align_T): Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation.
|
|
674
|
+
labelAngle (float): The rotation angle of the axis labels. __Default value:__ ``-90`` for nominal and ordinal fields; ``0`` otherwise.
|
|
675
|
+
labelBaseline (Baseline_T): Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. One of ``"alphabetic"`` (default), ``"top"``, ``"middle"``, ``"bottom"``.
|
|
676
|
+
labelColor (str): The color of the tick label, can be in hex color code or regular color name.
|
|
677
|
+
labelFlush (bool | float): Indicates whether labels near the beginning or end of the axis should be aligned flush with the scale range. A number specifies the endpoint distance threshold in pixels. ``true`` uses a threshold of one pixel. Flushing is supported for quantitative, index, and locus axes. By default, it is enabled for non-zoomable x axes of these types. On a zoomable x axis with a configured bounded zoom extent, ticks matching the extent boundaries are flushed while they remain visible. Other zoomable ticks and y-axis ticks are not flushed by default. Flushing supports label angles that are multiples of 90 degrees. The automatic behavior is disabled at other angles.
|
|
678
|
+
labelFlushOffset (float): The number of pixels by which to move flush-adjusted labels outward from the axis range. __Default value:__ ``0``
|
|
679
|
+
labelFont (str): The font of the tick label.
|
|
680
|
+
labelFontSize (float): The font size of the label, in pixels.
|
|
681
|
+
labelFontStyle (FontStyle_T): Font style of the title.
|
|
682
|
+
labelFontWeight (FontWeight_T): Font weight of axis tick labels.
|
|
683
|
+
labelLimit (float): Maximum allowed pixel width of axis tick labels. __Default value:__ ``180``
|
|
684
|
+
labelOverlap (bool | Literal['parity'] | Literal['greedy']): The strategy for removing overlapping axis labels. ``true`` uses the ``"parity"`` strategy. ``"parity"`` removes every other label until the remaining labels no longer overlap. ``"greedy"`` keeps each label that does not overlap the previously retained label. ``false`` disables overlap removal. By default, overlap removal uses ``"parity"`` for linear-like continuous scales and ``"greedy"`` for logarithmic and symlog scales. It is disabled for discrete scales. Overlap removal supports label angles that are multiples of 90 degrees. The automatic behavior is disabled at other angles.
|
|
685
|
+
labelPadding (float): The padding, in pixels, between axis and text labels. __Default value:__ ``2``
|
|
686
|
+
labelSeparation (float): The minimum separation, in pixels, between retained axis labels. __Default value:__ ``2``
|
|
687
|
+
labels (bool): A boolean flag indicating if labels should be included as part of the axis. __Default value:__ ``true``.
|
|
688
|
+
maxExtent (float): The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles. __Default value:__ ``undefined``.
|
|
689
|
+
minExtent (float): The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles. __Default value:__ ``30`` for y-axis; ``undefined`` for x-axis.
|
|
690
|
+
offset (float): The orthogonal offset in pixels by which to displace the axis from its position along the edge of the chart.
|
|
691
|
+
orient (AxisOrient_T): The orientation of the axis. One of ``"top"``, ``"bottom"``, ``"left"`` or ``"right"``. The orientation can be used to further specialize the axis type (e.g., a y axis oriented for the right edge of the chart). __Default value:__ ``"bottom"`` for x-axes and ``"left"`` for y-axes.
|
|
692
|
+
placement (AxisPlacement_T): Placement of the axis relative to the plotting area. Outside axes reserve layout space outside the plot. Inside axes are mirrored into the plot and do not reserve external layout space. __Default value:__ ``"outside"``.
|
|
693
|
+
style (str | Sequence[str] | None): Named style reference(s) resolved from ``config.style``. If an array is provided, later styles override earlier ones. Set to ``null`` to reset inherited axis styles.
|
|
694
|
+
tickCap (Literal['butt', 'round', 'square']): The stroke cap for the tick lines' ending style. One of ``"butt"``, ``"round"`` or ``"square"``. __Default value:__ ``"butt"``
|
|
695
|
+
tickColor (str): The color of the axis's tick. __Default value:__ ``"gray"``
|
|
696
|
+
tickCount (float | ExprRef | dict[str, Any]): A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are "nice" (multiples of ``2``, ``5``, ``10``) and lie within the underlying scale's range. An expression reference can use ``axisLength`` for the current length of the axis in pixels. For example, ``{ "expr": "ceil(axisLength / 40)" }`` requests one tick per 40 pixels. __Default value:__ an expression based on ``axisLength``
|
|
697
|
+
tickDash (Sequence[float]): An array of alternating [stroke, space] lengths for dashed tick mark lines.
|
|
698
|
+
tickDashOffset (float): The pixel offset at which to start drawing with the tick mark dash array.
|
|
699
|
+
tickMinStep (float): The minimum desired step between axis ticks, in terms of scale domain values. For example, a value of ``1`` indicates that ticks should not be less than 1 unit apart. If ``tickMinStep`` is specified, the ``tickCount`` value will be adjusted, if necessary, to enforce the minimum step value.
|
|
700
|
+
tickSize (float): The size in pixels of axis ticks. __Default value:__ ``5``
|
|
701
|
+
tickWidth (float): The width, in pixels, of ticks. __Default value:__ ``1``
|
|
702
|
+
ticks (bool): Boolean value that determines whether the axis should include ticks. __Default value:__ ``true``
|
|
703
|
+
title (str | None): A title for the axis. By default, the title is derived from the encoding title, field, or expression. Set to ``null`` to remove it.
|
|
704
|
+
titleColor (str): Color of the title, can be in hex color code or regular color name.
|
|
705
|
+
titleFit (Literal['point', 'range']): Fitting mode for the axis title. ``"point"`` anchors the title at the center of the axis without constraining its length. ``"range"`` constrains the title to the axis span using ranged text, allowing it to be squeezed to fit and kept visible inside scrollable viewports. __Default value:__ ``"point"``
|
|
706
|
+
titleFont (str): Font of the title. (e.g., ``"Helvetica Neue"``).
|
|
707
|
+
titleFontSize (float): Font size of the title.
|
|
708
|
+
titleFontStyle (FontStyle_T): Font style of the title.
|
|
709
|
+
titleFontWeight (FontWeight_T): Font weight of the title. This can be either a string (e.g ``"bold"``, ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``).
|
|
710
|
+
titleOpacity (float): Opacity of the axis title.
|
|
711
|
+
titlePadding (float): The padding, in pixels, between title and axis.
|
|
712
|
+
values (Sequence[Any]): Explicitly set the visible axis tick and label values. During automatic overlap removal, these labels are reduced against each other but take precedence over automatically generated labels.
|
|
713
|
+
zindex (float): Z-order of the axis relative to the view content. Values greater than ``0`` render after the view marks. Values less than or equal to ``0`` render before the marks. __Default value:__ ``0``, or ``10`` when the view content is clipped or scrollable.
|
|
714
|
+
"""
|
|
715
|
+
defined = {
|
|
716
|
+
"chromGrid": chromGrid,
|
|
717
|
+
"chromGridCap": chromGridCap,
|
|
718
|
+
"chromGridColor": chromGridColor,
|
|
719
|
+
"chromGridDash": chromGridDash,
|
|
720
|
+
"chromGridDashOffset": chromGridDashOffset,
|
|
721
|
+
"chromGridFillEven": chromGridFillEven,
|
|
722
|
+
"chromGridFillOdd": chromGridFillOdd,
|
|
723
|
+
"chromGridOpacity": chromGridOpacity,
|
|
724
|
+
"chromGridWidth": chromGridWidth,
|
|
725
|
+
"chromLabelAlign": chromLabelAlign,
|
|
726
|
+
"chromLabelColor": chromLabelColor,
|
|
727
|
+
"chromLabelFont": chromLabelFont,
|
|
728
|
+
"chromLabelFontSize": chromLabelFontSize,
|
|
729
|
+
"chromLabelFontStyle": chromLabelFontStyle,
|
|
730
|
+
"chromLabelFontWeight": chromLabelFontWeight,
|
|
731
|
+
"chromLabelPadding": chromLabelPadding,
|
|
732
|
+
"chromLabels": chromLabels,
|
|
733
|
+
"chromTickColor": chromTickColor,
|
|
734
|
+
"chromTickDash": chromTickDash,
|
|
735
|
+
"chromTickDashOffset": chromTickDashOffset,
|
|
736
|
+
"chromTickSize": chromTickSize,
|
|
737
|
+
"chromTickWidth": chromTickWidth,
|
|
738
|
+
"chromTicks": chromTicks,
|
|
739
|
+
"domain": domain,
|
|
740
|
+
"domainCap": domainCap,
|
|
741
|
+
"domainColor": domainColor,
|
|
742
|
+
"domainDash": domainDash,
|
|
743
|
+
"domainDashOffset": domainDashOffset,
|
|
744
|
+
"domainWidth": domainWidth,
|
|
745
|
+
"extraValues": extraValues,
|
|
746
|
+
"format": format,
|
|
747
|
+
"grid": grid,
|
|
748
|
+
"gridCap": gridCap,
|
|
749
|
+
"gridColor": gridColor,
|
|
750
|
+
"gridDash": gridDash,
|
|
751
|
+
"gridDashOffset": gridDashOffset,
|
|
752
|
+
"gridOpacity": gridOpacity,
|
|
753
|
+
"gridWidth": gridWidth,
|
|
754
|
+
"labelAlign": labelAlign,
|
|
755
|
+
"labelAngle": labelAngle,
|
|
756
|
+
"labelBaseline": labelBaseline,
|
|
757
|
+
"labelColor": labelColor,
|
|
758
|
+
"labelFlush": labelFlush,
|
|
759
|
+
"labelFlushOffset": labelFlushOffset,
|
|
760
|
+
"labelFont": labelFont,
|
|
761
|
+
"labelFontSize": labelFontSize,
|
|
762
|
+
"labelFontStyle": labelFontStyle,
|
|
763
|
+
"labelFontWeight": labelFontWeight,
|
|
764
|
+
"labelLimit": labelLimit,
|
|
765
|
+
"labelOverlap": labelOverlap,
|
|
766
|
+
"labelPadding": labelPadding,
|
|
767
|
+
"labelSeparation": labelSeparation,
|
|
768
|
+
"labels": labels,
|
|
769
|
+
"maxExtent": maxExtent,
|
|
770
|
+
"minExtent": minExtent,
|
|
771
|
+
"offset": offset,
|
|
772
|
+
"orient": orient,
|
|
773
|
+
"placement": placement,
|
|
774
|
+
"style": style,
|
|
775
|
+
"tickCap": tickCap,
|
|
776
|
+
"tickColor": tickColor,
|
|
777
|
+
"tickCount": tickCount,
|
|
778
|
+
"tickDash": tickDash,
|
|
779
|
+
"tickDashOffset": tickDashOffset,
|
|
780
|
+
"tickMinStep": tickMinStep,
|
|
781
|
+
"tickSize": tickSize,
|
|
782
|
+
"tickWidth": tickWidth,
|
|
783
|
+
"ticks": ticks,
|
|
784
|
+
"title": title,
|
|
785
|
+
"titleColor": titleColor,
|
|
786
|
+
"titleFit": titleFit,
|
|
787
|
+
"titleFont": titleFont,
|
|
788
|
+
"titleFontSize": titleFontSize,
|
|
789
|
+
"titleFontStyle": titleFontStyle,
|
|
790
|
+
"titleFontWeight": titleFontWeight,
|
|
791
|
+
"titleOpacity": titleOpacity,
|
|
792
|
+
"titlePadding": titlePadding,
|
|
793
|
+
"values": values,
|
|
794
|
+
"zindex": zindex,
|
|
795
|
+
}
|
|
796
|
+
defined = {key: item for key, item in defined.items() if item is not Undefined}
|
|
797
|
+
return self._with_nested("axis", value, **defined) # type: ignore[attr-defined, no-any-return]
|
|
798
|
+
|
|
799
|
+
def scale(
|
|
800
|
+
self,
|
|
801
|
+
value: core.Scale | ScaleKwds | None | object = Undefined,
|
|
802
|
+
/,
|
|
803
|
+
*,
|
|
804
|
+
align: float | UndefinedType = Undefined,
|
|
805
|
+
assembly: str
|
|
806
|
+
| core.UrlGenomeDefinition
|
|
807
|
+
| dict[str, Any]
|
|
808
|
+
| core.InlineGenomeDefinition
|
|
809
|
+
| UndefinedType = Undefined,
|
|
810
|
+
base: float | UndefinedType = Undefined,
|
|
811
|
+
bins: Sequence[float] | UndefinedType = Undefined,
|
|
812
|
+
clamp: bool | UndefinedType = Undefined,
|
|
813
|
+
constant: float | UndefinedType = Undefined,
|
|
814
|
+
domain: ScalarDomain_T
|
|
815
|
+
| Sequence[core.ChromosomalLocus | dict[str, Any]]
|
|
816
|
+
| core.SelectionDomainRef
|
|
817
|
+
| dict[str, Any]
|
|
818
|
+
| core.ViewportDomainRef
|
|
819
|
+
| core.ExprRef
|
|
820
|
+
| Sequence[float | str | bool | core.ExprRef | dict[str, Any]]
|
|
821
|
+
| UndefinedType = Undefined,
|
|
822
|
+
domainMax: float | UndefinedType = Undefined,
|
|
823
|
+
domainMid: float | UndefinedType = Undefined,
|
|
824
|
+
domainMin: float | UndefinedType = Undefined,
|
|
825
|
+
domainTransition: bool | UndefinedType = Undefined,
|
|
826
|
+
exponent: float | UndefinedType = Undefined,
|
|
827
|
+
interpolate: ScaleInterpolate_T
|
|
828
|
+
| core.ScaleInterpolateParams
|
|
829
|
+
| ScaleInterpolateParamsKwds
|
|
830
|
+
| UndefinedType = Undefined,
|
|
831
|
+
name: str | UndefinedType = Undefined,
|
|
832
|
+
nice: bool | float | dict[str, Any] | UndefinedType = Undefined,
|
|
833
|
+
numberingOffset: float | UndefinedType = Undefined,
|
|
834
|
+
padding: float | UndefinedType = Undefined,
|
|
835
|
+
paddingInner: float | UndefinedType = Undefined,
|
|
836
|
+
paddingOuter: float | UndefinedType = Undefined,
|
|
837
|
+
range: Sequence[float | str | core.ExprRef | dict[str, Any]]
|
|
838
|
+
| str
|
|
839
|
+
| UndefinedType = Undefined,
|
|
840
|
+
reverse: bool | UndefinedType = Undefined,
|
|
841
|
+
round: bool | UndefinedType = Undefined,
|
|
842
|
+
scheme: str | core.SchemeParams | SchemeParamsKwds | UndefinedType = Undefined,
|
|
843
|
+
type: ScaleType_T | UndefinedType = Undefined,
|
|
844
|
+
zero: bool | UndefinedType = Undefined,
|
|
845
|
+
zoom: bool | core.ZoomParams | ZoomParamsKwds | UndefinedType = Undefined,
|
|
846
|
+
) -> Self:
|
|
847
|
+
"""Return a locus channel with a scale configuration.
|
|
848
|
+
|
|
849
|
+
Args:
|
|
850
|
+
align (float): The alignment of the steps within the scale range. This value must lie in the range ``[0,1]``. A value of ``0.5`` indicates that the steps should be centered within the range. A value of ``0`` or ``1`` may be used to shift the bands to one side, say to position them adjacent to an axis. __Default value:__ ``0.5``
|
|
851
|
+
assembly (str | UrlGenomeDefinition | dict[str, Any] | InlineGenomeDefinition): Genome assembly definition for locus scales. This can be: - A string reference to a named assembly (built-in or root-configured). - An inline anonymous assembly that defines either ``contigs`` or ``url``. If undefined, the default genome from the genome store is used.
|
|
852
|
+
base (float): The logarithm base of the ``log`` scale (default ``10``).
|
|
853
|
+
bins (Sequence[float]): An array of bin boundaries over the scale domain. If provided, axes and legends will use the bin boundaries to inform the choice of tick marks and text labels.
|
|
854
|
+
clamp (bool): If ``true``, values that exceed the data domain are clamped to either the minimum or maximum range value __Default value:__ derived from the Vega-Lite scale config's ``clamp`` (``true`` by default).
|
|
855
|
+
constant (float): A constant determining the slope of the symlog function around zero. Only used for ``symlog`` scales. __Default value:__ ``1``
|
|
856
|
+
domain (ScalarDomain_T | Sequence[ChromosomalLocus | dict[str, Any]] | SelectionDomainRef | dict[str, Any] | ViewportDomainRef | ExprRef | Sequence[float | str | bool | ExprRef | dict[str, Any]]): Customized domain values. For quantitative fields, ``domain`` can take the form of a two-element array with minimum and maximum values. Vega-Lite piecewise scales can be created by providing a ``domain`` with more than two entries. For ordinal and nominal fields, ``domain`` can be an array that lists valid input values. The domain can also be defined by an expression reference that evaluates to the domain array. Array elements may also be expression references. All parameter names referenced by a scale, including selection-domain parameters, resolve from the view that owns the scale resolution. For a shared scale, declare controlling parameters on that owning composed view or an ancestor.
|
|
857
|
+
domainMax (float): Sets the maximum value in the scale domain, overriding the ``domain`` property. This property is only intended for use with scales having continuous domains.
|
|
858
|
+
domainMid (float): Inserts a single mid-point value into a two-element domain. The mid-point value must lie between the domain minimum and maximum values. This property can be useful for setting a midpoint for Vega-Lite diverging color scales. The domainMid property is only intended for use with scales supporting continuous, piecewise domains.
|
|
859
|
+
domainMin (float): Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains.
|
|
860
|
+
domainTransition (bool): Controls whether domain updates are applied immediately or with a smooth transition. Set this to ``false`` to apply domain updates immediately. The default is ``true``, except for domains that include ``ExprRef``s, which default to ``false`` unless overridden. __Default value:__ ``true``, except ``false`` for ``ExprRef``-driven domains.
|
|
861
|
+
exponent (float): The exponent of the ``pow`` scale.
|
|
862
|
+
interpolate (ScaleInterpolate_T | ScaleInterpolateParams | ScaleInterpolateParamsKwds): The interpolation method for range values. By default, a general interpolator for numbers, dates, strings and colors (in HCL space) is used. For color ranges, this property allows interpolation in alternative color spaces. Legal values include ``rgb``, ``hsl``, ``hsl-long``, ``lab``, ``hcl``, ``hcl-long``, ``cubehelix`` and ``cubehelix-long`` ('-long' variants use longer paths in polar coordinate spaces). If object-valued, this property accepts an object with a string-valued type property and an optional numeric gamma property applicable to rgb and cubehelix interpolators. For more, see the d3-interpolate documentation. __Default value:__ ``hcl``
|
|
863
|
+
name (str): The name of the scale. Names are optional but allow the scales to be referenced and found with the API.
|
|
864
|
+
nice (bool | float | dict[str, Any]): Extending the domain so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. Nicing is useful if the domain is computed from data and may be irregular. For example, for a domain of [0.201479…, 0.996679…], a nice domain might be [0.2, 1.0]. For quantitative scales such as linear, ``nice`` can be either a boolean flag or a number. If ``nice`` is a number, it will represent a desired tick count. This allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain. __Default value:__ ``true`` for unbinned quantitative fields; ``false`` otherwise.
|
|
865
|
+
numberingOffset (float): The offset added to data values when formatting tick labels on index and locus scales. This property does not transform data values. __Default value:__ ``0``
|
|
866
|
+
padding (float): For Vega-Lite continuous scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the ``zero``, ``nice``, ``domainMin``, and ``domainMax`` properties. For Vega-Lite band scales, shortcut for setting ``paddingInner`` and ``paddingOuter`` to the same value. For Vega-Lite point scales, alias for ``paddingOuter``. __Default value:__ For continuous scales, derived from the Vega-Lite scale config's ``continuousPadding``. For band and point scales, see ``paddingInner`` and ``paddingOuter``. By default, Vega-Lite sets padding such that width/height = number of unique values * step.
|
|
867
|
+
paddingInner (float): The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1]. For point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands). __Default value:__ derived from the Vega-Lite scale config's ``bandPaddingInner``.
|
|
868
|
+
paddingOuter (float): The outer padding (spacing) at the ends of the range of band and point scales, as a fraction of the step size. This value must lie in the range [0,1]. __Default value:__ derived from the Vega-Lite scale config's ``bandPaddingOuter`` for band scales and ``pointPadding`` for point scales. By default, Vega-Lite sets outer padding such that width/height = number of unique values * step.
|
|
869
|
+
range (Sequence[float | str | ExprRef | dict[str, Any]] | str): The range of the scale. One of: - A string indicating a pre-defined named scale range from Vega-Lite (e.g., example, ``"symbol"``, or ``"diverging"``). - For Vega-Lite continuous scales, two-element array indicating minimum and maximum values, or an array with more than two entries for specifying a Vega-Lite piecewise scale. Array elements may also be expression references, which use the parameter scope of the view that owns the scale resolution. - For Vega-Lite discrete and Vega-Lite discretizing scales, an array of desired output values. Array elements may also be expression references, which use the parameter scope of the view that owns the scale resolution. __Notes:__ 1) For color scales you can also specify a color ``scheme`` instead of ``range``. 2) Any directly specified ``range`` for ``x`` and ``y`` channels will be ignored. Range can be customized via the view's corresponding Vega-Lite size (``width`` and ``height``).
|
|
870
|
+
reverse (bool): If true, reverses the order of the scale range. __Default value:__ ``false``.
|
|
871
|
+
round (bool): If ``true``, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. __Default value:__ ``false``.
|
|
872
|
+
scheme (str | SchemeParams | SchemeParamsKwds): A string indicating a color Vega-Lite scheme name (e.g., ``"category10"`` or ``"blues"``) or a Vega-Lite scheme parameter object. Discrete color schemes may be used with Vega-Lite discrete or Vega-Lite discretizing scales. Continuous color schemes are intended for use with color scales. For the full list of supported schemes, please refer to the Vega Scheme reference.
|
|
873
|
+
type (ScaleType_T): The type of scale. GenomeSpy follows the Vega-Lite scale model; the links below refer to the Vega-Lite documentation: 1) **Continuous Scales** -- mapping continuous domains to continuous output ranges (``"linear"``, ``"pow"``, ``"sqrt"``, ``"symlog"``, ``"log"``, ``"time"``, ``"utc"``). 2) **Discrete Scales** -- mapping discrete domains to discrete (``"ordinal"``) or continuous (``"band"`` and ``"point"``) output ranges. 3) **Discretizing Scales** -- mapping continuous domains to discrete output ranges ``"bin-ordinal"``, ``"quantile"``, ``"quantize"`` and ``"threshold"``. GenomeSpy also provides index and locus scales for sequence and genomic coordinates. __Default value:__ please see the Vega-Lite scale type table.
|
|
874
|
+
zero (bool): If ``true``, ensures that a zero baseline value is included in the scale domain. __Default value:__ ``true`` for x and y channels if the quantitative field is not binned and no custom ``domain`` is provided; ``false`` otherwise. __Note:__ Log scales do not support ``zero``.
|
|
875
|
+
zoom (bool | ZoomParams | ZoomParamsKwds): If ``true`` and the scale is used on a positional channel, it can bee zoomed and translated interactively.
|
|
876
|
+
"""
|
|
877
|
+
defined = {
|
|
878
|
+
"align": align,
|
|
879
|
+
"assembly": assembly,
|
|
880
|
+
"base": base,
|
|
881
|
+
"bins": bins,
|
|
882
|
+
"clamp": clamp,
|
|
883
|
+
"constant": constant,
|
|
884
|
+
"domain": domain,
|
|
885
|
+
"domainMax": domainMax,
|
|
886
|
+
"domainMid": domainMid,
|
|
887
|
+
"domainMin": domainMin,
|
|
888
|
+
"domainTransition": domainTransition,
|
|
889
|
+
"exponent": exponent,
|
|
890
|
+
"interpolate": interpolate,
|
|
891
|
+
"name": name,
|
|
892
|
+
"nice": nice,
|
|
893
|
+
"numberingOffset": numberingOffset,
|
|
894
|
+
"padding": padding,
|
|
895
|
+
"paddingInner": paddingInner,
|
|
896
|
+
"paddingOuter": paddingOuter,
|
|
897
|
+
"range": range,
|
|
898
|
+
"reverse": reverse,
|
|
899
|
+
"round": round,
|
|
900
|
+
"scheme": scheme,
|
|
901
|
+
"type": type,
|
|
902
|
+
"zero": zero,
|
|
903
|
+
"zoom": zoom,
|
|
904
|
+
}
|
|
905
|
+
defined = {key: item for key, item in defined.items() if item is not Undefined}
|
|
906
|
+
return self._with_nested("scale", value, **defined) # type: ignore[attr-defined, no-any-return]
|
|
907
|
+
|
|
908
|
+
|
|
909
|
+
def locus(
|
|
910
|
+
chrom: FieldName_T,
|
|
911
|
+
pos: FieldName_T | None = None,
|
|
912
|
+
/,
|
|
913
|
+
*,
|
|
914
|
+
axis: core.GenomeAxis | GenomeAxisKwds | None | UndefinedType = Undefined,
|
|
915
|
+
band: float | UndefinedType = Undefined,
|
|
916
|
+
description: str | UndefinedType = Undefined,
|
|
917
|
+
domainInert: bool | UndefinedType = Undefined,
|
|
918
|
+
offset: float | UndefinedType = Undefined,
|
|
919
|
+
resolutionChannel: ChannelWithScale_T | UndefinedType = Undefined,
|
|
920
|
+
scale: core.Scale | ScaleKwds | None | UndefinedType = Undefined,
|
|
921
|
+
title: str | None | UndefinedType = Undefined,
|
|
922
|
+
) -> LocusChannel:
|
|
923
|
+
"""Create a GenomeSpy chromosomal locus channel definition.
|
|
924
|
+
|
|
925
|
+
Args:
|
|
926
|
+
axis (GenomeAxis | GenomeAxisKwds | None): An object defining properties of axis's gridlines, ticks and labels. If ``null``, the axis for the encoding channel will be removed. __Default value:__ If undefined, default axis properties are applied. __See also:__ ``axis`` documentation.
|
|
927
|
+
band (float): Relative position on band scale. For example, the marks will be positioned at the beginning of the band if set to ``0``, and at the middle of the band if set to ``0.5``.
|
|
928
|
+
description (str): A description of the encoded position. Can be used for documentation and to explain the meaning of the channel mapping.
|
|
929
|
+
domainInert (bool): Whether the field or evaluated expr should be excluded from the scale's domain. Prefer the view-level ``domainInert`` when an entire subtree should be excluded. **Default value:** ``false``
|
|
930
|
+
offset (float): An offset or offsets that allow for adjusting the numbering base. The offset is subtracted from the positions. GenomeSpy uses internally zero-based indexing with half-open intervals. UCSC-based formats (BED, etc.) generally use this scheme. However, for example, VCF files use one-based indexing and must be adjusted by setting the offset to ``1``. **Default:** ``0``
|
|
931
|
+
resolutionChannel (ChannelWithScale_T): An alternative channel for scale resolution. This is mainly for internal use and allows using ``color`` channel to resolve ``fill`` and ``stroke`` channels under certain circumstances.
|
|
932
|
+
scale (Scale | ScaleKwds | None): An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels. If ``null``, the scale will be disabled and the data value will be directly encoded. __Default value:__ If undefined, default scale properties are applied. __See also:__ ``scale`` documentation.
|
|
933
|
+
title (str | None): A title for the field. If ``null``, the title will be removed.
|
|
934
|
+
"""
|
|
935
|
+
properties = {
|
|
936
|
+
"axis": axis,
|
|
937
|
+
"band": band,
|
|
938
|
+
"description": description,
|
|
939
|
+
"domainInert": domainInert,
|
|
940
|
+
"offset": offset,
|
|
941
|
+
"resolutionChannel": resolutionChannel,
|
|
942
|
+
"scale": scale,
|
|
943
|
+
"title": title,
|
|
944
|
+
}
|
|
945
|
+
defined: dict[str, Any] = {
|
|
946
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
947
|
+
}
|
|
948
|
+
definition: dict[str, Any] = {"chrom": chrom, "type": "locus", **defined}
|
|
949
|
+
if pos is not None:
|
|
950
|
+
definition["pos"] = pos
|
|
951
|
+
from genome_spy.channels import LocusChannel
|
|
952
|
+
|
|
953
|
+
return LocusChannel(definition)
|
|
954
|
+
|
|
955
|
+
|
|
956
|
+
def Locus(
|
|
957
|
+
chrom: FieldName_T,
|
|
958
|
+
pos: FieldName_T | None = None,
|
|
959
|
+
/,
|
|
960
|
+
*,
|
|
961
|
+
axis: core.GenomeAxis | GenomeAxisKwds | None | UndefinedType = Undefined,
|
|
962
|
+
band: float | UndefinedType = Undefined,
|
|
963
|
+
description: str | UndefinedType = Undefined,
|
|
964
|
+
domainInert: bool | UndefinedType = Undefined,
|
|
965
|
+
offset: float | UndefinedType = Undefined,
|
|
966
|
+
resolutionChannel: ChannelWithScale_T | UndefinedType = Undefined,
|
|
967
|
+
scale: core.Scale | ScaleKwds | None | UndefinedType = Undefined,
|
|
968
|
+
title: str | None | UndefinedType = Undefined,
|
|
969
|
+
) -> LocusChannel:
|
|
970
|
+
"""Create a GenomeSpy chromosomal locus channel definition.
|
|
971
|
+
|
|
972
|
+
Args:
|
|
973
|
+
axis (GenomeAxis | GenomeAxisKwds | None): An object defining properties of axis's gridlines, ticks and labels. If ``null``, the axis for the encoding channel will be removed. __Default value:__ If undefined, default axis properties are applied. __See also:__ ``axis`` documentation.
|
|
974
|
+
band (float): Relative position on band scale. For example, the marks will be positioned at the beginning of the band if set to ``0``, and at the middle of the band if set to ``0.5``.
|
|
975
|
+
description (str): A description of the encoded position. Can be used for documentation and to explain the meaning of the channel mapping.
|
|
976
|
+
domainInert (bool): Whether the field or evaluated expr should be excluded from the scale's domain. Prefer the view-level ``domainInert`` when an entire subtree should be excluded. **Default value:** ``false``
|
|
977
|
+
offset (float): An offset or offsets that allow for adjusting the numbering base. The offset is subtracted from the positions. GenomeSpy uses internally zero-based indexing with half-open intervals. UCSC-based formats (BED, etc.) generally use this scheme. However, for example, VCF files use one-based indexing and must be adjusted by setting the offset to ``1``. **Default:** ``0``
|
|
978
|
+
resolutionChannel (ChannelWithScale_T): An alternative channel for scale resolution. This is mainly for internal use and allows using ``color`` channel to resolve ``fill`` and ``stroke`` channels under certain circumstances.
|
|
979
|
+
scale (Scale | ScaleKwds | None): An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels. If ``null``, the scale will be disabled and the data value will be directly encoded. __Default value:__ If undefined, default scale properties are applied. __See also:__ ``scale`` documentation.
|
|
980
|
+
title (str | None): A title for the field. If ``null``, the title will be removed.
|
|
981
|
+
"""
|
|
982
|
+
properties = {
|
|
983
|
+
"axis": axis,
|
|
984
|
+
"band": band,
|
|
985
|
+
"description": description,
|
|
986
|
+
"domainInert": domainInert,
|
|
987
|
+
"offset": offset,
|
|
988
|
+
"resolutionChannel": resolutionChannel,
|
|
989
|
+
"scale": scale,
|
|
990
|
+
"title": title,
|
|
991
|
+
}
|
|
992
|
+
defined: dict[str, Any] = {
|
|
993
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
994
|
+
}
|
|
995
|
+
definition: dict[str, Any] = {"chrom": chrom, "type": "locus", **defined}
|
|
996
|
+
if pos is not None:
|
|
997
|
+
definition["pos"] = pos
|
|
998
|
+
from genome_spy.channels import LocusChannel
|
|
999
|
+
|
|
1000
|
+
return LocusChannel(definition)
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
def compare(
|
|
1004
|
+
field: Sequence[Field_T] | Field_T | None = None,
|
|
1005
|
+
*,
|
|
1006
|
+
order: Sequence[SortOrder_T] | SortOrder_T | None = None,
|
|
1007
|
+
) -> core.CompareParams:
|
|
1008
|
+
"""Create a sort/compare definition.
|
|
1009
|
+
|
|
1010
|
+
Args:
|
|
1011
|
+
field (Sequence[Field_T] | Field_T): The field(s) to sort by
|
|
1012
|
+
order (Sequence[SortOrder_T] | SortOrder_T): The order(s) to use: ``"ascending"`` (default), ``"descending"``.
|
|
1013
|
+
"""
|
|
1014
|
+
properties = {"field": field, "order": order}
|
|
1015
|
+
defined: dict[str, Any] = {
|
|
1016
|
+
key: value for key, value in properties.items() if value is not None
|
|
1017
|
+
}
|
|
1018
|
+
return core.CompareParams(**defined)
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
class DatumType(DatumExpression):
|
|
1022
|
+
"""Build datum expressions or constant-datum channels."""
|
|
1023
|
+
|
|
1024
|
+
def __call__(
|
|
1025
|
+
self,
|
|
1026
|
+
datum: Scalar_T | core.ExprRef | dict[str, Any],
|
|
1027
|
+
/,
|
|
1028
|
+
*,
|
|
1029
|
+
axis: core.GenomeAxis | GenomeAxisKwds | None | UndefinedType = Undefined,
|
|
1030
|
+
band: float | UndefinedType = Undefined,
|
|
1031
|
+
buildIndex: bool | UndefinedType = Undefined,
|
|
1032
|
+
condition: Any | UndefinedType = Undefined,
|
|
1033
|
+
description: str | UndefinedType = Undefined,
|
|
1034
|
+
domainInert: bool | UndefinedType = Undefined,
|
|
1035
|
+
format: str | UndefinedType = Undefined,
|
|
1036
|
+
resolutionChannel: ChannelWithScale_T | UndefinedType = Undefined,
|
|
1037
|
+
scale: core.Scale | ScaleKwds | None | UndefinedType = Undefined,
|
|
1038
|
+
title: str | None | UndefinedType = Undefined,
|
|
1039
|
+
type: Type_T | UndefinedType = Undefined,
|
|
1040
|
+
) -> DatumChannel:
|
|
1041
|
+
"""Create a constant-datum encoding channel.
|
|
1042
|
+
|
|
1043
|
+
Args:
|
|
1044
|
+
axis (GenomeAxis | GenomeAxisKwds | None): An object defining properties of axis's gridlines, ticks and labels. If ``null``, the axis for the encoding channel will be removed. __Default value:__ If undefined, default axis properties are applied. __See also:__ ``axis`` documentation.
|
|
1045
|
+
band (float): Relative position on band scale. For example, the marks will be positioned at the beginning of the band if set to ``0``, and at the middle of the band if set to ``0.5``.
|
|
1046
|
+
buildIndex (bool): Builds and index for efficient rendering of subsets of the data. This setting is useful when rendering large amounts of data and often only a small subset of the data is visible. An example of such a situation is a scatter plot spanning the whole genome. This setting implicitly sorts the data by the field assigned on the ``x`` channel.
|
|
1047
|
+
condition (Any): One or more value definition(s) with a parameter. __Note:__ A field definition's ``condition`` property can only contain conditional value definitions since GenomeSpy only allows at most one encoded field per encoding channel.
|
|
1048
|
+
datum (Scalar_T | ExprRef | dict[str, Any]): A constant value in data domain.
|
|
1049
|
+
description (str): A description of the encoded datum. Can be used for documentation and to explain the meaning of the channel mapping.
|
|
1050
|
+
domainInert (bool): Whether the field or evaluated expr should be excluded from the scale's domain. Prefer the view-level ``domainInert`` when an entire subtree should be excluded. **Default value:** ``false``
|
|
1051
|
+
format (str): When used with the default ``"number"`` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks. - If the format type is ``"number"`` (e.g., for quantitative fields), this is D3's number format pattern. See the Vega-Lite format documentation for more examples.
|
|
1052
|
+
resolutionChannel (ChannelWithScale_T): An alternative channel for scale resolution. This is mainly for internal use and allows using ``color`` channel to resolve ``fill`` and ``stroke`` channels under certain circumstances.
|
|
1053
|
+
scale (Scale | ScaleKwds | None): An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels. If ``null``, the scale will be disabled and the data value will be directly encoded. __Default value:__ If undefined, default scale properties are applied. __See also:__ ``scale`` documentation.
|
|
1054
|
+
title (str | None): A title for the field. If ``null``, the title will be removed.
|
|
1055
|
+
type (Type_T): Schema-defined ``type`` property.
|
|
1056
|
+
"""
|
|
1057
|
+
properties = {
|
|
1058
|
+
"datum": datum,
|
|
1059
|
+
"axis": axis,
|
|
1060
|
+
"band": band,
|
|
1061
|
+
"buildIndex": buildIndex,
|
|
1062
|
+
"condition": condition,
|
|
1063
|
+
"description": description,
|
|
1064
|
+
"domainInert": domainInert,
|
|
1065
|
+
"format": format,
|
|
1066
|
+
"resolutionChannel": resolutionChannel,
|
|
1067
|
+
"scale": scale,
|
|
1068
|
+
"title": title,
|
|
1069
|
+
"type": type,
|
|
1070
|
+
}
|
|
1071
|
+
defined = {
|
|
1072
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
1073
|
+
}
|
|
1074
|
+
from genome_spy.channels import DatumChannel
|
|
1075
|
+
|
|
1076
|
+
return DatumChannel(defined)
|
|
1077
|
+
|
|
1078
|
+
|
|
1079
|
+
datum = DatumType()
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
def value(
|
|
1083
|
+
value: Any,
|
|
1084
|
+
/,
|
|
1085
|
+
*,
|
|
1086
|
+
buildIndex: bool | UndefinedType = Undefined,
|
|
1087
|
+
condition: Any | UndefinedType = Undefined,
|
|
1088
|
+
description: str | UndefinedType = Undefined,
|
|
1089
|
+
title: str | None | UndefinedType = Undefined,
|
|
1090
|
+
) -> ValueChannel:
|
|
1091
|
+
"""Create a constant-value encoding channel.
|
|
1092
|
+
|
|
1093
|
+
Args:
|
|
1094
|
+
buildIndex (bool): Builds and index for efficient rendering of subsets of the data. This setting is useful when rendering large amounts of data and often only a small subset of the data is visible. An example of such a situation is a scatter plot spanning the whole genome. This setting implicitly sorts the data by the field assigned on the ``x`` channel.
|
|
1095
|
+
condition (Any): A field definition or one or more value definition(s) with a parameter predicate.
|
|
1096
|
+
description (str): A description of the encoded value. Can be used for documentation and to explain the meaning of the channel mapping.
|
|
1097
|
+
title (str | None): A title for the field. If ``null``, the title will be removed.
|
|
1098
|
+
value (Any): A constant value in visual domain (e.g., ``"red"`` / ``"#0099ff"``, values between ``0`` to ``1`` for opacity).
|
|
1099
|
+
"""
|
|
1100
|
+
properties = {
|
|
1101
|
+
"value": value,
|
|
1102
|
+
"buildIndex": buildIndex,
|
|
1103
|
+
"condition": condition,
|
|
1104
|
+
"description": description,
|
|
1105
|
+
"title": title,
|
|
1106
|
+
}
|
|
1107
|
+
defined = {
|
|
1108
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
1109
|
+
}
|
|
1110
|
+
from genome_spy.channels import ValueChannel
|
|
1111
|
+
|
|
1112
|
+
return ValueChannel(defined)
|
|
1113
|
+
|
|
1114
|
+
|
|
1115
|
+
_PARAMETER_TYPES = (
|
|
1116
|
+
core.Parameter,
|
|
1117
|
+
core.PlainValueParameter,
|
|
1118
|
+
core.TransitionedValueParameter,
|
|
1119
|
+
core.ExprParameter,
|
|
1120
|
+
core.SelectionParameter,
|
|
1121
|
+
core.RulerParameter,
|
|
1122
|
+
)
|
|
1123
|
+
_SELECTION_PARAMETER_TYPES = (core.SelectionParameter,)
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
@overload
|
|
1127
|
+
def param(
|
|
1128
|
+
name: str | None = None,
|
|
1129
|
+
/,
|
|
1130
|
+
*,
|
|
1131
|
+
bind: core.BindCheckbox
|
|
1132
|
+
| BindCheckboxKwds
|
|
1133
|
+
| core.BindRadioSelect
|
|
1134
|
+
| BindRadioSelectKwds
|
|
1135
|
+
| core.BindRange
|
|
1136
|
+
| BindRangeKwds
|
|
1137
|
+
| core.BindInput
|
|
1138
|
+
| BindInputKwds
|
|
1139
|
+
| UndefinedType = Undefined,
|
|
1140
|
+
description: str | UndefinedType = Undefined,
|
|
1141
|
+
persist: bool | UndefinedType = Undefined,
|
|
1142
|
+
push: Literal["outer"] | UndefinedType = Undefined,
|
|
1143
|
+
value: Any | UndefinedType = Undefined,
|
|
1144
|
+
empty: bool = True,
|
|
1145
|
+
) -> Parameter: ...
|
|
1146
|
+
|
|
1147
|
+
|
|
1148
|
+
@overload
|
|
1149
|
+
def param(
|
|
1150
|
+
name: str | None = None,
|
|
1151
|
+
/,
|
|
1152
|
+
*,
|
|
1153
|
+
transition: core.LerpTransition | dict[str, Any],
|
|
1154
|
+
value: float,
|
|
1155
|
+
bind: core.BindCheckbox
|
|
1156
|
+
| BindCheckboxKwds
|
|
1157
|
+
| core.BindRadioSelect
|
|
1158
|
+
| BindRadioSelectKwds
|
|
1159
|
+
| core.BindRange
|
|
1160
|
+
| BindRangeKwds
|
|
1161
|
+
| core.BindInput
|
|
1162
|
+
| BindInputKwds
|
|
1163
|
+
| UndefinedType = Undefined,
|
|
1164
|
+
description: str | UndefinedType = Undefined,
|
|
1165
|
+
persist: bool | UndefinedType = Undefined,
|
|
1166
|
+
push: Literal["outer"] | UndefinedType = Undefined,
|
|
1167
|
+
empty: bool = True,
|
|
1168
|
+
) -> Parameter: ...
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
@overload
|
|
1172
|
+
def param(
|
|
1173
|
+
name: str | None = None,
|
|
1174
|
+
/,
|
|
1175
|
+
*,
|
|
1176
|
+
expr: str | ExpressionOperand,
|
|
1177
|
+
description: str | UndefinedType = Undefined,
|
|
1178
|
+
persist: bool | UndefinedType = Undefined,
|
|
1179
|
+
push: Literal["outer"] | UndefinedType = Undefined,
|
|
1180
|
+
transition: core.LerpTransition | dict[str, Any] | UndefinedType = Undefined,
|
|
1181
|
+
empty: bool = True,
|
|
1182
|
+
) -> Parameter: ...
|
|
1183
|
+
|
|
1184
|
+
|
|
1185
|
+
@overload
|
|
1186
|
+
def param(
|
|
1187
|
+
name: str | None = None,
|
|
1188
|
+
/,
|
|
1189
|
+
*,
|
|
1190
|
+
select: SelectionType_T
|
|
1191
|
+
| core.PointSelectionConfig
|
|
1192
|
+
| dict[str, Any]
|
|
1193
|
+
| core.IntervalSelectionConfig,
|
|
1194
|
+
description: str | UndefinedType = Undefined,
|
|
1195
|
+
persist: bool | UndefinedType = Undefined,
|
|
1196
|
+
push: Literal["outer"] | UndefinedType = Undefined,
|
|
1197
|
+
value: core.SelectionInitIntervalMapping
|
|
1198
|
+
| dict[str, Any]
|
|
1199
|
+
| UndefinedType = Undefined,
|
|
1200
|
+
empty: bool = True,
|
|
1201
|
+
) -> Parameter: ...
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
@overload
|
|
1205
|
+
def param(
|
|
1206
|
+
name: str | None = None,
|
|
1207
|
+
/,
|
|
1208
|
+
*,
|
|
1209
|
+
ruler: core.RulerConfig | RulerConfigKwds,
|
|
1210
|
+
description: str | UndefinedType = Undefined,
|
|
1211
|
+
persist: bool | UndefinedType = Undefined,
|
|
1212
|
+
push: Literal["outer"] | UndefinedType = Undefined,
|
|
1213
|
+
value: core.RulerInitMapping | dict[str, Any] | UndefinedType = Undefined,
|
|
1214
|
+
empty: bool = True,
|
|
1215
|
+
) -> Parameter: ...
|
|
1216
|
+
|
|
1217
|
+
|
|
1218
|
+
def param(
|
|
1219
|
+
name: str | None = None,
|
|
1220
|
+
/,
|
|
1221
|
+
*,
|
|
1222
|
+
bind: core.BindCheckbox
|
|
1223
|
+
| BindCheckboxKwds
|
|
1224
|
+
| core.BindRadioSelect
|
|
1225
|
+
| BindRadioSelectKwds
|
|
1226
|
+
| core.BindRange
|
|
1227
|
+
| BindRangeKwds
|
|
1228
|
+
| core.BindInput
|
|
1229
|
+
| BindInputKwds
|
|
1230
|
+
| UndefinedType = Undefined,
|
|
1231
|
+
description: str | UndefinedType = Undefined,
|
|
1232
|
+
expr: str | ExpressionOperand | UndefinedType = Undefined,
|
|
1233
|
+
persist: bool | UndefinedType = Undefined,
|
|
1234
|
+
push: Literal["outer"] | UndefinedType = Undefined,
|
|
1235
|
+
ruler: core.RulerConfig | RulerConfigKwds | UndefinedType = Undefined,
|
|
1236
|
+
select: SelectionType_T
|
|
1237
|
+
| core.PointSelectionConfig
|
|
1238
|
+
| dict[str, Any]
|
|
1239
|
+
| core.IntervalSelectionConfig
|
|
1240
|
+
| UndefinedType = Undefined,
|
|
1241
|
+
transition: core.LerpTransition | dict[str, Any] | UndefinedType = Undefined,
|
|
1242
|
+
value: Any | UndefinedType = Undefined,
|
|
1243
|
+
empty: bool = True,
|
|
1244
|
+
) -> Parameter:
|
|
1245
|
+
"""Create a reusable GenomeSpy parameter handle.
|
|
1246
|
+
|
|
1247
|
+
The overloads and accepted properties are generated from the
|
|
1248
|
+
concrete leaves of GenomeSpy's ``Parameter`` union.
|
|
1249
|
+
|
|
1250
|
+
Args:
|
|
1251
|
+
name: Parameter name. A stable name is generated when omitted.
|
|
1252
|
+
bind: Binds the parameter to an external input element such as a slider, selection list or radio button group.
|
|
1253
|
+
description: A description of the parameter. Can be used for documentation and to explain the meaning of the control or selection.
|
|
1254
|
+
expr: An expression for the value of the parameter. This expression may include other parameters, in which case the parameter will automatically update in response to upstream parameter changes.
|
|
1255
|
+
persist: Whether the parameter should be persisted in bookmarks and provenance. This primarily affects GenomeSpy App behavior. Set to ``false`` for ephemeral params (e.g., hover selections) or when the selection cannot be persisted due to missing ``encoding.key``. __Default value:__ ``true``
|
|
1256
|
+
push: Reuses the nearest same-named parameter in an ancestor scope and writes updates to it. Declare the target parameter on the ancestor first. This is useful when interaction in a child view updates state owned by a composed view, such as a parameter that controls a shared scale.
|
|
1257
|
+
ruler: Tracks a domain coordinate and displays it as a ruler in compatible views.
|
|
1258
|
+
select: Determines the default event processing and data query for the selection. GenomeSpy supports two selection types, following the Vega-Lite model: - ``"point"`` -- to select multiple discrete data values; the first value is selected on ``click`` and additional values toggled on shift-click. - ``"interval"`` -- to select a continuous range of data values on ``drag``.
|
|
1259
|
+
transition: Smoothly follows numeric target values.
|
|
1260
|
+
value: The initial value of the parameter. __Default value:__ ``undefined``
|
|
1261
|
+
empty: Whether an empty selection matches as a predicate.
|
|
1262
|
+
|
|
1263
|
+
Returns:
|
|
1264
|
+
A reusable parameter handle.
|
|
1265
|
+
|
|
1266
|
+
Raises:
|
|
1267
|
+
TypeError: If the arguments match no unique parameter branch.
|
|
1268
|
+
|
|
1269
|
+
Example:
|
|
1270
|
+
>>> param("cutoff", value=0.5).param.to_dict()
|
|
1271
|
+
{'name': 'cutoff', 'value': 0.5}
|
|
1272
|
+
"""
|
|
1273
|
+
from genome_spy._parameters import _make_parameter
|
|
1274
|
+
|
|
1275
|
+
return _make_parameter(
|
|
1276
|
+
name,
|
|
1277
|
+
bind=bind,
|
|
1278
|
+
description=description,
|
|
1279
|
+
expr=expr,
|
|
1280
|
+
persist=persist,
|
|
1281
|
+
push=push,
|
|
1282
|
+
ruler=ruler,
|
|
1283
|
+
select=select,
|
|
1284
|
+
transition=transition,
|
|
1285
|
+
value=value,
|
|
1286
|
+
_variants=(
|
|
1287
|
+
core.PlainValueParameter,
|
|
1288
|
+
core.TransitionedValueParameter,
|
|
1289
|
+
core.ExprParameter,
|
|
1290
|
+
core.SelectionParameter,
|
|
1291
|
+
core.RulerParameter,
|
|
1292
|
+
),
|
|
1293
|
+
empty=empty,
|
|
1294
|
+
)
|
|
1295
|
+
|
|
1296
|
+
|
|
1297
|
+
def ruler(
|
|
1298
|
+
name: str | None = None,
|
|
1299
|
+
/,
|
|
1300
|
+
*,
|
|
1301
|
+
clear: RulerClear_T | UndefinedType = Undefined,
|
|
1302
|
+
disabled: bool | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1303
|
+
display: RulerDisplay_T | UndefinedType = Undefined,
|
|
1304
|
+
encodings: Sequence[PrimaryPositionalChannel_T] | UndefinedType = Undefined,
|
|
1305
|
+
extent: RulerExtent_T | UndefinedType = Undefined,
|
|
1306
|
+
mark: core.RulerMarkConfig | RulerMarkConfigKwds | UndefinedType = Undefined,
|
|
1307
|
+
on: RulerEventType_T
|
|
1308
|
+
| core.RulerEventConfig
|
|
1309
|
+
| RulerEventConfigKwds
|
|
1310
|
+
| str
|
|
1311
|
+
| UndefinedType = Undefined,
|
|
1312
|
+
snap: RulerSnap_T | UndefinedType = Undefined,
|
|
1313
|
+
source: RulerSource_T | UndefinedType = Undefined,
|
|
1314
|
+
description: str | UndefinedType = Undefined,
|
|
1315
|
+
persist: bool | UndefinedType = Undefined,
|
|
1316
|
+
push: Literal["outer"] | UndefinedType = Undefined,
|
|
1317
|
+
value: core.RulerInitMapping | dict[str, Any] | UndefinedType = Undefined,
|
|
1318
|
+
) -> Parameter:
|
|
1319
|
+
"""Create a GenomeSpy ``ruler`` parameter.
|
|
1320
|
+
|
|
1321
|
+
Args:
|
|
1322
|
+
name: Parameter name. A stable name is generated when omitted.
|
|
1323
|
+
clear: Event that clears the ruler, or ``false`` to keep the current value. __Default value:__ ``"mouseleave"`` for ``on: "mousemove"``, otherwise ``false``.
|
|
1324
|
+
disabled: Clears the coordinate and ignores tracking events while true. Expressions resolve where the ruler is declared. Re-enabling waits for the next pointer or viewport event; it does not restore the initial value. With ``push: "outer"``, other enabled bindings can still update the shared coordinate. __Default value:__ ``false``
|
|
1325
|
+
display: How the ruler is drawn for snapped index or locus coordinates. ``"line"`` draws at the coordinate. ``"center"`` draws at the center of the coordinate band. ``"band"`` draws a rectangle covering the coordinate band. ``"none"`` tracks the ruler value without drawing a guide. __Default value:__ ``"center"`` for snapped index and locus scales, otherwise ``"line"``.
|
|
1326
|
+
encodings: Positional channels whose domain coordinates are tracked by the ruler. __Default value:__ ``["x"]``
|
|
1327
|
+
extent: Visual extent of the ruler. ``"view"`` draws one guide per participating view. ``"container"`` draws one spanning guide when participating projections align. ``"auto"`` chooses a spanning guide only when it is safe. __Default value:__ ``"auto"``
|
|
1328
|
+
mark: Rule or band appearance. Expressions resolve in the scope where this ruler is declared, including when it uses ``push: "outer"``. Has no effect when ``display`` is ``"none"``.
|
|
1329
|
+
on: Event that updates a pointer-driven ruler. ``"mousemove"`` follows the pointer. ``"mousedown"`` updates on press and continues while dragging. Event filters can require modifier keys. __Default value:__ ``"mousemove"``
|
|
1330
|
+
snap: Quantization applied before writing the ruler value. ``"auto"`` snaps index and locus scales to integer coordinates. ``"integer"`` snaps all numeric coordinates. ``false`` keeps the original coordinate. __Default value:__ ``"auto"`` for index and locus scales, otherwise ``false``.
|
|
1331
|
+
source: Source of the ruler coordinate. ``"pointer"`` uses pointer events configured by ``on``. ``"viewport"`` tracks the center of the current viewport. __Default value:__ ``"pointer"``
|
|
1332
|
+
description: A description of the parameter. Can be used for documentation and to explain the meaning of the control or selection.
|
|
1333
|
+
persist: Whether the parameter should be persisted in bookmarks and provenance. This primarily affects GenomeSpy App behavior. Set to ``false`` for ephemeral params (e.g., hover selections) or when the selection cannot be persisted due to missing ``encoding.key``. __Default value:__ ``true``
|
|
1334
|
+
push: Reuses the nearest same-named parameter in an ancestor scope and writes updates to it. Declare the target parameter on the ancestor first. This is useful when interaction in a child view updates state owned by a composed view, such as a parameter that controls a shared scale.
|
|
1335
|
+
value: Initial ruler value.
|
|
1336
|
+
|
|
1337
|
+
Returns:
|
|
1338
|
+
A reusable parameter handle.
|
|
1339
|
+
|
|
1340
|
+
Raises:
|
|
1341
|
+
TypeError: If the generated parameter definition is invalid.
|
|
1342
|
+
|
|
1343
|
+
Example:
|
|
1344
|
+
>>> ruler().param.to_dict(validate=False)
|
|
1345
|
+
{...}
|
|
1346
|
+
"""
|
|
1347
|
+
config = core.RulerConfig(
|
|
1348
|
+
clear=clear,
|
|
1349
|
+
disabled=disabled,
|
|
1350
|
+
display=display,
|
|
1351
|
+
encodings=encodings,
|
|
1352
|
+
extent=extent,
|
|
1353
|
+
mark=mark,
|
|
1354
|
+
on=on,
|
|
1355
|
+
snap=snap,
|
|
1356
|
+
source=source,
|
|
1357
|
+
)
|
|
1358
|
+
from genome_spy._parameters import _make_parameter
|
|
1359
|
+
|
|
1360
|
+
return _make_parameter(
|
|
1361
|
+
name,
|
|
1362
|
+
ruler=config,
|
|
1363
|
+
description=description,
|
|
1364
|
+
persist=persist,
|
|
1365
|
+
push=push,
|
|
1366
|
+
value=value,
|
|
1367
|
+
_variants=(core.RulerParameter,),
|
|
1368
|
+
)
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
def selection_interval(
|
|
1372
|
+
name: str | None = None,
|
|
1373
|
+
/,
|
|
1374
|
+
*,
|
|
1375
|
+
clear: DomEventType_T
|
|
1376
|
+
| core.EventConfig
|
|
1377
|
+
| EventConfigKwds
|
|
1378
|
+
| str
|
|
1379
|
+
| bool
|
|
1380
|
+
| UndefinedType = Undefined,
|
|
1381
|
+
encodings: Sequence[PrimaryPositionalChannel_T] | UndefinedType = Undefined,
|
|
1382
|
+
extent: SelectionExtent_T | UndefinedType = Undefined,
|
|
1383
|
+
mark: core.BrushConfig | dict[str, Any] | UndefinedType = Undefined,
|
|
1384
|
+
on: DomEventType_T
|
|
1385
|
+
| core.EventConfig
|
|
1386
|
+
| EventConfigKwds
|
|
1387
|
+
| str
|
|
1388
|
+
| UndefinedType = Undefined,
|
|
1389
|
+
zoom: DomEventType_T
|
|
1390
|
+
| core.EventConfig
|
|
1391
|
+
| EventConfigKwds
|
|
1392
|
+
| str
|
|
1393
|
+
| bool
|
|
1394
|
+
| UndefinedType = Undefined,
|
|
1395
|
+
description: str | UndefinedType = Undefined,
|
|
1396
|
+
persist: bool | UndefinedType = Undefined,
|
|
1397
|
+
push: Literal["outer"] | UndefinedType = Undefined,
|
|
1398
|
+
value: core.SelectionInitIntervalMapping
|
|
1399
|
+
| dict[str, Any]
|
|
1400
|
+
| UndefinedType = Undefined,
|
|
1401
|
+
empty: bool = True,
|
|
1402
|
+
) -> Parameter:
|
|
1403
|
+
"""Create a GenomeSpy ``selection_interval`` parameter.
|
|
1404
|
+
|
|
1405
|
+
Args:
|
|
1406
|
+
name: Parameter name. A stable name is generated when omitted.
|
|
1407
|
+
clear: A string or object that defines the events that should clear the selection. __Default value:__ ``"dblclick"``
|
|
1408
|
+
encodings: An array of encoding channels that define the interval selection.
|
|
1409
|
+
extent: Visual extent of the interval selection rectangle. ``"auto"`` draws one spanning rectangle when the selected channel can span a concat safely. ``"view"`` draws one rectangle per participating view. ``"container"`` requires one spanning rectangle. __Default value:__ ``"auto"``
|
|
1410
|
+
mark: Interval selections display a rectangle mark to show the selected range. Use the ``mark`` property to adjust the appearance of this rectangle.
|
|
1411
|
+
on: A string or object that defines the events to which the selection should listen. __Default value:__ - point selections: ``"click"`` - interval selections: - ``"mousedown[event.shiftKey]"`` when any brushed channel is zoomable - ``"mousedown"`` otherwise
|
|
1412
|
+
zoom: Controls whether an active interval selection can be resized by mouse wheel. The wheel interaction only applies when the cursor is over the interval. Can be: - ``true`` / ``false`` - event type string such as ``"wheel"`` or ``"wheel[event.altKey]"`` - an ``EventConfig`` object Currently, only ``"wheel"`` events are supported. __Default value:__ - ``false`` when any brushed channel uses a zoomable scale - ``true`` otherwise
|
|
1413
|
+
description: A description of the parameter. Can be used for documentation and to explain the meaning of the control or selection.
|
|
1414
|
+
persist: Whether the parameter should be persisted in bookmarks and provenance. This primarily affects GenomeSpy App behavior. Set to ``false`` for ephemeral params (e.g., hover selections) or when the selection cannot be persisted due to missing ``encoding.key``. __Default value:__ ``true``
|
|
1415
|
+
push: Reuses the nearest same-named parameter in an ancestor scope and writes updates to it. Declare the target parameter on the ancestor first. This is useful when interaction in a child view updates state owned by a composed view, such as a parameter that controls a shared scale.
|
|
1416
|
+
value: Initial value for the selection.
|
|
1417
|
+
empty: Whether an empty selection matches as a predicate.
|
|
1418
|
+
|
|
1419
|
+
Returns:
|
|
1420
|
+
A reusable parameter handle.
|
|
1421
|
+
|
|
1422
|
+
Raises:
|
|
1423
|
+
TypeError: If the generated parameter definition is invalid.
|
|
1424
|
+
|
|
1425
|
+
Example:
|
|
1426
|
+
>>> selection_interval().param.to_dict(validate=False)
|
|
1427
|
+
{...}
|
|
1428
|
+
"""
|
|
1429
|
+
config = core.IntervalSelectionConfig(
|
|
1430
|
+
type="interval",
|
|
1431
|
+
clear=clear,
|
|
1432
|
+
encodings=encodings,
|
|
1433
|
+
extent=extent,
|
|
1434
|
+
mark=mark,
|
|
1435
|
+
on=on,
|
|
1436
|
+
zoom=zoom,
|
|
1437
|
+
)
|
|
1438
|
+
from genome_spy._parameters import _make_parameter
|
|
1439
|
+
|
|
1440
|
+
return _make_parameter(
|
|
1441
|
+
name,
|
|
1442
|
+
select=config,
|
|
1443
|
+
description=description,
|
|
1444
|
+
persist=persist,
|
|
1445
|
+
push=push,
|
|
1446
|
+
value=value,
|
|
1447
|
+
empty=empty,
|
|
1448
|
+
_variants=(core.SelectionParameter,),
|
|
1449
|
+
)
|
|
1450
|
+
|
|
1451
|
+
|
|
1452
|
+
def selection_point(
|
|
1453
|
+
name: str | None = None,
|
|
1454
|
+
/,
|
|
1455
|
+
*,
|
|
1456
|
+
clear: DomEventType_T
|
|
1457
|
+
| core.EventConfig
|
|
1458
|
+
| EventConfigKwds
|
|
1459
|
+
| str
|
|
1460
|
+
| bool
|
|
1461
|
+
| UndefinedType = Undefined,
|
|
1462
|
+
on: DomEventType_T
|
|
1463
|
+
| core.EventConfig
|
|
1464
|
+
| EventConfigKwds
|
|
1465
|
+
| str
|
|
1466
|
+
| UndefinedType = Undefined,
|
|
1467
|
+
toggle: bool | UndefinedType = Undefined,
|
|
1468
|
+
description: str | UndefinedType = Undefined,
|
|
1469
|
+
persist: bool | UndefinedType = Undefined,
|
|
1470
|
+
push: Literal["outer"] | UndefinedType = Undefined,
|
|
1471
|
+
value: core.SelectionInitIntervalMapping
|
|
1472
|
+
| dict[str, Any]
|
|
1473
|
+
| UndefinedType = Undefined,
|
|
1474
|
+
empty: bool = True,
|
|
1475
|
+
) -> Parameter:
|
|
1476
|
+
"""Create a GenomeSpy ``selection_point`` parameter.
|
|
1477
|
+
|
|
1478
|
+
Args:
|
|
1479
|
+
name: Parameter name. A stable name is generated when omitted.
|
|
1480
|
+
clear: A string or object that defines the events that should clear the selection. __Default value:__ ``"dblclick"``
|
|
1481
|
+
on: A string or object that defines the events to which the selection should listen. __Default value:__ - point selections: ``"click"`` - interval selections: - ``"mousedown[event.shiftKey]"`` when any brushed channel is zoomable - ``"mousedown"`` otherwise
|
|
1482
|
+
toggle: Controls whether data values should be toggled (inserted or removed from a point selection) when clicking with the shift key pressed. - ``true`` -- additional values can be selected by shift-clicking. - ``false`` -- only a single value can be selected at a time. __Default value:__ ``true``
|
|
1483
|
+
description: A description of the parameter. Can be used for documentation and to explain the meaning of the control or selection.
|
|
1484
|
+
persist: Whether the parameter should be persisted in bookmarks and provenance. This primarily affects GenomeSpy App behavior. Set to ``false`` for ephemeral params (e.g., hover selections) or when the selection cannot be persisted due to missing ``encoding.key``. __Default value:__ ``true``
|
|
1485
|
+
push: Reuses the nearest same-named parameter in an ancestor scope and writes updates to it. Declare the target parameter on the ancestor first. This is useful when interaction in a child view updates state owned by a composed view, such as a parameter that controls a shared scale.
|
|
1486
|
+
value: Initial value for the selection.
|
|
1487
|
+
empty: Whether an empty selection matches as a predicate.
|
|
1488
|
+
|
|
1489
|
+
Returns:
|
|
1490
|
+
A reusable parameter handle.
|
|
1491
|
+
|
|
1492
|
+
Raises:
|
|
1493
|
+
TypeError: If the generated parameter definition is invalid.
|
|
1494
|
+
|
|
1495
|
+
Example:
|
|
1496
|
+
>>> selection_point().param.to_dict(validate=False)
|
|
1497
|
+
{...}
|
|
1498
|
+
"""
|
|
1499
|
+
config = core.PointSelectionConfig(type="point", clear=clear, on=on, toggle=toggle)
|
|
1500
|
+
from genome_spy._parameters import _make_parameter
|
|
1501
|
+
|
|
1502
|
+
return _make_parameter(
|
|
1503
|
+
name,
|
|
1504
|
+
select=config,
|
|
1505
|
+
description=description,
|
|
1506
|
+
persist=persist,
|
|
1507
|
+
push=push,
|
|
1508
|
+
value=value,
|
|
1509
|
+
empty=empty,
|
|
1510
|
+
_variants=(core.SelectionParameter,),
|
|
1511
|
+
)
|
|
1512
|
+
|
|
1513
|
+
|
|
1514
|
+
def title(
|
|
1515
|
+
text: str | core.ExprRef | dict[str, Any],
|
|
1516
|
+
/,
|
|
1517
|
+
*,
|
|
1518
|
+
align: Align_T | UndefinedType = Undefined,
|
|
1519
|
+
anchor: TitleAnchor_T | UndefinedType = Undefined,
|
|
1520
|
+
angle: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1521
|
+
baseline: Baseline_T | UndefinedType = Undefined,
|
|
1522
|
+
color: str | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1523
|
+
dx: float | UndefinedType = Undefined,
|
|
1524
|
+
dy: float | UndefinedType = Undefined,
|
|
1525
|
+
font: str | UndefinedType = Undefined,
|
|
1526
|
+
fontSize: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1527
|
+
fontStyle: FontStyle_T | UndefinedType = Undefined,
|
|
1528
|
+
fontWeight: FontWeight_T | UndefinedType = Undefined,
|
|
1529
|
+
frame: TitleFrame_T | UndefinedType = Undefined,
|
|
1530
|
+
offset: float | UndefinedType = Undefined,
|
|
1531
|
+
orient: TitleOrient_T | UndefinedType = Undefined,
|
|
1532
|
+
reserve: bool | UndefinedType = Undefined,
|
|
1533
|
+
style: str | Sequence[str] | UndefinedType = Undefined,
|
|
1534
|
+
subtitle: str | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1535
|
+
subtitleColor: str | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1536
|
+
subtitleFont: str | UndefinedType = Undefined,
|
|
1537
|
+
subtitleFontSize: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1538
|
+
subtitleFontStyle: FontStyle_T | UndefinedType = Undefined,
|
|
1539
|
+
subtitleFontWeight: FontWeight_T | UndefinedType = Undefined,
|
|
1540
|
+
subtitlePadding: float | UndefinedType = Undefined,
|
|
1541
|
+
zindex: float | UndefinedType = Undefined,
|
|
1542
|
+
) -> core.Title:
|
|
1543
|
+
"""Create a chart title object.
|
|
1544
|
+
|
|
1545
|
+
Args:
|
|
1546
|
+
text (str | ExprRef | dict[str, Any]): The title text.
|
|
1547
|
+
align (Align_T): Horizontal text alignment for title text. One of ``"left"``, ``"center"``, or ``"right"``.
|
|
1548
|
+
anchor (TitleAnchor_T): The anchor position for placing the title and subtitle text. One of ``"start"``, ``"middle"``, or ``"end"``. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.
|
|
1549
|
+
angle (float | ExprRef | dict[str, Any]): Angle in degrees of title and subtitle text.
|
|
1550
|
+
baseline (Baseline_T): Vertical text baseline for title and subtitle text. One of ``"alphabetic"`` (default), ``"top"``, ``"middle"``, or ``"bottom"``.
|
|
1551
|
+
color (str | ExprRef | dict[str, Any]): Text color for title text.
|
|
1552
|
+
dx (float): Delta offset for title and subtitle text x-coordinate.
|
|
1553
|
+
dy (float): Delta offset for title and subtitle text y-coordinate.
|
|
1554
|
+
font (str): Font name for title text.
|
|
1555
|
+
fontSize (float | ExprRef | dict[str, Any]): Font size in pixels for title text.
|
|
1556
|
+
fontStyle (FontStyle_T): Font style for title text.
|
|
1557
|
+
fontWeight (FontWeight_T): Font weight for title text. This can be either a string (e.g ``"bold"``, ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``).
|
|
1558
|
+
frame (TitleFrame_T): The reference frame for the title anchor. ``"group"`` anchors the title along the plot area. ``"bounds"`` anchors the title along the full bounds, including axes, legends, and other reserved space. __Default value:__ ``"group"``
|
|
1559
|
+
offset (float): The orthogonal offset in pixels by which to displace the title group from its position along the edge of the chart.
|
|
1560
|
+
orient (TitleOrient_T): Default title orientation (``"none"``, ``"top"``, ``"bottom"``, ``"left"``, or ``"right"``)
|
|
1561
|
+
reserve (bool): Whether the title reserves layout space outside the plot area. Reserved titles are placed outside axes, legends, and other guide space on the same side. Setting this to ``false`` lets the title render without affecting layout, enabling wilder layouts where titles may overlap nearby content. __Default value:__ ``true``
|
|
1562
|
+
style (str | Sequence[str]): A mark style property to apply to the title text mark. If not specified, a default style of ``"group-title"`` is applied.
|
|
1563
|
+
subtitle (str | ExprRef | dict[str, Any]): The subtitle text.
|
|
1564
|
+
subtitleColor (str | ExprRef | dict[str, Any]): Text color for subtitle text.
|
|
1565
|
+
subtitleFont (str): Font name for subtitle text.
|
|
1566
|
+
subtitleFontSize (float | ExprRef | dict[str, Any]): Font size in pixels for subtitle text.
|
|
1567
|
+
subtitleFontStyle (FontStyle_T): Font style for subtitle text.
|
|
1568
|
+
subtitleFontWeight (FontWeight_T): Font weight for subtitle text. This can be either a string (e.g ``"bold"``, ``"normal"``) or a number (``100``, ``200``, ``300``, ..., ``900`` where ``"normal"`` = ``400`` and ``"bold"`` = ``700``).
|
|
1569
|
+
subtitlePadding (float): Padding in pixels between title and subtitle text. __Default value:__ ``3``
|
|
1570
|
+
zindex (float): Z-order of the title relative to the view content. Values greater than ``0`` render after the view marks. Values less than or equal to ``0`` render before the marks. __Default value:__ ``1``
|
|
1571
|
+
"""
|
|
1572
|
+
properties = {
|
|
1573
|
+
"text": text,
|
|
1574
|
+
"align": align,
|
|
1575
|
+
"anchor": anchor,
|
|
1576
|
+
"angle": angle,
|
|
1577
|
+
"baseline": baseline,
|
|
1578
|
+
"color": color,
|
|
1579
|
+
"dx": dx,
|
|
1580
|
+
"dy": dy,
|
|
1581
|
+
"font": font,
|
|
1582
|
+
"fontSize": fontSize,
|
|
1583
|
+
"fontStyle": fontStyle,
|
|
1584
|
+
"fontWeight": fontWeight,
|
|
1585
|
+
"frame": frame,
|
|
1586
|
+
"offset": offset,
|
|
1587
|
+
"orient": orient,
|
|
1588
|
+
"reserve": reserve,
|
|
1589
|
+
"style": style,
|
|
1590
|
+
"subtitle": subtitle,
|
|
1591
|
+
"subtitleColor": subtitleColor,
|
|
1592
|
+
"subtitleFont": subtitleFont,
|
|
1593
|
+
"subtitleFontSize": subtitleFontSize,
|
|
1594
|
+
"subtitleFontStyle": subtitleFontStyle,
|
|
1595
|
+
"subtitleFontWeight": subtitleFontWeight,
|
|
1596
|
+
"subtitlePadding": subtitlePadding,
|
|
1597
|
+
"zindex": zindex,
|
|
1598
|
+
}
|
|
1599
|
+
defined: dict[str, Any] = {
|
|
1600
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
1601
|
+
}
|
|
1602
|
+
return core.Title(**defined)
|
|
1603
|
+
|
|
1604
|
+
|
|
1605
|
+
def dynamic_opacity(
|
|
1606
|
+
*,
|
|
1607
|
+
channel: PrimaryPositionalChannel_T | Literal["auto"] | UndefinedType = Undefined,
|
|
1608
|
+
unitsPerPixel: Sequence[float | core.ExprRef | dict[str, Any]]
|
|
1609
|
+
| UndefinedType = Undefined,
|
|
1610
|
+
values: Sequence[float] | UndefinedType = Undefined,
|
|
1611
|
+
) -> core.DynamicOpacity:
|
|
1612
|
+
"""Create a zoom-dependent opacity definition.
|
|
1613
|
+
|
|
1614
|
+
Args:
|
|
1615
|
+
channel (PrimaryPositionalChannel_T | Literal['auto']): The positional channel whose scale domain controls the opacity. If set to ``"auto"``, both ``x`` and ``y`` scales may contribute. If omitted, ``x`` is used when available and ``y`` is used as a fallback.
|
|
1616
|
+
unitsPerPixel (Sequence[float | ExprRef | dict[str, Any]]): Opacity stops expressed as units (base pairs, for example) per pixel. The values must be positive. Each stop is paired with an opacity in ``values`` at the same index. Stops can be constants or expression references.
|
|
1617
|
+
values (Sequence[float]): Opacity values that match the given ``unitsPerPixel`` stops. Values outside the stop range are clamped to the nearest stop.
|
|
1618
|
+
"""
|
|
1619
|
+
properties = {
|
|
1620
|
+
"channel": channel,
|
|
1621
|
+
"unitsPerPixel": unitsPerPixel,
|
|
1622
|
+
"values": values,
|
|
1623
|
+
}
|
|
1624
|
+
defined: dict[str, Any] = {
|
|
1625
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
1626
|
+
}
|
|
1627
|
+
return core.DynamicOpacity(**defined)
|
|
1628
|
+
|
|
1629
|
+
|
|
1630
|
+
def data_format(
|
|
1631
|
+
*,
|
|
1632
|
+
columns: Sequence[str] | UndefinedType = Undefined,
|
|
1633
|
+
delimiter: str | UndefinedType = Undefined,
|
|
1634
|
+
parse: core.Parse | ParseKwds | None | UndefinedType = Undefined,
|
|
1635
|
+
property: str | UndefinedType = Undefined,
|
|
1636
|
+
type: str | UndefinedType = Undefined,
|
|
1637
|
+
) -> core.DataFormat:
|
|
1638
|
+
"""Create a data-format wrapper.
|
|
1639
|
+
|
|
1640
|
+
Args:
|
|
1641
|
+
columns (Sequence[str]): 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.
|
|
1642
|
+
delimiter (str): The delimiter between records. The delimiter must be a single character (i.e., a single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are not.
|
|
1643
|
+
parse (Parse | ParseKwds | None): 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. For ``"date"``, we parse data based using Javascript's ``Date.parse()``. Specific date formats can be provided (e.g., ``{foo: "date:'%m%d%Y'"}``), using the d3-time-format syntax. UTC date format parsing is supported similarly (e.g., ``{foo: "utc:'%m%d%Y'"}``). See more about UTC parsing in the Vega-Lite UTC time documentation.
|
|
1644
|
+
property (str): The JSON property containing the desired data. This parameter can be used when the loaded JSON file may have surrounding structure or meta-data. For example ``"property": "values.features"`` is equivalent to retrieving ``json.values.features`` from the loaded JSON object.
|
|
1645
|
+
type (str): Type of input data: ``"json"``, ``"csv"``, ``"tsv"``, ``"dsv"``. __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.
|
|
1646
|
+
"""
|
|
1647
|
+
properties = {
|
|
1648
|
+
"columns": columns,
|
|
1649
|
+
"delimiter": delimiter,
|
|
1650
|
+
"parse": parse,
|
|
1651
|
+
"property": property,
|
|
1652
|
+
"type": type,
|
|
1653
|
+
}
|
|
1654
|
+
defined: dict[str, Any] = {
|
|
1655
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
1656
|
+
}
|
|
1657
|
+
return core.DataFormat(**defined)
|
|
1658
|
+
|
|
1659
|
+
|
|
1660
|
+
def view(
|
|
1661
|
+
*,
|
|
1662
|
+
fill: str | UndefinedType = Undefined,
|
|
1663
|
+
fillOpacity: float | UndefinedType = Undefined,
|
|
1664
|
+
shadowBlur: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1665
|
+
shadowColor: str | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1666
|
+
shadowOffsetX: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1667
|
+
shadowOffsetY: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1668
|
+
shadowOpacity: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1669
|
+
stroke: str | UndefinedType = Undefined,
|
|
1670
|
+
strokeOpacity: float | UndefinedType = Undefined,
|
|
1671
|
+
strokeWidth: float | UndefinedType = Undefined,
|
|
1672
|
+
strokeZindex: float | UndefinedType = Undefined,
|
|
1673
|
+
style: str | Sequence[str] | UndefinedType = Undefined,
|
|
1674
|
+
zindex: float | UndefinedType = Undefined,
|
|
1675
|
+
) -> core.ViewBackground:
|
|
1676
|
+
"""Create a view background configuration.
|
|
1677
|
+
|
|
1678
|
+
Args:
|
|
1679
|
+
fill (str): Fill color of the view background.
|
|
1680
|
+
fillOpacity (float): Opacity of the view background fill.
|
|
1681
|
+
shadowBlur (float | ExprRef | dict[str, Any]): The blur radius of the drop shadow in pixels. Higher values produce a more diffuse shadow. **Default value:** ``0``
|
|
1682
|
+
shadowColor (str | ExprRef | dict[str, Any]): The color of the drop shadow. Any valid CSS color string is allowed. **Default value:** ``"black"``
|
|
1683
|
+
shadowOffsetX (float | ExprRef | dict[str, Any]): The horizontal offset of the drop shadow in pixels. Positive values move the shadow to the right. **Default value:** ``0``
|
|
1684
|
+
shadowOffsetY (float | ExprRef | dict[str, Any]): The vertical offset of the drop shadow in pixels. Positive values move the shadow downward. **Default value:** ``0``
|
|
1685
|
+
shadowOpacity (float | ExprRef | dict[str, Any]): The opacity of the drop shadow. Value between ``0`` (fully transparent) and ``1`` (fully opaque). **Default value:** ``0`` (disabled)
|
|
1686
|
+
stroke (str): Stroke color of the view background.
|
|
1687
|
+
strokeOpacity (float): Opacity of the view background stroke.
|
|
1688
|
+
strokeWidth (float): Stroke width of the view background border.
|
|
1689
|
+
strokeZindex (float): Z-order of the background stroke relative to the view content. Values greater than ``0`` render after the view marks. Values less than or equal to ``0`` render before the marks. __Default value:__ ``0``, or ``10`` when the view content is clipped or scrollable.
|
|
1690
|
+
style (str | Sequence[str]): Named style reference(s) resolved from ``config.style``. If an array is provided, later styles override earlier ones. __Default value:__ ``"cell"``
|
|
1691
|
+
zindex (float): Z-order of the background fill relative to the view content. Values greater than ``0`` render after the view marks. Values less than or equal to ``0`` render before the marks. __Default value:__ ``0``
|
|
1692
|
+
"""
|
|
1693
|
+
properties = {
|
|
1694
|
+
"fill": fill,
|
|
1695
|
+
"fillOpacity": fillOpacity,
|
|
1696
|
+
"shadowBlur": shadowBlur,
|
|
1697
|
+
"shadowColor": shadowColor,
|
|
1698
|
+
"shadowOffsetX": shadowOffsetX,
|
|
1699
|
+
"shadowOffsetY": shadowOffsetY,
|
|
1700
|
+
"shadowOpacity": shadowOpacity,
|
|
1701
|
+
"stroke": stroke,
|
|
1702
|
+
"strokeOpacity": strokeOpacity,
|
|
1703
|
+
"strokeWidth": strokeWidth,
|
|
1704
|
+
"strokeZindex": strokeZindex,
|
|
1705
|
+
"style": style,
|
|
1706
|
+
"zindex": zindex,
|
|
1707
|
+
}
|
|
1708
|
+
defined: dict[str, Any] = {
|
|
1709
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
1710
|
+
}
|
|
1711
|
+
return core.ViewBackground(**defined)
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
def view_config(
|
|
1715
|
+
*,
|
|
1716
|
+
continuousHeight: float | UndefinedType = Undefined,
|
|
1717
|
+
continuousWidth: float | UndefinedType = Undefined,
|
|
1718
|
+
discreteHeight: float | core.Step | StepKwds | UndefinedType = Undefined,
|
|
1719
|
+
discreteWidth: float | core.Step | StepKwds | UndefinedType = Undefined,
|
|
1720
|
+
fill: str | UndefinedType = Undefined,
|
|
1721
|
+
fillOpacity: float | UndefinedType = Undefined,
|
|
1722
|
+
shadowBlur: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1723
|
+
shadowColor: str | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1724
|
+
shadowOffsetX: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1725
|
+
shadowOffsetY: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1726
|
+
shadowOpacity: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1727
|
+
step: float | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
|
|
1728
|
+
stroke: str | UndefinedType = Undefined,
|
|
1729
|
+
strokeOpacity: float | UndefinedType = Undefined,
|
|
1730
|
+
strokeWidth: float | UndefinedType = Undefined,
|
|
1731
|
+
strokeZindex: float | UndefinedType = Undefined,
|
|
1732
|
+
zindex: float | UndefinedType = Undefined,
|
|
1733
|
+
) -> core.ViewConfig:
|
|
1734
|
+
"""Create a top-level view config object.
|
|
1735
|
+
|
|
1736
|
+
Args:
|
|
1737
|
+
continuousHeight (float): The default height when the view has a continuous y scale. __Default value:__ ``"container"``
|
|
1738
|
+
continuousWidth (float): The default width when the view has a continuous x scale. __Default value:__ ``"container"``
|
|
1739
|
+
discreteHeight (float | Step | StepKwds): The default height when the view has a discrete y scale or no y scale. This may be a fixed height or a step size for each discrete domain value. __Default value:__ ``"container"``
|
|
1740
|
+
discreteWidth (float | Step | StepKwds): The default width when the view has a discrete x scale or no x scale. This may be a fixed width or a step size for each discrete domain value. __Default value:__ ``"container"``
|
|
1741
|
+
fill (str): Fill color of the view background.
|
|
1742
|
+
fillOpacity (float): Opacity of the view background fill.
|
|
1743
|
+
shadowBlur (float | ExprRef | dict[str, Any]): The blur radius of the drop shadow in pixels. Higher values produce a more diffuse shadow. **Default value:** ``0``
|
|
1744
|
+
shadowColor (str | ExprRef | dict[str, Any]): The color of the drop shadow. Any valid CSS color string is allowed. **Default value:** ``"black"``
|
|
1745
|
+
shadowOffsetX (float | ExprRef | dict[str, Any]): The horizontal offset of the drop shadow in pixels. Positive values move the shadow to the right. **Default value:** ``0``
|
|
1746
|
+
shadowOffsetY (float | ExprRef | dict[str, Any]): The vertical offset of the drop shadow in pixels. Positive values move the shadow downward. **Default value:** ``0``
|
|
1747
|
+
shadowOpacity (float | ExprRef | dict[str, Any]): The opacity of the drop shadow. Value between ``0`` (fully transparent) and ``1`` (fully opaque). **Default value:** ``0`` (disabled)
|
|
1748
|
+
step (float | ExprRef | dict[str, Any]): Default step size for discrete view sizes. __Default value:__ none
|
|
1749
|
+
stroke (str): Stroke color of the view background.
|
|
1750
|
+
strokeOpacity (float): Opacity of the view background stroke.
|
|
1751
|
+
strokeWidth (float): Stroke width of the view background border.
|
|
1752
|
+
strokeZindex (float): Z-order of the stroke relative to the view content. Values greater than ``0`` render the stroke after the view marks. Values less than or equal to ``0`` render before the marks. The default value depends on the element type.
|
|
1753
|
+
zindex (float): Z-order relative to the view content. Values greater than ``0`` render after the view marks. Values less than or equal to ``0`` render before the marks. The default value depends on the element type.
|
|
1754
|
+
"""
|
|
1755
|
+
properties = {
|
|
1756
|
+
"continuousHeight": continuousHeight,
|
|
1757
|
+
"continuousWidth": continuousWidth,
|
|
1758
|
+
"discreteHeight": discreteHeight,
|
|
1759
|
+
"discreteWidth": discreteWidth,
|
|
1760
|
+
"fill": fill,
|
|
1761
|
+
"fillOpacity": fillOpacity,
|
|
1762
|
+
"shadowBlur": shadowBlur,
|
|
1763
|
+
"shadowColor": shadowColor,
|
|
1764
|
+
"shadowOffsetX": shadowOffsetX,
|
|
1765
|
+
"shadowOffsetY": shadowOffsetY,
|
|
1766
|
+
"shadowOpacity": shadowOpacity,
|
|
1767
|
+
"step": step,
|
|
1768
|
+
"stroke": stroke,
|
|
1769
|
+
"strokeOpacity": strokeOpacity,
|
|
1770
|
+
"strokeWidth": strokeWidth,
|
|
1771
|
+
"strokeZindex": strokeZindex,
|
|
1772
|
+
"zindex": zindex,
|
|
1773
|
+
}
|
|
1774
|
+
defined: dict[str, Any] = {
|
|
1775
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
1776
|
+
}
|
|
1777
|
+
return core.ViewConfig(**defined)
|
|
1778
|
+
|
|
1779
|
+
|
|
1780
|
+
def config(
|
|
1781
|
+
*,
|
|
1782
|
+
arrow: core.ArrowConfig | dict[str, Any] | UndefinedType = Undefined,
|
|
1783
|
+
axis: core.AxisConfig | AxisConfigKwds | UndefinedType = Undefined,
|
|
1784
|
+
axisBottom: core.AxisConfig | AxisConfigKwds | UndefinedType = Undefined,
|
|
1785
|
+
axisIndex: core.AxisConfig | AxisConfigKwds | UndefinedType = Undefined,
|
|
1786
|
+
axisLeft: core.AxisConfig | AxisConfigKwds | UndefinedType = Undefined,
|
|
1787
|
+
axisLocus: core.AxisConfig | AxisConfigKwds | UndefinedType = Undefined,
|
|
1788
|
+
axisNominal: core.AxisConfig | AxisConfigKwds | UndefinedType = Undefined,
|
|
1789
|
+
axisOrdinal: core.AxisConfig | AxisConfigKwds | UndefinedType = Undefined,
|
|
1790
|
+
axisQuantitative: core.AxisConfig | AxisConfigKwds | UndefinedType = Undefined,
|
|
1791
|
+
axisRight: core.AxisConfig | AxisConfigKwds | UndefinedType = Undefined,
|
|
1792
|
+
axisTop: core.AxisConfig | AxisConfigKwds | UndefinedType = Undefined,
|
|
1793
|
+
axisX: core.AxisConfig | AxisConfigKwds | UndefinedType = Undefined,
|
|
1794
|
+
axisY: core.AxisConfig | AxisConfigKwds | UndefinedType = Undefined,
|
|
1795
|
+
legend: core.LegendConfig | LegendConfigKwds | UndefinedType = Undefined,
|
|
1796
|
+
legendTrack: core.LegendConfig | LegendConfigKwds | UndefinedType = Undefined,
|
|
1797
|
+
link: core.LinkConfig | LinkConfigKwds | UndefinedType = Undefined,
|
|
1798
|
+
mark: core.MarkConfig | MarkConfigKwds | UndefinedType = Undefined,
|
|
1799
|
+
point: core.PointConfig | PointConfigKwds | UndefinedType = Undefined,
|
|
1800
|
+
range: core.RangeConfig | RangeConfigKwds | UndefinedType = Undefined,
|
|
1801
|
+
rect: core.RectConfig | RectConfigKwds | UndefinedType = Undefined,
|
|
1802
|
+
rule: core.RuleConfig | RuleConfigKwds | UndefinedType = Undefined,
|
|
1803
|
+
scale: core.ScaleConfig | ScaleConfigKwds | UndefinedType = Undefined,
|
|
1804
|
+
style: dict[str, Any] | UndefinedType = Undefined,
|
|
1805
|
+
text: core.TextConfig | TextConfigKwds | UndefinedType = Undefined,
|
|
1806
|
+
tick: core.TickConfig | dict[str, Any] | UndefinedType = Undefined,
|
|
1807
|
+
title: core.TitleConfig | TitleConfigKwds | UndefinedType = Undefined,
|
|
1808
|
+
view: core.ViewConfig | ViewConfigKwds | UndefinedType = Undefined,
|
|
1809
|
+
) -> core.GenomeSpyConfig:
|
|
1810
|
+
"""Create a top-level GenomeSpy config object.
|
|
1811
|
+
|
|
1812
|
+
Args:
|
|
1813
|
+
arrow (ArrowConfig | dict[str, Any]): Defaults for arrow marks.
|
|
1814
|
+
axis (AxisConfig | AxisConfigKwds): Defaults shared by all axes.
|
|
1815
|
+
axisBottom (AxisConfig | AxisConfigKwds): Defaults for bottom-oriented axes.
|
|
1816
|
+
axisIndex (AxisConfig | AxisConfigKwds): Defaults for axes that visualize GenomeSpy ``index`` scales.
|
|
1817
|
+
axisLeft (AxisConfig | AxisConfigKwds): Defaults for left-oriented axes.
|
|
1818
|
+
axisLocus (AxisConfig | AxisConfigKwds): Defaults for axes that visualize GenomeSpy ``locus`` scales.
|
|
1819
|
+
axisNominal (AxisConfig | AxisConfigKwds): Defaults for axes that visualize nominal data.
|
|
1820
|
+
axisOrdinal (AxisConfig | AxisConfigKwds): Defaults for axes that visualize ordinal data.
|
|
1821
|
+
axisQuantitative (AxisConfig | AxisConfigKwds): Defaults for axes that visualize quantitative data.
|
|
1822
|
+
axisRight (AxisConfig | AxisConfigKwds): Defaults for right-oriented axes.
|
|
1823
|
+
axisTop (AxisConfig | AxisConfigKwds): Defaults for top-oriented axes.
|
|
1824
|
+
axisX (AxisConfig | AxisConfigKwds): Defaults for x axes.
|
|
1825
|
+
axisY (AxisConfig | AxisConfigKwds): Defaults for y axes.
|
|
1826
|
+
legend (LegendConfig | LegendConfigKwds): Defaults shared by all legends. Set ``disable`` to ``true`` to suppress automatic legend creation by default.
|
|
1827
|
+
legendTrack (LegendConfig | LegendConfigKwds): Defaults for legends of track-like views that use ``index`` or ``locus`` scales on the x channel. __Default value:__ ``{ "style": "track-bottom-legend" }``
|
|
1828
|
+
link (LinkConfig | LinkConfigKwds): Defaults for link marks.
|
|
1829
|
+
mark (MarkConfig | MarkConfigKwds): Defaults shared by all mark types.
|
|
1830
|
+
point (PointConfig | PointConfigKwds): Defaults for point marks.
|
|
1831
|
+
range (RangeConfig | RangeConfigKwds): Named reusable ranges for channels such as ``shape``, ``size``, and color.
|
|
1832
|
+
rect (RectConfig | RectConfigKwds): Defaults for rect marks.
|
|
1833
|
+
rule (RuleConfig | RuleConfigKwds): Defaults for rule marks.
|
|
1834
|
+
scale (ScaleConfig | ScaleConfigKwds): Defaults for scale behavior and scale-type-specific buckets.
|
|
1835
|
+
style (dict[str, Any]): Named reusable style buckets that marks, axes, legends, titles, and views can reference through their ``style`` properties.
|
|
1836
|
+
text (TextConfig | TextConfigKwds): Defaults for text marks.
|
|
1837
|
+
tick (TickConfig | dict[str, Any]): Defaults for tick marks.
|
|
1838
|
+
title (TitleConfig | TitleConfigKwds): Defaults for view titles.
|
|
1839
|
+
view (ViewConfig | ViewConfigKwds): Defaults for view background styling, including fill, stroke, shadow, and z-order properties.
|
|
1840
|
+
"""
|
|
1841
|
+
properties = {
|
|
1842
|
+
"arrow": arrow,
|
|
1843
|
+
"axis": axis,
|
|
1844
|
+
"axisBottom": axisBottom,
|
|
1845
|
+
"axisIndex": axisIndex,
|
|
1846
|
+
"axisLeft": axisLeft,
|
|
1847
|
+
"axisLocus": axisLocus,
|
|
1848
|
+
"axisNominal": axisNominal,
|
|
1849
|
+
"axisOrdinal": axisOrdinal,
|
|
1850
|
+
"axisQuantitative": axisQuantitative,
|
|
1851
|
+
"axisRight": axisRight,
|
|
1852
|
+
"axisTop": axisTop,
|
|
1853
|
+
"axisX": axisX,
|
|
1854
|
+
"axisY": axisY,
|
|
1855
|
+
"legend": legend,
|
|
1856
|
+
"legendTrack": legendTrack,
|
|
1857
|
+
"link": link,
|
|
1858
|
+
"mark": mark,
|
|
1859
|
+
"point": point,
|
|
1860
|
+
"range": range,
|
|
1861
|
+
"rect": rect,
|
|
1862
|
+
"rule": rule,
|
|
1863
|
+
"scale": scale,
|
|
1864
|
+
"style": style,
|
|
1865
|
+
"text": text,
|
|
1866
|
+
"tick": tick,
|
|
1867
|
+
"title": title,
|
|
1868
|
+
"view": view,
|
|
1869
|
+
}
|
|
1870
|
+
defined: dict[str, Any] = {
|
|
1871
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
1872
|
+
}
|
|
1873
|
+
if isinstance(defined.get("view"), core.ViewBackground):
|
|
1874
|
+
defined["view"] = core.ViewConfig(**defined["view"].to_dict(validate=False))
|
|
1875
|
+
return core.GenomeSpyConfig(**defined)
|
|
1876
|
+
|
|
1877
|
+
|
|
1878
|
+
def binding(
|
|
1879
|
+
*,
|
|
1880
|
+
autocomplete: str | UndefinedType = Undefined,
|
|
1881
|
+
debounce: float | UndefinedType = Undefined,
|
|
1882
|
+
description: str | UndefinedType = Undefined,
|
|
1883
|
+
input: Literal["text", "number", "color"] | UndefinedType = Undefined,
|
|
1884
|
+
name: str | UndefinedType = Undefined,
|
|
1885
|
+
placeholder: str | UndefinedType = Undefined,
|
|
1886
|
+
) -> core.BindInput:
|
|
1887
|
+
"""Create a generic input binding.
|
|
1888
|
+
|
|
1889
|
+
Args:
|
|
1890
|
+
autocomplete (str): A hint for form autofill. See the HTML autocomplete attribute for additional information.
|
|
1891
|
+
debounce (float): If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.
|
|
1892
|
+
description (str): An optional description or help text that is shown below the input element.
|
|
1893
|
+
input (Literal['text', 'number', 'color']): The type of input element to use. The valid values are ``"checkbox"``, ``"radio"``, ``"range"``, ``"select"``, ``"text"``, ``"number"``, and ``"color"``.
|
|
1894
|
+
name (str): By default, the parameter name is used to label input elements. This ``name`` property can be used instead to specify a custom label for the bound parameter.
|
|
1895
|
+
placeholder (str): Text that appears in the form control when it has no value set.
|
|
1896
|
+
"""
|
|
1897
|
+
properties = {
|
|
1898
|
+
"autocomplete": autocomplete,
|
|
1899
|
+
"debounce": debounce,
|
|
1900
|
+
"description": description,
|
|
1901
|
+
"input": input,
|
|
1902
|
+
"name": name,
|
|
1903
|
+
"placeholder": placeholder,
|
|
1904
|
+
}
|
|
1905
|
+
defined: dict[str, Any] = {
|
|
1906
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
1907
|
+
}
|
|
1908
|
+
return core.BindInput(**defined)
|
|
1909
|
+
|
|
1910
|
+
|
|
1911
|
+
def binding_checkbox(
|
|
1912
|
+
*,
|
|
1913
|
+
debounce: float | UndefinedType = Undefined,
|
|
1914
|
+
description: str | UndefinedType = Undefined,
|
|
1915
|
+
name: str | UndefinedType = Undefined,
|
|
1916
|
+
) -> core.BindCheckbox:
|
|
1917
|
+
"""Create a checkbox input binding.
|
|
1918
|
+
|
|
1919
|
+
Args:
|
|
1920
|
+
debounce (float): If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.
|
|
1921
|
+
description (str): An optional description or help text that is shown below the input element.
|
|
1922
|
+
name (str): By default, the parameter name is used to label input elements. This ``name`` property can be used instead to specify a custom label for the bound parameter.
|
|
1923
|
+
"""
|
|
1924
|
+
properties = {
|
|
1925
|
+
"input": "checkbox",
|
|
1926
|
+
"debounce": debounce,
|
|
1927
|
+
"description": description,
|
|
1928
|
+
"name": name,
|
|
1929
|
+
}
|
|
1930
|
+
defined: dict[str, Any] = {
|
|
1931
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
1932
|
+
}
|
|
1933
|
+
return core.BindCheckbox(**defined)
|
|
1934
|
+
|
|
1935
|
+
|
|
1936
|
+
def binding_radio(
|
|
1937
|
+
*,
|
|
1938
|
+
debounce: float | UndefinedType = Undefined,
|
|
1939
|
+
description: str | UndefinedType = Undefined,
|
|
1940
|
+
labels: Sequence[str] | UndefinedType = Undefined,
|
|
1941
|
+
name: str | UndefinedType = Undefined,
|
|
1942
|
+
options: Sequence[Any] | UndefinedType = Undefined,
|
|
1943
|
+
) -> core.BindRadioSelect:
|
|
1944
|
+
"""Create a radio input binding.
|
|
1945
|
+
|
|
1946
|
+
Args:
|
|
1947
|
+
debounce (float): If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.
|
|
1948
|
+
description (str): An optional description or help text that is shown below the input element.
|
|
1949
|
+
labels (Sequence[str]): An array of label strings to represent the ``options`` values. If unspecified, the ``options`` value will be coerced to a string and used as the label.
|
|
1950
|
+
name (str): By default, the parameter name is used to label input elements. This ``name`` property can be used instead to specify a custom label for the bound parameter.
|
|
1951
|
+
options (Sequence[Any]): An array of options to select from.
|
|
1952
|
+
"""
|
|
1953
|
+
properties = {
|
|
1954
|
+
"input": "radio",
|
|
1955
|
+
"debounce": debounce,
|
|
1956
|
+
"description": description,
|
|
1957
|
+
"labels": labels,
|
|
1958
|
+
"name": name,
|
|
1959
|
+
"options": options,
|
|
1960
|
+
}
|
|
1961
|
+
defined: dict[str, Any] = {
|
|
1962
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
1963
|
+
}
|
|
1964
|
+
return core.BindRadioSelect(**defined)
|
|
1965
|
+
|
|
1966
|
+
|
|
1967
|
+
def binding_range(
|
|
1968
|
+
*,
|
|
1969
|
+
debounce: float | UndefinedType = Undefined,
|
|
1970
|
+
description: str | UndefinedType = Undefined,
|
|
1971
|
+
max: float | UndefinedType = Undefined,
|
|
1972
|
+
min: float | UndefinedType = Undefined,
|
|
1973
|
+
name: str | UndefinedType = Undefined,
|
|
1974
|
+
step: float | UndefinedType = Undefined,
|
|
1975
|
+
) -> core.BindRange:
|
|
1976
|
+
"""Create a range input binding.
|
|
1977
|
+
|
|
1978
|
+
Args:
|
|
1979
|
+
debounce (float): If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.
|
|
1980
|
+
description (str): An optional description or help text that is shown below the input element.
|
|
1981
|
+
max (float): Sets the maximum slider value. Defaults to the larger of the signal value and ``100``.
|
|
1982
|
+
min (float): Sets the minimum slider value. Defaults to the smaller of the signal value and ``0``.
|
|
1983
|
+
name (str): By default, the parameter name is used to label input elements. This ``name`` property can be used instead to specify a custom label for the bound parameter.
|
|
1984
|
+
step (float): Sets the minimum slider increment. If undefined, the step size will be automatically determined based on the ``min`` and ``max`` values.
|
|
1985
|
+
"""
|
|
1986
|
+
properties = {
|
|
1987
|
+
"input": "range",
|
|
1988
|
+
"debounce": debounce,
|
|
1989
|
+
"description": description,
|
|
1990
|
+
"max": max,
|
|
1991
|
+
"min": min,
|
|
1992
|
+
"name": name,
|
|
1993
|
+
"step": step,
|
|
1994
|
+
}
|
|
1995
|
+
defined: dict[str, Any] = {
|
|
1996
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
1997
|
+
}
|
|
1998
|
+
return core.BindRange(**defined)
|
|
1999
|
+
|
|
2000
|
+
|
|
2001
|
+
def binding_select(
|
|
2002
|
+
*,
|
|
2003
|
+
debounce: float | UndefinedType = Undefined,
|
|
2004
|
+
description: str | UndefinedType = Undefined,
|
|
2005
|
+
labels: Sequence[str] | UndefinedType = Undefined,
|
|
2006
|
+
name: str | UndefinedType = Undefined,
|
|
2007
|
+
options: Sequence[Any] | UndefinedType = Undefined,
|
|
2008
|
+
) -> core.BindRadioSelect:
|
|
2009
|
+
"""Create a select input binding.
|
|
2010
|
+
|
|
2011
|
+
Args:
|
|
2012
|
+
debounce (float): If defined, delays event handling until the specified milliseconds have elapsed since the last event was fired.
|
|
2013
|
+
description (str): An optional description or help text that is shown below the input element.
|
|
2014
|
+
labels (Sequence[str]): An array of label strings to represent the ``options`` values. If unspecified, the ``options`` value will be coerced to a string and used as the label.
|
|
2015
|
+
name (str): By default, the parameter name is used to label input elements. This ``name`` property can be used instead to specify a custom label for the bound parameter.
|
|
2016
|
+
options (Sequence[Any]): An array of options to select from.
|
|
2017
|
+
"""
|
|
2018
|
+
properties = {
|
|
2019
|
+
"input": "select",
|
|
2020
|
+
"debounce": debounce,
|
|
2021
|
+
"description": description,
|
|
2022
|
+
"labels": labels,
|
|
2023
|
+
"name": name,
|
|
2024
|
+
"options": options,
|
|
2025
|
+
}
|
|
2026
|
+
defined: dict[str, Any] = {
|
|
2027
|
+
key: value for key, value in properties.items() if value is not Undefined
|
|
2028
|
+
}
|
|
2029
|
+
return core.BindRadioSelect(**defined)
|
|
2030
|
+
|
|
2031
|
+
|
|
2032
|
+
__all__ = [
|
|
2033
|
+
"Locus",
|
|
2034
|
+
"locus",
|
|
2035
|
+
"compare",
|
|
2036
|
+
"datum",
|
|
2037
|
+
"value",
|
|
2038
|
+
"title",
|
|
2039
|
+
"dynamic_opacity",
|
|
2040
|
+
"data_format",
|
|
2041
|
+
"view",
|
|
2042
|
+
"view_config",
|
|
2043
|
+
"config",
|
|
2044
|
+
"binding",
|
|
2045
|
+
"binding_checkbox",
|
|
2046
|
+
"binding_radio",
|
|
2047
|
+
"binding_range",
|
|
2048
|
+
"binding_select",
|
|
2049
|
+
"param",
|
|
2050
|
+
"ruler",
|
|
2051
|
+
"selection_interval",
|
|
2052
|
+
"selection_point",
|
|
2053
|
+
"DatumChannelMethodMixin",
|
|
2054
|
+
"LocusChannelMethodMixin",
|
|
2055
|
+
"ValueChannelMethodMixin",
|
|
2056
|
+
]
|