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.
Files changed (64) hide show
  1. genome_spy/__init__.py +199 -0
  2. genome_spy/_chart_authoring.py +231 -0
  3. genome_spy/_conditions.py +72 -0
  4. genome_spy/_embed.py +87 -0
  5. genome_spy/_expressions.py +271 -0
  6. genome_spy/_parameters.py +267 -0
  7. genome_spy/_render.py +207 -0
  8. genome_spy/_utils.py +75 -0
  9. genome_spy/_widget.py +262 -0
  10. genome_spy/api.py +198 -0
  11. genome_spy/arrow.py +155 -0
  12. genome_spy/channels.py +193 -0
  13. genome_spy/chart.py +1240 -0
  14. genome_spy/data.py +56 -0
  15. genome_spy/data_transformers.py +267 -0
  16. genome_spy/datasets/__init__.py +189 -0
  17. genome_spy/datasets/_airway.py +219 -0
  18. genome_spy/datasets/_annotations.py +37 -0
  19. genome_spy/datasets/_gistic.py +43 -0
  20. genome_spy/datasets/_grammar.py +66 -0
  21. genome_spy/datasets/_hapmap.py +180 -0
  22. genome_spy/datasets/_mutation.py +289 -0
  23. genome_spy/datasets/_oncoprint.py +523 -0
  24. genome_spy/datasets/data/airway_metadata.csv +9 -0
  25. genome_spy/datasets/data/airway_scaledcounts.csv +38695 -0
  26. genome_spy/datasets/data/brca.maf.gz +0 -0
  27. genome_spy/datasets/data/hapmap_gwas.csv +14413 -0
  28. genome_spy/datasets/data/mutation_impact_reference.json +27 -0
  29. genome_spy/datasets/data/oncoprint_dataset3.json +266 -0
  30. genome_spy/datasets/data/p53_sequence_comparison.json.gz +0 -0
  31. genome_spy/datasets/data/pik3ca_mutations.json +1 -0
  32. genome_spy/datasets/data/pik3ca_tcga_brca_lollipop.json +38 -0
  33. genome_spy/datasets/data/refseq_gene_bodies.csv.gz +0 -0
  34. genome_spy/datasets/data/tal1_alphagenome_reference.json.gz +0 -0
  35. genome_spy/datasets/data/tcga.tsv +146 -0
  36. genome_spy/datasets/data/tcga_laml.maf.gz +0 -0
  37. genome_spy/datasets/data/tcga_laml_annot.tsv +201 -0
  38. genome_spy/datasets/data/tcga_laml_combined_oncoplot.json.gz +0 -0
  39. genome_spy/datasets/data/tcga_ov_gistic_lesions.tsv.gz +0 -0
  40. genome_spy/datasets/data/tcga_ov_gistic_scores.tsv.gz +0 -0
  41. genome_spy/helpers.py +185 -0
  42. genome_spy/jupyter.py +5 -0
  43. genome_spy/py.typed +0 -0
  44. genome_spy/schema/__init__.py +784 -0
  45. genome_spy/schema/_kwds.py +1394 -0
  46. genome_spy/schema/_typing.py +186 -0
  47. genome_spy/schema/capabilities.json +593 -0
  48. genome_spy/schema/channels.py +8943 -0
  49. genome_spy/schema/composition.py +1064 -0
  50. genome_spy/schema/core.py +51821 -0
  51. genome_spy/schema/ergonomics.py +2056 -0
  52. genome_spy/schema/expressions.py +476 -0
  53. genome_spy/schema/genome-spy-schema.json +33657 -0
  54. genome_spy/schema/lazy.py +326 -0
  55. genome_spy/schema/mixins.py +11684 -0
  56. genome_spy/schemapi.py +264 -0
  57. genome_spy/static/widget.js +345 -0
  58. genome_spy_python-0.1.0.dist-info/METADATA +185 -0
  59. genome_spy_python-0.1.0.dist-info/RECORD +64 -0
  60. genome_spy_python-0.1.0.dist-info/WHEEL +4 -0
  61. genome_spy_python-0.1.0.dist-info/licenses/LICENSE +21 -0
  62. genome_spy_python-0.1.0.dist-info/licenses/LICENSES/ALTAIR-BSD-3-Clause.txt +27 -0
  63. genome_spy_python-0.1.0.dist-info/licenses/LICENSES/GALLERY-DATA-MIT.txt +22 -0
  64. genome_spy_python-0.1.0.dist-info/licenses/THIRD_PARTY_NOTICES.md +42 -0
@@ -0,0 +1,1064 @@
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, cast, Literal
6
+
7
+ from typing import TYPE_CHECKING
8
+
9
+ if TYPE_CHECKING:
10
+ from genome_spy.chart import (
11
+ ConcatChart,
12
+ HConcatChart,
13
+ ImportedView,
14
+ LayerChart,
15
+ MultiscaleChart,
16
+ TopLevelSpec,
17
+ VConcatChart,
18
+ )
19
+
20
+ from genome_spy.schema._typing import BuiltInThemeName_T
21
+ from genome_spy.schema._kwds import (
22
+ AxesKwds,
23
+ DynamicOpacityKwds,
24
+ EncodingKwds,
25
+ GenomeSpyConfigKwds,
26
+ LegendsKwds,
27
+ PaddingsKwds,
28
+ ResolveKwds,
29
+ ScalesKwds,
30
+ SeparatorPropsKwds,
31
+ SizeDefKwds,
32
+ StepKwds,
33
+ TitleKwds,
34
+ ViewBackgroundKwds,
35
+ )
36
+ from genome_spy.schemapi import Undefined, UndefinedType
37
+ from genome_spy.schema import core
38
+
39
+
40
+ def layer(
41
+ *charts: TopLevelSpec | ImportedView,
42
+ assembly: str | UndefinedType = Undefined,
43
+ axes: AxesKwds | UndefinedType = Undefined,
44
+ background: str | UndefinedType = Undefined,
45
+ baseUrl: str | UndefinedType = Undefined,
46
+ config: core.GenomeSpyConfig | GenomeSpyConfigKwds | UndefinedType = Undefined,
47
+ cursor: str | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
48
+ data: Any | UndefinedType = Undefined,
49
+ datasets: dict[str, Any] | UndefinedType = Undefined,
50
+ description: str | Sequence[str] | UndefinedType = Undefined,
51
+ domainInert: bool | UndefinedType = Undefined,
52
+ encoding: core.Encoding | EncodingKwds | UndefinedType = Undefined,
53
+ genome: core.UrlGenomeConfig
54
+ | dict[str, Any]
55
+ | core.InlineGenomeConfig
56
+ | core.GenomeConfigBase
57
+ | UndefinedType = Undefined,
58
+ genomes: dict[str, Any] | UndefinedType = Undefined,
59
+ height: core.SizeDef
60
+ | SizeDefKwds
61
+ | float
62
+ | core.Step
63
+ | StepKwds
64
+ | core.ExprRef
65
+ | dict[str, Any]
66
+ | Literal["container"]
67
+ | UndefinedType = Undefined,
68
+ legends: LegendsKwds | UndefinedType = Undefined,
69
+ name: str | UndefinedType = Undefined,
70
+ opacity: float
71
+ | core.DynamicOpacity
72
+ | DynamicOpacityKwds
73
+ | core.ExprRef
74
+ | dict[str, Any]
75
+ | UndefinedType = Undefined,
76
+ overhang: core.OverhangConfig | dict[str, Any] | UndefinedType = Undefined,
77
+ padding: core.Paddings | PaddingsKwds | float | UndefinedType = Undefined,
78
+ params: Sequence[
79
+ core.PlainValueParameter
80
+ | dict[str, Any]
81
+ | core.TransitionedValueParameter
82
+ | core.ExprParameter
83
+ | core.SelectionParameter
84
+ | core.RulerParameter
85
+ ]
86
+ | UndefinedType = Undefined,
87
+ resolve: ResolveKwds | UndefinedType = Undefined,
88
+ scales: ScalesKwds | UndefinedType = Undefined,
89
+ templates: dict[str, Any] | UndefinedType = Undefined,
90
+ theme: BuiltInThemeName_T
91
+ | Sequence[BuiltInThemeName_T]
92
+ | UndefinedType = Undefined,
93
+ title: str | core.Title | TitleKwds | UndefinedType = Undefined,
94
+ transform: Sequence[
95
+ core.AlignmentMismatchesParams
96
+ | dict[str, Any]
97
+ | core.AggregateParams
98
+ | core.CollectParams
99
+ | core.CoverageParams
100
+ | core.CoordinateLookupParams
101
+ | core.CrossParams
102
+ | core.Displace1DParams
103
+ | core.FlattenDelimitedParams
104
+ | core.FormulaParams
105
+ | core.LookupParams
106
+ | core.ExprFilterParams
107
+ | core.SelectionFilterParams
108
+ | core.AxisLabelLayoutParams
109
+ | core.FilterScoredLabelsParams
110
+ | core.FlattenParams
111
+ | core.FlattenCompressedExonsParams
112
+ | core.FlattenCigarParams
113
+ | core.FlattenSequenceParams
114
+ | core.IdentifierParams
115
+ | core.LinearizeGenomicCoordinateParams
116
+ | core.MeasureTextParams
117
+ | core.TruncateTextParams
118
+ | core.PackLegendLabelsParams
119
+ | core.MergeFacetsParams
120
+ | core.PileupParams
121
+ | core.ProjectParams
122
+ | core.RegexExtractParams
123
+ | core.RegexFoldParams
124
+ | core.SampleParams
125
+ | core.SetIntersectionParams
126
+ | core.StackParams
127
+ | core.WindowParams
128
+ ]
129
+ | UndefinedType = Undefined,
130
+ view: core.ViewBackground | ViewBackgroundKwds | UndefinedType = Undefined,
131
+ viewportHeight: core.SizeDef
132
+ | SizeDefKwds
133
+ | float
134
+ | core.ExprRef
135
+ | dict[str, Any]
136
+ | Literal["container"]
137
+ | UndefinedType = Undefined,
138
+ viewportWidth: core.SizeDef
139
+ | SizeDefKwds
140
+ | float
141
+ | core.ExprRef
142
+ | dict[str, Any]
143
+ | Literal["container"]
144
+ | UndefinedType = Undefined,
145
+ visible: bool | UndefinedType = Undefined,
146
+ width: core.SizeDef
147
+ | SizeDefKwds
148
+ | float
149
+ | core.Step
150
+ | StepKwds
151
+ | core.ExprRef
152
+ | dict[str, Any]
153
+ | Literal["container"]
154
+ | UndefinedType = Undefined,
155
+ zindex: float | UndefinedType = Undefined,
156
+ ) -> LayerChart:
157
+ """Return a layer composition of the given charts.
158
+
159
+ Args:
160
+ assembly (str): Default assembly for locus scales that do not define ``scale.assembly``. Can reference either a key in ``genomes`` or a built-in assembly name.
161
+ axes (AxesKwds): Defines properties for axis resolutions used by this view subtree. Use this when a composed view shares an axis across child views and the axis settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.
162
+ background (str): Background color of the canvas.
163
+ baseUrl (str): The base URL for relative URL data sources and URL imports. The base URLs are inherited in the view hierarchy unless overridden with this property. By default, the top-level view's base URL equals to the visualization specification's base URL.
164
+ config (GenomeSpyConfig | GenomeSpyConfigKwds): Configures defaults for this view subtree. Properties in child views override properties inherited from ancestors.
165
+ cursor (str | ExprRef | dict[str, Any]): Mouse cursor shown while the pointer is inside the view. The deepest matching cursor wins: mark cursor first, then the pointed view, then ancestor views outward toward the root. __Default value:__ browser default
166
+ data (Any): Specifies a data source. If omitted, the data source is inherited from the parent view.
167
+ datasets (dict[str, Any]): Named datasets available to this view and its descendants. A descendant declaration with the same name shadows this declaration. Declare named data here to establish reliable lexical scope and enable scoped runtime updates.
168
+ description (str | Sequence[str]): A description of the view. Can be used for documentation. The description of the top-level view is shown in the toolbar of the GenomeSpy App.
169
+ domainInert (bool): If true, this view and its descendants do not contribute to scale domains. Child views inherit this flag automatically. **Default value:** ``false``
170
+ encoding (Encoding | EncodingKwds): Specifies how data are encoded using the visual channels.
171
+ genome (UrlGenomeConfig | dict[str, Any] | InlineGenomeConfig | GenomeConfigBase): Schema-defined ``genome`` property.
172
+ genomes (dict[str, Any]): Named genome assembly definitions. Each object key is the assembly name.
173
+ height (SizeDef | SizeDefKwds | float | Step | StepKwds | ExprRef | dict[str, Any] | Literal['container']): Height of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or ``"container"``. Check child sizing for details. **Default value:** ``"container"``
174
+ legends (LegendsKwds): Defines properties for legend resolutions used by this view subtree. Use this when a composed view shares a legend across child views and the legend settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.
175
+ name (str): An explicit name used to address the view. It is recommended to keep names unique among siblings. In the App (where view state is bookmarkable), the name must be unique within its import scope for views with configurable visibility, etc.
176
+ opacity (float | DynamicOpacity | DynamicOpacityKwds | ExprRef | dict[str, Any]): Opacity of the view and all its children. This can be: - a fixed number between ``0`` and ``1`` - an expression reference (``ExprRef``) - a ``DynamicOpacity`` definition for zoom-dependent opacity Dynamic opacity is useful for semantic zooming where layers are faded in and out as the user zooms. Example: ```json "opacity": { "unitsPerPixel": [100000, 40000], "values": [0, 1] } ``` In this example, the view fades in while zooming in from 100 000 to 40 000 units per pixel. __Default value:__ ``1.0``
177
+ overhang (OverhangConfig | dict[str, Any]): Controls whether external overhang on each edge reserves layout space. Setting an edge to false lets axes, titles, legends, or custom view overhang overlap nearby content while remaining visible. **Default value:** all edges reserve overhang
178
+ padding (Paddings | PaddingsKwds | float): Padding applied to the view. Accepts either a number representing pixels or an object specifying separate paddings for each edge. Examples: - ``padding: 10`` - ``padding: { top: 10, right: 20, bottom: 10, left: 20 }`` **Default value:** ``0``
179
+ params (Sequence[PlainValueParameter | dict[str, Any] | TransitionedValueParameter | ExprParameter | SelectionParameter | RulerParameter]): Dynamic variables that parameterize a visualization.
180
+ resolve (ResolveKwds): Specifies how scales, axes, and legends are resolved in the view hierarchy. If legend resolution is not configured explicitly, it follows the corresponding scale resolution.
181
+ scales (ScalesKwds): Defines properties for scale resolutions used by this view subtree. Use this when a composed view shares a scale across child views and the scale settings, such as the visible domain, belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error. Expression references in these scale properties use this view's parameter scope and can access parameters declared here or on ancestors.
182
+ templates (dict[str, Any]): Schema-defined ``templates`` property.
183
+ theme (BuiltInThemeName_T | Sequence[BuiltInThemeName_T]): Selects built-in theme preset(s) for the whole visualization.
184
+ title (str | Title | TitleKwds): View title.
185
+ transform (Sequence[AlignmentMismatchesParams | dict[str, Any] | AggregateParams | CollectParams | CoverageParams | CoordinateLookupParams | CrossParams | Displace1DParams | FlattenDelimitedParams | FormulaParams | LookupParams | ExprFilterParams | SelectionFilterParams | AxisLabelLayoutParams | FilterScoredLabelsParams | FlattenParams | FlattenCompressedExonsParams | FlattenCigarParams | FlattenSequenceParams | IdentifierParams | LinearizeGenomicCoordinateParams | MeasureTextParams | TruncateTextParams | PackLegendLabelsParams | MergeFacetsParams | PileupParams | ProjectParams | RegexExtractParams | RegexFoldParams | SampleParams | SetIntersectionParams | StackParams | WindowParams]): An array of transformations applied to the data before visual encoding.
186
+ view (ViewBackground | ViewBackgroundKwds): Schema-defined ``view`` property.
187
+ viewportHeight (SizeDef | SizeDefKwds | float | ExprRef | dict[str, Any] | Literal['container']): Optional viewport height of the view. If the view size exceeds the viewport height, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or ``"container"``. **Default:** ``null`` (same as ``height``)
188
+ viewportWidth (SizeDef | SizeDefKwds | float | ExprRef | dict[str, Any] | Literal['container']): Optional viewport width of the view. If the view size exceeds the viewport width, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or ``"container"``. **Default:** ``null`` (same as ``width``)
189
+ visible (bool): The default visibility of the view. An invisible view is removed from the layout and not rendered. For context, see toggleable view visibility. **Default:** ``true``
190
+ width (SizeDef | SizeDefKwds | float | Step | StepKwds | ExprRef | dict[str, Any] | Literal['container']): Width of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or ``"container"``. Check child sizing for details. **Default:** ``"container"``
191
+ zindex (float): Z-order among sibling views in a composition. Higher values render later. Views with equal values render in declaration order. This does not affect layout order. __Default value:__ ``0``
192
+ """
193
+ properties = {
194
+ "assembly": assembly,
195
+ "axes": axes,
196
+ "background": background,
197
+ "baseUrl": baseUrl,
198
+ "config": config,
199
+ "cursor": cursor,
200
+ "data": data,
201
+ "datasets": datasets,
202
+ "description": description,
203
+ "domainInert": domainInert,
204
+ "encoding": encoding,
205
+ "genome": genome,
206
+ "genomes": genomes,
207
+ "height": height,
208
+ "legends": legends,
209
+ "name": name,
210
+ "opacity": opacity,
211
+ "overhang": overhang,
212
+ "padding": padding,
213
+ "params": params,
214
+ "resolve": resolve,
215
+ "scales": scales,
216
+ "templates": templates,
217
+ "theme": theme,
218
+ "title": title,
219
+ "transform": transform,
220
+ "view": view,
221
+ "viewportHeight": viewportHeight,
222
+ "viewportWidth": viewportWidth,
223
+ "visible": visible,
224
+ "width": width,
225
+ "zindex": zindex,
226
+ }
227
+ defined: dict[str, Any] = {
228
+ key: value for key, value in properties.items() if value is not Undefined
229
+ }
230
+ from genome_spy.chart import LayerChart
231
+
232
+ return LayerChart(layer=cast(Any, list(charts)), **defined)
233
+
234
+
235
+ def hconcat(
236
+ *charts: TopLevelSpec | ImportedView,
237
+ annotate: Sequence[core.UnitSpec | dict[str, Any] | core.LayerSpec]
238
+ | UndefinedType = Undefined,
239
+ assembly: str | UndefinedType = Undefined,
240
+ axes: AxesKwds | UndefinedType = Undefined,
241
+ background: str | UndefinedType = Undefined,
242
+ baseUrl: str | UndefinedType = Undefined,
243
+ config: core.GenomeSpyConfig | GenomeSpyConfigKwds | UndefinedType = Undefined,
244
+ cursor: str | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
245
+ data: Any | UndefinedType = Undefined,
246
+ datasets: dict[str, Any] | UndefinedType = Undefined,
247
+ description: str | Sequence[str] | UndefinedType = Undefined,
248
+ domainInert: bool | UndefinedType = Undefined,
249
+ encoding: core.Encoding | EncodingKwds | UndefinedType = Undefined,
250
+ genome: core.UrlGenomeConfig
251
+ | dict[str, Any]
252
+ | core.InlineGenomeConfig
253
+ | core.GenomeConfigBase
254
+ | UndefinedType = Undefined,
255
+ genomes: dict[str, Any] | UndefinedType = Undefined,
256
+ height: core.SizeDef
257
+ | SizeDefKwds
258
+ | float
259
+ | core.Step
260
+ | StepKwds
261
+ | core.ExprRef
262
+ | dict[str, Any]
263
+ | Literal["container"]
264
+ | UndefinedType = Undefined,
265
+ legends: LegendsKwds | UndefinedType = Undefined,
266
+ name: str | UndefinedType = Undefined,
267
+ overhang: core.OverhangConfig | dict[str, Any] | UndefinedType = Undefined,
268
+ padding: core.Paddings | PaddingsKwds | float | UndefinedType = Undefined,
269
+ params: Sequence[
270
+ core.PlainValueParameter
271
+ | dict[str, Any]
272
+ | core.TransitionedValueParameter
273
+ | core.ExprParameter
274
+ | core.SelectionParameter
275
+ | core.RulerParameter
276
+ ]
277
+ | UndefinedType = Undefined,
278
+ resolve: ResolveKwds | UndefinedType = Undefined,
279
+ scales: ScalesKwds | UndefinedType = Undefined,
280
+ separator: bool
281
+ | core.SeparatorProps
282
+ | SeparatorPropsKwds
283
+ | UndefinedType = Undefined,
284
+ spacing: float | UndefinedType = Undefined,
285
+ templates: dict[str, Any] | UndefinedType = Undefined,
286
+ theme: BuiltInThemeName_T
287
+ | Sequence[BuiltInThemeName_T]
288
+ | UndefinedType = Undefined,
289
+ title: str | core.Title | TitleKwds | UndefinedType = Undefined,
290
+ transform: Sequence[
291
+ core.AlignmentMismatchesParams
292
+ | dict[str, Any]
293
+ | core.AggregateParams
294
+ | core.CollectParams
295
+ | core.CoverageParams
296
+ | core.CoordinateLookupParams
297
+ | core.CrossParams
298
+ | core.Displace1DParams
299
+ | core.FlattenDelimitedParams
300
+ | core.FormulaParams
301
+ | core.LookupParams
302
+ | core.ExprFilterParams
303
+ | core.SelectionFilterParams
304
+ | core.AxisLabelLayoutParams
305
+ | core.FilterScoredLabelsParams
306
+ | core.FlattenParams
307
+ | core.FlattenCompressedExonsParams
308
+ | core.FlattenCigarParams
309
+ | core.FlattenSequenceParams
310
+ | core.IdentifierParams
311
+ | core.LinearizeGenomicCoordinateParams
312
+ | core.MeasureTextParams
313
+ | core.TruncateTextParams
314
+ | core.PackLegendLabelsParams
315
+ | core.MergeFacetsParams
316
+ | core.PileupParams
317
+ | core.ProjectParams
318
+ | core.RegexExtractParams
319
+ | core.RegexFoldParams
320
+ | core.SampleParams
321
+ | core.SetIntersectionParams
322
+ | core.StackParams
323
+ | core.WindowParams
324
+ ]
325
+ | UndefinedType = Undefined,
326
+ viewportHeight: core.SizeDef
327
+ | SizeDefKwds
328
+ | float
329
+ | core.ExprRef
330
+ | dict[str, Any]
331
+ | Literal["container"]
332
+ | UndefinedType = Undefined,
333
+ viewportWidth: core.SizeDef
334
+ | SizeDefKwds
335
+ | float
336
+ | core.ExprRef
337
+ | dict[str, Any]
338
+ | Literal["container"]
339
+ | UndefinedType = Undefined,
340
+ visible: bool | UndefinedType = Undefined,
341
+ width: core.SizeDef
342
+ | SizeDefKwds
343
+ | float
344
+ | core.Step
345
+ | StepKwds
346
+ | core.ExprRef
347
+ | dict[str, Any]
348
+ | Literal["container"]
349
+ | UndefinedType = Undefined,
350
+ zindex: float | UndefinedType = Undefined,
351
+ ) -> HConcatChart:
352
+ """Return a hconcat composition of the given charts.
353
+
354
+ Args:
355
+ annotate (Sequence[UnitSpec | dict[str, Any] | LayerSpec]): Schema-defined ``annotate`` property.
356
+ assembly (str): Default assembly for locus scales that do not define ``scale.assembly``. Can reference either a key in ``genomes`` or a built-in assembly name.
357
+ axes (AxesKwds): Defines properties for axis resolutions used by this view subtree. Use this when a composed view shares an axis across child views and the axis settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.
358
+ background (str): Background color of the canvas.
359
+ baseUrl (str): The base URL for relative URL data sources and URL imports. The base URLs are inherited in the view hierarchy unless overridden with this property. By default, the top-level view's base URL equals to the visualization specification's base URL.
360
+ config (GenomeSpyConfig | GenomeSpyConfigKwds): Configures defaults for this view subtree. Properties in child views override properties inherited from ancestors.
361
+ cursor (str | ExprRef | dict[str, Any]): Mouse cursor shown while the pointer is inside the view. The deepest matching cursor wins: mark cursor first, then the pointed view, then ancestor views outward toward the root. __Default value:__ browser default
362
+ data (Any): Specifies a data source. If omitted, the data source is inherited from the parent view.
363
+ datasets (dict[str, Any]): Named datasets available to this view and its descendants. A descendant declaration with the same name shadows this declaration. Declare named data here to establish reliable lexical scope and enable scoped runtime updates.
364
+ description (str | Sequence[str]): A description of the view. Can be used for documentation. The description of the top-level view is shown in the toolbar of the GenomeSpy App.
365
+ domainInert (bool): If true, this view and its descendants do not contribute to scale domains. Child views inherit this flag automatically. **Default value:** ``false``
366
+ encoding (Encoding | EncodingKwds): Specifies how data are encoded using the visual channels.
367
+ genome (UrlGenomeConfig | dict[str, Any] | InlineGenomeConfig | GenomeConfigBase): Schema-defined ``genome`` property.
368
+ genomes (dict[str, Any]): Named genome assembly definitions. Each object key is the assembly name.
369
+ height (SizeDef | SizeDefKwds | float | Step | StepKwds | ExprRef | dict[str, Any] | Literal['container']): Height of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or ``"container"``. Check child sizing for details. **Default value:** ``"container"``
370
+ legends (LegendsKwds): Defines properties for legend resolutions used by this view subtree. Use this when a composed view shares a legend across child views and the legend settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.
371
+ name (str): An explicit name used to address the view. It is recommended to keep names unique among siblings. In the App (where view state is bookmarkable), the name must be unique within its import scope for views with configurable visibility, etc.
372
+ overhang (OverhangConfig | dict[str, Any]): Controls whether external overhang on each edge reserves layout space. Setting an edge to false lets axes, titles, legends, or custom view overhang overlap nearby content while remaining visible. **Default value:** all edges reserve overhang
373
+ padding (Paddings | PaddingsKwds | float): Padding applied to the view. Accepts either a number representing pixels or an object specifying separate paddings for each edge. Examples: - ``padding: 10`` - ``padding: { top: 10, right: 20, bottom: 10, left: 20 }`` **Default value:** ``0``
374
+ params (Sequence[PlainValueParameter | dict[str, Any] | TransitionedValueParameter | ExprParameter | SelectionParameter | RulerParameter]): Dynamic variables that parameterize a visualization.
375
+ resolve (ResolveKwds): Specifies how scales, axes, and legends are resolved in the view hierarchy. If legend resolution is not configured explicitly, it follows the corresponding scale resolution.
376
+ scales (ScalesKwds): Defines properties for scale resolutions used by this view subtree. Use this when a composed view shares a scale across child views and the scale settings, such as the visible domain, belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error. Expression references in these scale properties use this view's parameter scope and can access parameters declared here or on ancestors.
377
+ separator (bool | SeparatorProps | SeparatorPropsKwds): Draws separator rules between visible child views. The separators are centered within the spacing gaps and do not affect layout. If ``true``, the defaults are equivalent to: ``{"type":"rule","size":1,"color":"#ccc","opacity":1,"strokeDash":[4,4],"strokeCap":"butt"}`` Use ``includePlotMargin`` to control whether the separators extend into the plot margin. __Default value:__ ``false``
378
+ spacing (float): The gap between the views, in pixels.
379
+ templates (dict[str, Any]): Schema-defined ``templates`` property.
380
+ theme (BuiltInThemeName_T | Sequence[BuiltInThemeName_T]): Selects built-in theme preset(s) for the whole visualization.
381
+ title (str | Title | TitleKwds): View title.
382
+ transform (Sequence[AlignmentMismatchesParams | dict[str, Any] | AggregateParams | CollectParams | CoverageParams | CoordinateLookupParams | CrossParams | Displace1DParams | FlattenDelimitedParams | FormulaParams | LookupParams | ExprFilterParams | SelectionFilterParams | AxisLabelLayoutParams | FilterScoredLabelsParams | FlattenParams | FlattenCompressedExonsParams | FlattenCigarParams | FlattenSequenceParams | IdentifierParams | LinearizeGenomicCoordinateParams | MeasureTextParams | TruncateTextParams | PackLegendLabelsParams | MergeFacetsParams | PileupParams | ProjectParams | RegexExtractParams | RegexFoldParams | SampleParams | SetIntersectionParams | StackParams | WindowParams]): An array of transformations applied to the data before visual encoding.
383
+ viewportHeight (SizeDef | SizeDefKwds | float | ExprRef | dict[str, Any] | Literal['container']): Optional viewport height of the view. If the view size exceeds the viewport height, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or ``"container"``. **Default:** ``null`` (same as ``height``)
384
+ viewportWidth (SizeDef | SizeDefKwds | float | ExprRef | dict[str, Any] | Literal['container']): Optional viewport width of the view. If the view size exceeds the viewport width, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or ``"container"``. **Default:** ``null`` (same as ``width``)
385
+ visible (bool): The default visibility of the view. An invisible view is removed from the layout and not rendered. For context, see toggleable view visibility. **Default:** ``true``
386
+ width (SizeDef | SizeDefKwds | float | Step | StepKwds | ExprRef | dict[str, Any] | Literal['container']): Width of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or ``"container"``. Check child sizing for details. **Default:** ``"container"``
387
+ zindex (float): Z-order among sibling views in a composition. Higher values render later. Views with equal values render in declaration order. This does not affect layout order. __Default value:__ ``0``
388
+ """
389
+ properties = {
390
+ "annotate": annotate,
391
+ "assembly": assembly,
392
+ "axes": axes,
393
+ "background": background,
394
+ "baseUrl": baseUrl,
395
+ "config": config,
396
+ "cursor": cursor,
397
+ "data": data,
398
+ "datasets": datasets,
399
+ "description": description,
400
+ "domainInert": domainInert,
401
+ "encoding": encoding,
402
+ "genome": genome,
403
+ "genomes": genomes,
404
+ "height": height,
405
+ "legends": legends,
406
+ "name": name,
407
+ "overhang": overhang,
408
+ "padding": padding,
409
+ "params": params,
410
+ "resolve": resolve,
411
+ "scales": scales,
412
+ "separator": separator,
413
+ "spacing": spacing,
414
+ "templates": templates,
415
+ "theme": theme,
416
+ "title": title,
417
+ "transform": transform,
418
+ "viewportHeight": viewportHeight,
419
+ "viewportWidth": viewportWidth,
420
+ "visible": visible,
421
+ "width": width,
422
+ "zindex": zindex,
423
+ }
424
+ defined: dict[str, Any] = {
425
+ key: value for key, value in properties.items() if value is not Undefined
426
+ }
427
+ from genome_spy.chart import HConcatChart
428
+
429
+ return HConcatChart(hconcat=cast(Any, list(charts)), **defined)
430
+
431
+
432
+ def vconcat(
433
+ *charts: TopLevelSpec | ImportedView,
434
+ annotate: Sequence[core.UnitSpec | dict[str, Any] | core.LayerSpec]
435
+ | UndefinedType = Undefined,
436
+ assembly: str | UndefinedType = Undefined,
437
+ axes: AxesKwds | UndefinedType = Undefined,
438
+ background: str | UndefinedType = Undefined,
439
+ baseUrl: str | UndefinedType = Undefined,
440
+ config: core.GenomeSpyConfig | GenomeSpyConfigKwds | UndefinedType = Undefined,
441
+ cursor: str | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
442
+ data: Any | UndefinedType = Undefined,
443
+ datasets: dict[str, Any] | UndefinedType = Undefined,
444
+ description: str | Sequence[str] | UndefinedType = Undefined,
445
+ domainInert: bool | UndefinedType = Undefined,
446
+ encoding: core.Encoding | EncodingKwds | UndefinedType = Undefined,
447
+ genome: core.UrlGenomeConfig
448
+ | dict[str, Any]
449
+ | core.InlineGenomeConfig
450
+ | core.GenomeConfigBase
451
+ | UndefinedType = Undefined,
452
+ genomes: dict[str, Any] | UndefinedType = Undefined,
453
+ height: core.SizeDef
454
+ | SizeDefKwds
455
+ | float
456
+ | core.Step
457
+ | StepKwds
458
+ | core.ExprRef
459
+ | dict[str, Any]
460
+ | Literal["container"]
461
+ | UndefinedType = Undefined,
462
+ legends: LegendsKwds | UndefinedType = Undefined,
463
+ name: str | UndefinedType = Undefined,
464
+ overhang: core.OverhangConfig | dict[str, Any] | UndefinedType = Undefined,
465
+ padding: core.Paddings | PaddingsKwds | float | UndefinedType = Undefined,
466
+ params: Sequence[
467
+ core.PlainValueParameter
468
+ | dict[str, Any]
469
+ | core.TransitionedValueParameter
470
+ | core.ExprParameter
471
+ | core.SelectionParameter
472
+ | core.RulerParameter
473
+ ]
474
+ | UndefinedType = Undefined,
475
+ resolve: ResolveKwds | UndefinedType = Undefined,
476
+ scales: ScalesKwds | UndefinedType = Undefined,
477
+ separator: bool
478
+ | core.SeparatorProps
479
+ | SeparatorPropsKwds
480
+ | UndefinedType = Undefined,
481
+ spacing: float | UndefinedType = Undefined,
482
+ templates: dict[str, Any] | UndefinedType = Undefined,
483
+ theme: BuiltInThemeName_T
484
+ | Sequence[BuiltInThemeName_T]
485
+ | UndefinedType = Undefined,
486
+ title: str | core.Title | TitleKwds | UndefinedType = Undefined,
487
+ transform: Sequence[
488
+ core.AlignmentMismatchesParams
489
+ | dict[str, Any]
490
+ | core.AggregateParams
491
+ | core.CollectParams
492
+ | core.CoverageParams
493
+ | core.CoordinateLookupParams
494
+ | core.CrossParams
495
+ | core.Displace1DParams
496
+ | core.FlattenDelimitedParams
497
+ | core.FormulaParams
498
+ | core.LookupParams
499
+ | core.ExprFilterParams
500
+ | core.SelectionFilterParams
501
+ | core.AxisLabelLayoutParams
502
+ | core.FilterScoredLabelsParams
503
+ | core.FlattenParams
504
+ | core.FlattenCompressedExonsParams
505
+ | core.FlattenCigarParams
506
+ | core.FlattenSequenceParams
507
+ | core.IdentifierParams
508
+ | core.LinearizeGenomicCoordinateParams
509
+ | core.MeasureTextParams
510
+ | core.TruncateTextParams
511
+ | core.PackLegendLabelsParams
512
+ | core.MergeFacetsParams
513
+ | core.PileupParams
514
+ | core.ProjectParams
515
+ | core.RegexExtractParams
516
+ | core.RegexFoldParams
517
+ | core.SampleParams
518
+ | core.SetIntersectionParams
519
+ | core.StackParams
520
+ | core.WindowParams
521
+ ]
522
+ | UndefinedType = Undefined,
523
+ viewportHeight: core.SizeDef
524
+ | SizeDefKwds
525
+ | float
526
+ | core.ExprRef
527
+ | dict[str, Any]
528
+ | Literal["container"]
529
+ | UndefinedType = Undefined,
530
+ viewportWidth: core.SizeDef
531
+ | SizeDefKwds
532
+ | float
533
+ | core.ExprRef
534
+ | dict[str, Any]
535
+ | Literal["container"]
536
+ | UndefinedType = Undefined,
537
+ visible: bool | UndefinedType = Undefined,
538
+ width: core.SizeDef
539
+ | SizeDefKwds
540
+ | float
541
+ | core.Step
542
+ | StepKwds
543
+ | core.ExprRef
544
+ | dict[str, Any]
545
+ | Literal["container"]
546
+ | UndefinedType = Undefined,
547
+ zindex: float | UndefinedType = Undefined,
548
+ ) -> VConcatChart:
549
+ """Return a vconcat composition of the given charts.
550
+
551
+ Args:
552
+ annotate (Sequence[UnitSpec | dict[str, Any] | LayerSpec]): Schema-defined ``annotate`` property.
553
+ assembly (str): Default assembly for locus scales that do not define ``scale.assembly``. Can reference either a key in ``genomes`` or a built-in assembly name.
554
+ axes (AxesKwds): Defines properties for axis resolutions used by this view subtree. Use this when a composed view shares an axis across child views and the axis settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.
555
+ background (str): Background color of the canvas.
556
+ baseUrl (str): The base URL for relative URL data sources and URL imports. The base URLs are inherited in the view hierarchy unless overridden with this property. By default, the top-level view's base URL equals to the visualization specification's base URL.
557
+ config (GenomeSpyConfig | GenomeSpyConfigKwds): Configures defaults for this view subtree. Properties in child views override properties inherited from ancestors.
558
+ cursor (str | ExprRef | dict[str, Any]): Mouse cursor shown while the pointer is inside the view. The deepest matching cursor wins: mark cursor first, then the pointed view, then ancestor views outward toward the root. __Default value:__ browser default
559
+ data (Any): Specifies a data source. If omitted, the data source is inherited from the parent view.
560
+ datasets (dict[str, Any]): Named datasets available to this view and its descendants. A descendant declaration with the same name shadows this declaration. Declare named data here to establish reliable lexical scope and enable scoped runtime updates.
561
+ description (str | Sequence[str]): A description of the view. Can be used for documentation. The description of the top-level view is shown in the toolbar of the GenomeSpy App.
562
+ domainInert (bool): If true, this view and its descendants do not contribute to scale domains. Child views inherit this flag automatically. **Default value:** ``false``
563
+ encoding (Encoding | EncodingKwds): Specifies how data are encoded using the visual channels.
564
+ genome (UrlGenomeConfig | dict[str, Any] | InlineGenomeConfig | GenomeConfigBase): Schema-defined ``genome`` property.
565
+ genomes (dict[str, Any]): Named genome assembly definitions. Each object key is the assembly name.
566
+ height (SizeDef | SizeDefKwds | float | Step | StepKwds | ExprRef | dict[str, Any] | Literal['container']): Height of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or ``"container"``. Check child sizing for details. **Default value:** ``"container"``
567
+ legends (LegendsKwds): Defines properties for legend resolutions used by this view subtree. Use this when a composed view shares a legend across child views and the legend settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.
568
+ name (str): An explicit name used to address the view. It is recommended to keep names unique among siblings. In the App (where view state is bookmarkable), the name must be unique within its import scope for views with configurable visibility, etc.
569
+ overhang (OverhangConfig | dict[str, Any]): Controls whether external overhang on each edge reserves layout space. Setting an edge to false lets axes, titles, legends, or custom view overhang overlap nearby content while remaining visible. **Default value:** all edges reserve overhang
570
+ padding (Paddings | PaddingsKwds | float): Padding applied to the view. Accepts either a number representing pixels or an object specifying separate paddings for each edge. Examples: - ``padding: 10`` - ``padding: { top: 10, right: 20, bottom: 10, left: 20 }`` **Default value:** ``0``
571
+ params (Sequence[PlainValueParameter | dict[str, Any] | TransitionedValueParameter | ExprParameter | SelectionParameter | RulerParameter]): Dynamic variables that parameterize a visualization.
572
+ resolve (ResolveKwds): Specifies how scales, axes, and legends are resolved in the view hierarchy. If legend resolution is not configured explicitly, it follows the corresponding scale resolution.
573
+ scales (ScalesKwds): Defines properties for scale resolutions used by this view subtree. Use this when a composed view shares a scale across child views and the scale settings, such as the visible domain, belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error. Expression references in these scale properties use this view's parameter scope and can access parameters declared here or on ancestors.
574
+ separator (bool | SeparatorProps | SeparatorPropsKwds): Draws separator rules between visible child views. The separators are centered within the spacing gaps and do not affect layout. If ``true``, the defaults are equivalent to: ``{"type":"rule","size":1,"color":"#ccc","opacity":1,"strokeDash":[4,4],"strokeCap":"butt"}`` Use ``includePlotMargin`` to control whether the separators extend into the plot margin. __Default value:__ ``false``
575
+ spacing (float): The gap between the views, in pixels.
576
+ templates (dict[str, Any]): Schema-defined ``templates`` property.
577
+ theme (BuiltInThemeName_T | Sequence[BuiltInThemeName_T]): Selects built-in theme preset(s) for the whole visualization.
578
+ title (str | Title | TitleKwds): View title.
579
+ transform (Sequence[AlignmentMismatchesParams | dict[str, Any] | AggregateParams | CollectParams | CoverageParams | CoordinateLookupParams | CrossParams | Displace1DParams | FlattenDelimitedParams | FormulaParams | LookupParams | ExprFilterParams | SelectionFilterParams | AxisLabelLayoutParams | FilterScoredLabelsParams | FlattenParams | FlattenCompressedExonsParams | FlattenCigarParams | FlattenSequenceParams | IdentifierParams | LinearizeGenomicCoordinateParams | MeasureTextParams | TruncateTextParams | PackLegendLabelsParams | MergeFacetsParams | PileupParams | ProjectParams | RegexExtractParams | RegexFoldParams | SampleParams | SetIntersectionParams | StackParams | WindowParams]): An array of transformations applied to the data before visual encoding.
580
+ viewportHeight (SizeDef | SizeDefKwds | float | ExprRef | dict[str, Any] | Literal['container']): Optional viewport height of the view. If the view size exceeds the viewport height, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or ``"container"``. **Default:** ``null`` (same as ``height``)
581
+ viewportWidth (SizeDef | SizeDefKwds | float | ExprRef | dict[str, Any] | Literal['container']): Optional viewport width of the view. If the view size exceeds the viewport width, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or ``"container"``. **Default:** ``null`` (same as ``width``)
582
+ visible (bool): The default visibility of the view. An invisible view is removed from the layout and not rendered. For context, see toggleable view visibility. **Default:** ``true``
583
+ width (SizeDef | SizeDefKwds | float | Step | StepKwds | ExprRef | dict[str, Any] | Literal['container']): Width of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or ``"container"``. Check child sizing for details. **Default:** ``"container"``
584
+ zindex (float): Z-order among sibling views in a composition. Higher values render later. Views with equal values render in declaration order. This does not affect layout order. __Default value:__ ``0``
585
+ """
586
+ properties = {
587
+ "annotate": annotate,
588
+ "assembly": assembly,
589
+ "axes": axes,
590
+ "background": background,
591
+ "baseUrl": baseUrl,
592
+ "config": config,
593
+ "cursor": cursor,
594
+ "data": data,
595
+ "datasets": datasets,
596
+ "description": description,
597
+ "domainInert": domainInert,
598
+ "encoding": encoding,
599
+ "genome": genome,
600
+ "genomes": genomes,
601
+ "height": height,
602
+ "legends": legends,
603
+ "name": name,
604
+ "overhang": overhang,
605
+ "padding": padding,
606
+ "params": params,
607
+ "resolve": resolve,
608
+ "scales": scales,
609
+ "separator": separator,
610
+ "spacing": spacing,
611
+ "templates": templates,
612
+ "theme": theme,
613
+ "title": title,
614
+ "transform": transform,
615
+ "viewportHeight": viewportHeight,
616
+ "viewportWidth": viewportWidth,
617
+ "visible": visible,
618
+ "width": width,
619
+ "zindex": zindex,
620
+ }
621
+ defined: dict[str, Any] = {
622
+ key: value for key, value in properties.items() if value is not Undefined
623
+ }
624
+ from genome_spy.chart import VConcatChart
625
+
626
+ return VConcatChart(vconcat=cast(Any, list(charts)), **defined)
627
+
628
+
629
+ def concat(
630
+ *charts: TopLevelSpec | ImportedView,
631
+ columns: float,
632
+ assembly: str | UndefinedType = Undefined,
633
+ axes: AxesKwds | UndefinedType = Undefined,
634
+ background: str | UndefinedType = Undefined,
635
+ baseUrl: str | UndefinedType = Undefined,
636
+ config: core.GenomeSpyConfig | GenomeSpyConfigKwds | UndefinedType = Undefined,
637
+ cursor: str | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
638
+ data: Any | UndefinedType = Undefined,
639
+ datasets: dict[str, Any] | UndefinedType = Undefined,
640
+ description: str | Sequence[str] | UndefinedType = Undefined,
641
+ domainInert: bool | UndefinedType = Undefined,
642
+ encoding: core.Encoding | EncodingKwds | UndefinedType = Undefined,
643
+ genome: core.UrlGenomeConfig
644
+ | dict[str, Any]
645
+ | core.InlineGenomeConfig
646
+ | core.GenomeConfigBase
647
+ | UndefinedType = Undefined,
648
+ genomes: dict[str, Any] | UndefinedType = Undefined,
649
+ height: core.SizeDef
650
+ | SizeDefKwds
651
+ | float
652
+ | core.Step
653
+ | StepKwds
654
+ | core.ExprRef
655
+ | dict[str, Any]
656
+ | Literal["container"]
657
+ | UndefinedType = Undefined,
658
+ legends: LegendsKwds | UndefinedType = Undefined,
659
+ name: str | UndefinedType = Undefined,
660
+ overhang: core.OverhangConfig | dict[str, Any] | UndefinedType = Undefined,
661
+ padding: core.Paddings | PaddingsKwds | float | UndefinedType = Undefined,
662
+ params: Sequence[
663
+ core.PlainValueParameter
664
+ | dict[str, Any]
665
+ | core.TransitionedValueParameter
666
+ | core.ExprParameter
667
+ | core.SelectionParameter
668
+ | core.RulerParameter
669
+ ]
670
+ | UndefinedType = Undefined,
671
+ resolve: ResolveKwds | UndefinedType = Undefined,
672
+ scales: ScalesKwds | UndefinedType = Undefined,
673
+ separator: bool
674
+ | core.SeparatorProps
675
+ | SeparatorPropsKwds
676
+ | UndefinedType = Undefined,
677
+ spacing: float | UndefinedType = Undefined,
678
+ templates: dict[str, Any] | UndefinedType = Undefined,
679
+ theme: BuiltInThemeName_T
680
+ | Sequence[BuiltInThemeName_T]
681
+ | UndefinedType = Undefined,
682
+ title: str | core.Title | TitleKwds | UndefinedType = Undefined,
683
+ transform: Sequence[
684
+ core.AlignmentMismatchesParams
685
+ | dict[str, Any]
686
+ | core.AggregateParams
687
+ | core.CollectParams
688
+ | core.CoverageParams
689
+ | core.CoordinateLookupParams
690
+ | core.CrossParams
691
+ | core.Displace1DParams
692
+ | core.FlattenDelimitedParams
693
+ | core.FormulaParams
694
+ | core.LookupParams
695
+ | core.ExprFilterParams
696
+ | core.SelectionFilterParams
697
+ | core.AxisLabelLayoutParams
698
+ | core.FilterScoredLabelsParams
699
+ | core.FlattenParams
700
+ | core.FlattenCompressedExonsParams
701
+ | core.FlattenCigarParams
702
+ | core.FlattenSequenceParams
703
+ | core.IdentifierParams
704
+ | core.LinearizeGenomicCoordinateParams
705
+ | core.MeasureTextParams
706
+ | core.TruncateTextParams
707
+ | core.PackLegendLabelsParams
708
+ | core.MergeFacetsParams
709
+ | core.PileupParams
710
+ | core.ProjectParams
711
+ | core.RegexExtractParams
712
+ | core.RegexFoldParams
713
+ | core.SampleParams
714
+ | core.SetIntersectionParams
715
+ | core.StackParams
716
+ | core.WindowParams
717
+ ]
718
+ | UndefinedType = Undefined,
719
+ viewportHeight: core.SizeDef
720
+ | SizeDefKwds
721
+ | float
722
+ | core.ExprRef
723
+ | dict[str, Any]
724
+ | Literal["container"]
725
+ | UndefinedType = Undefined,
726
+ viewportWidth: core.SizeDef
727
+ | SizeDefKwds
728
+ | float
729
+ | core.ExprRef
730
+ | dict[str, Any]
731
+ | Literal["container"]
732
+ | UndefinedType = Undefined,
733
+ visible: bool | UndefinedType = Undefined,
734
+ width: core.SizeDef
735
+ | SizeDefKwds
736
+ | float
737
+ | core.Step
738
+ | StepKwds
739
+ | core.ExprRef
740
+ | dict[str, Any]
741
+ | Literal["container"]
742
+ | UndefinedType = Undefined,
743
+ zindex: float | UndefinedType = Undefined,
744
+ ) -> ConcatChart:
745
+ """Return a concat composition of the given charts.
746
+
747
+ Args:
748
+ columns (float): The number of columns in the grid.
749
+ assembly (str): Default assembly for locus scales that do not define ``scale.assembly``. Can reference either a key in ``genomes`` or a built-in assembly name.
750
+ axes (AxesKwds): Defines properties for axis resolutions used by this view subtree. Use this when a composed view shares an axis across child views and the axis settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.
751
+ background (str): Background color of the canvas.
752
+ baseUrl (str): The base URL for relative URL data sources and URL imports. The base URLs are inherited in the view hierarchy unless overridden with this property. By default, the top-level view's base URL equals to the visualization specification's base URL.
753
+ config (GenomeSpyConfig | GenomeSpyConfigKwds): Configures defaults for this view subtree. Properties in child views override properties inherited from ancestors.
754
+ cursor (str | ExprRef | dict[str, Any]): Mouse cursor shown while the pointer is inside the view. The deepest matching cursor wins: mark cursor first, then the pointed view, then ancestor views outward toward the root. __Default value:__ browser default
755
+ data (Any): Specifies a data source. If omitted, the data source is inherited from the parent view.
756
+ datasets (dict[str, Any]): Named datasets available to this view and its descendants. A descendant declaration with the same name shadows this declaration. Declare named data here to establish reliable lexical scope and enable scoped runtime updates.
757
+ description (str | Sequence[str]): A description of the view. Can be used for documentation. The description of the top-level view is shown in the toolbar of the GenomeSpy App.
758
+ domainInert (bool): If true, this view and its descendants do not contribute to scale domains. Child views inherit this flag automatically. **Default value:** ``false``
759
+ encoding (Encoding | EncodingKwds): Specifies how data are encoded using the visual channels.
760
+ genome (UrlGenomeConfig | dict[str, Any] | InlineGenomeConfig | GenomeConfigBase): Schema-defined ``genome`` property.
761
+ genomes (dict[str, Any]): Named genome assembly definitions. Each object key is the assembly name.
762
+ height (SizeDef | SizeDefKwds | float | Step | StepKwds | ExprRef | dict[str, Any] | Literal['container']): Height of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or ``"container"``. Check child sizing for details. **Default value:** ``"container"``
763
+ legends (LegendsKwds): Defines properties for legend resolutions used by this view subtree. Use this when a composed view shares a legend across child views and the legend settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.
764
+ name (str): An explicit name used to address the view. It is recommended to keep names unique among siblings. In the App (where view state is bookmarkable), the name must be unique within its import scope for views with configurable visibility, etc.
765
+ overhang (OverhangConfig | dict[str, Any]): Controls whether external overhang on each edge reserves layout space. Setting an edge to false lets axes, titles, legends, or custom view overhang overlap nearby content while remaining visible. **Default value:** all edges reserve overhang
766
+ padding (Paddings | PaddingsKwds | float): Padding applied to the view. Accepts either a number representing pixels or an object specifying separate paddings for each edge. Examples: - ``padding: 10`` - ``padding: { top: 10, right: 20, bottom: 10, left: 20 }`` **Default value:** ``0``
767
+ params (Sequence[PlainValueParameter | dict[str, Any] | TransitionedValueParameter | ExprParameter | SelectionParameter | RulerParameter]): Dynamic variables that parameterize a visualization.
768
+ resolve (ResolveKwds): Specifies how scales, axes, and legends are resolved in the view hierarchy. If legend resolution is not configured explicitly, it follows the corresponding scale resolution.
769
+ scales (ScalesKwds): Defines properties for scale resolutions used by this view subtree. Use this when a composed view shares a scale across child views and the scale settings, such as the visible domain, belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error. Expression references in these scale properties use this view's parameter scope and can access parameters declared here or on ancestors.
770
+ separator (bool | SeparatorProps | SeparatorPropsKwds): Draws separator rules between visible child views. The separators are centered within the spacing gaps and do not affect layout. If ``true``, the defaults are equivalent to: ``{"type":"rule","size":1,"color":"#ccc","opacity":1,"strokeDash":[4,4],"strokeCap":"butt"}`` Use ``includePlotMargin`` to control whether the separators extend into the plot margin. __Default value:__ ``false``
771
+ spacing (float): The gap between the views, in pixels.
772
+ templates (dict[str, Any]): Schema-defined ``templates`` property.
773
+ theme (BuiltInThemeName_T | Sequence[BuiltInThemeName_T]): Selects built-in theme preset(s) for the whole visualization.
774
+ title (str | Title | TitleKwds): View title.
775
+ transform (Sequence[AlignmentMismatchesParams | dict[str, Any] | AggregateParams | CollectParams | CoverageParams | CoordinateLookupParams | CrossParams | Displace1DParams | FlattenDelimitedParams | FormulaParams | LookupParams | ExprFilterParams | SelectionFilterParams | AxisLabelLayoutParams | FilterScoredLabelsParams | FlattenParams | FlattenCompressedExonsParams | FlattenCigarParams | FlattenSequenceParams | IdentifierParams | LinearizeGenomicCoordinateParams | MeasureTextParams | TruncateTextParams | PackLegendLabelsParams | MergeFacetsParams | PileupParams | ProjectParams | RegexExtractParams | RegexFoldParams | SampleParams | SetIntersectionParams | StackParams | WindowParams]): An array of transformations applied to the data before visual encoding.
776
+ viewportHeight (SizeDef | SizeDefKwds | float | ExprRef | dict[str, Any] | Literal['container']): Optional viewport height of the view. If the view size exceeds the viewport height, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or ``"container"``. **Default:** ``null`` (same as ``height``)
777
+ viewportWidth (SizeDef | SizeDefKwds | float | ExprRef | dict[str, Any] | Literal['container']): Optional viewport width of the view. If the view size exceeds the viewport width, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or ``"container"``. **Default:** ``null`` (same as ``width``)
778
+ visible (bool): The default visibility of the view. An invisible view is removed from the layout and not rendered. For context, see toggleable view visibility. **Default:** ``true``
779
+ width (SizeDef | SizeDefKwds | float | Step | StepKwds | ExprRef | dict[str, Any] | Literal['container']): Width of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or ``"container"``. Check child sizing for details. **Default:** ``"container"``
780
+ zindex (float): Z-order among sibling views in a composition. Higher values render later. Views with equal values render in declaration order. This does not affect layout order. __Default value:__ ``0``
781
+ """
782
+ properties = {
783
+ "columns": columns,
784
+ "assembly": assembly,
785
+ "axes": axes,
786
+ "background": background,
787
+ "baseUrl": baseUrl,
788
+ "config": config,
789
+ "cursor": cursor,
790
+ "data": data,
791
+ "datasets": datasets,
792
+ "description": description,
793
+ "domainInert": domainInert,
794
+ "encoding": encoding,
795
+ "genome": genome,
796
+ "genomes": genomes,
797
+ "height": height,
798
+ "legends": legends,
799
+ "name": name,
800
+ "overhang": overhang,
801
+ "padding": padding,
802
+ "params": params,
803
+ "resolve": resolve,
804
+ "scales": scales,
805
+ "separator": separator,
806
+ "spacing": spacing,
807
+ "templates": templates,
808
+ "theme": theme,
809
+ "title": title,
810
+ "transform": transform,
811
+ "viewportHeight": viewportHeight,
812
+ "viewportWidth": viewportWidth,
813
+ "visible": visible,
814
+ "width": width,
815
+ "zindex": zindex,
816
+ }
817
+ defined: dict[str, Any] = {
818
+ key: value for key, value in properties.items() if value is not Undefined
819
+ }
820
+ from genome_spy.chart import ConcatChart
821
+
822
+ return ConcatChart(concat=cast(Any, list(charts)), **defined)
823
+
824
+
825
+ def multiscale(
826
+ *charts: TopLevelSpec | ImportedView,
827
+ stops: Sequence[float | core.ExprRef | dict[str, Any]]
828
+ | core.FadedMultiscaleStops
829
+ | dict[str, Any]
830
+ | core.TransitionedMultiscaleStops,
831
+ assembly: str | UndefinedType = Undefined,
832
+ axes: AxesKwds | UndefinedType = Undefined,
833
+ background: str | UndefinedType = Undefined,
834
+ baseUrl: str | UndefinedType = Undefined,
835
+ config: core.GenomeSpyConfig | GenomeSpyConfigKwds | UndefinedType = Undefined,
836
+ cursor: str | core.ExprRef | dict[str, Any] | UndefinedType = Undefined,
837
+ data: Any | UndefinedType = Undefined,
838
+ datasets: dict[str, Any] | UndefinedType = Undefined,
839
+ description: str | Sequence[str] | UndefinedType = Undefined,
840
+ domainInert: bool | UndefinedType = Undefined,
841
+ encoding: core.Encoding | EncodingKwds | UndefinedType = Undefined,
842
+ genome: core.UrlGenomeConfig
843
+ | dict[str, Any]
844
+ | core.InlineGenomeConfig
845
+ | core.GenomeConfigBase
846
+ | UndefinedType = Undefined,
847
+ genomes: dict[str, Any] | UndefinedType = Undefined,
848
+ height: core.SizeDef
849
+ | SizeDefKwds
850
+ | float
851
+ | core.Step
852
+ | StepKwds
853
+ | core.ExprRef
854
+ | dict[str, Any]
855
+ | Literal["container"]
856
+ | UndefinedType = Undefined,
857
+ legends: LegendsKwds | UndefinedType = Undefined,
858
+ name: str | UndefinedType = Undefined,
859
+ opacity: float
860
+ | core.DynamicOpacity
861
+ | DynamicOpacityKwds
862
+ | core.ExprRef
863
+ | dict[str, Any]
864
+ | UndefinedType = Undefined,
865
+ overhang: core.OverhangConfig | dict[str, Any] | UndefinedType = Undefined,
866
+ padding: core.Paddings | PaddingsKwds | float | UndefinedType = Undefined,
867
+ params: Sequence[
868
+ core.PlainValueParameter
869
+ | dict[str, Any]
870
+ | core.TransitionedValueParameter
871
+ | core.ExprParameter
872
+ | core.SelectionParameter
873
+ | core.RulerParameter
874
+ ]
875
+ | UndefinedType = Undefined,
876
+ resolve: ResolveKwds | UndefinedType = Undefined,
877
+ scales: ScalesKwds | UndefinedType = Undefined,
878
+ templates: dict[str, Any] | UndefinedType = Undefined,
879
+ theme: BuiltInThemeName_T
880
+ | Sequence[BuiltInThemeName_T]
881
+ | UndefinedType = Undefined,
882
+ title: str | core.Title | TitleKwds | UndefinedType = Undefined,
883
+ transform: Sequence[
884
+ core.AlignmentMismatchesParams
885
+ | dict[str, Any]
886
+ | core.AggregateParams
887
+ | core.CollectParams
888
+ | core.CoverageParams
889
+ | core.CoordinateLookupParams
890
+ | core.CrossParams
891
+ | core.Displace1DParams
892
+ | core.FlattenDelimitedParams
893
+ | core.FormulaParams
894
+ | core.LookupParams
895
+ | core.ExprFilterParams
896
+ | core.SelectionFilterParams
897
+ | core.AxisLabelLayoutParams
898
+ | core.FilterScoredLabelsParams
899
+ | core.FlattenParams
900
+ | core.FlattenCompressedExonsParams
901
+ | core.FlattenCigarParams
902
+ | core.FlattenSequenceParams
903
+ | core.IdentifierParams
904
+ | core.LinearizeGenomicCoordinateParams
905
+ | core.MeasureTextParams
906
+ | core.TruncateTextParams
907
+ | core.PackLegendLabelsParams
908
+ | core.MergeFacetsParams
909
+ | core.PileupParams
910
+ | core.ProjectParams
911
+ | core.RegexExtractParams
912
+ | core.RegexFoldParams
913
+ | core.SampleParams
914
+ | core.SetIntersectionParams
915
+ | core.StackParams
916
+ | core.WindowParams
917
+ ]
918
+ | UndefinedType = Undefined,
919
+ view: core.ViewBackground | ViewBackgroundKwds | UndefinedType = Undefined,
920
+ viewportHeight: core.SizeDef
921
+ | SizeDefKwds
922
+ | float
923
+ | core.ExprRef
924
+ | dict[str, Any]
925
+ | Literal["container"]
926
+ | UndefinedType = Undefined,
927
+ viewportWidth: core.SizeDef
928
+ | SizeDefKwds
929
+ | float
930
+ | core.ExprRef
931
+ | dict[str, Any]
932
+ | Literal["container"]
933
+ | UndefinedType = Undefined,
934
+ visible: bool | UndefinedType = Undefined,
935
+ width: core.SizeDef
936
+ | SizeDefKwds
937
+ | float
938
+ | core.Step
939
+ | StepKwds
940
+ | core.ExprRef
941
+ | dict[str, Any]
942
+ | Literal["container"]
943
+ | UndefinedType = Undefined,
944
+ zindex: float | UndefinedType = Undefined,
945
+ ) -> MultiscaleChart:
946
+ """Return a multiscale composition of the given charts.
947
+
948
+ Args:
949
+ stops (Sequence[float | ExprRef | dict[str, Any]] | FadedMultiscaleStops | dict[str, Any] | TransitionedMultiscaleStops): Stop definition that controls transitions between the multiscale levels. - ``number[]`` is shorthand for ``{ metric: "unitsPerPixel", values: ... }`` - ``(number | ExprRef)[]`` supports mixed constants and expressions - Object form allows configuring metric, channel, and fade.
950
+ assembly (str): Default assembly for locus scales that do not define ``scale.assembly``. Can reference either a key in ``genomes`` or a built-in assembly name.
951
+ axes (AxesKwds): Defines properties for axis resolutions used by this view subtree. Use this when a composed view shares an axis across child views and the axis settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.
952
+ background (str): Background color of the canvas.
953
+ baseUrl (str): The base URL for relative URL data sources and URL imports. The base URLs are inherited in the view hierarchy unless overridden with this property. By default, the top-level view's base URL equals to the visualization specification's base URL.
954
+ config (GenomeSpyConfig | GenomeSpyConfigKwds): Configures defaults for this view subtree. Properties in child views override properties inherited from ancestors.
955
+ cursor (str | ExprRef | dict[str, Any]): Mouse cursor shown while the pointer is inside the view. The deepest matching cursor wins: mark cursor first, then the pointed view, then ancestor views outward toward the root. __Default value:__ browser default
956
+ data (Any): Specifies a data source. If omitted, the data source is inherited from the parent view.
957
+ datasets (dict[str, Any]): Named datasets available to this view and its descendants. A descendant declaration with the same name shadows this declaration. Declare named data here to establish reliable lexical scope and enable scoped runtime updates.
958
+ description (str | Sequence[str]): A description of the view. Can be used for documentation. The description of the top-level view is shown in the toolbar of the GenomeSpy App.
959
+ domainInert (bool): If true, this view and its descendants do not contribute to scale domains. Child views inherit this flag automatically. **Default value:** ``false``
960
+ encoding (Encoding | EncodingKwds): Specifies how data are encoded using the visual channels.
961
+ genome (UrlGenomeConfig | dict[str, Any] | InlineGenomeConfig | GenomeConfigBase): Schema-defined ``genome`` property.
962
+ genomes (dict[str, Any]): Named genome assembly definitions. Each object key is the assembly name.
963
+ height (SizeDef | SizeDefKwds | float | Step | StepKwds | ExprRef | dict[str, Any] | Literal['container']): Height of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or ``"container"``. Check child sizing for details. **Default value:** ``"container"``
964
+ legends (LegendsKwds): Defines properties for legend resolutions used by this view subtree. Use this when a composed view shares a legend across child views and the legend settings belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error.
965
+ name (str): An explicit name used to address the view. It is recommended to keep names unique among siblings. In the App (where view state is bookmarkable), the name must be unique within its import scope for views with configurable visibility, etc.
966
+ opacity (float | DynamicOpacity | DynamicOpacityKwds | ExprRef | dict[str, Any]): Opacity of the view and all its children. This can be: - a fixed number between ``0`` and ``1`` - an expression reference (``ExprRef``) - a ``DynamicOpacity`` definition for zoom-dependent opacity Dynamic opacity is useful for semantic zooming where layers are faded in and out as the user zooms. Example: ```json "opacity": { "unitsPerPixel": [100000, 40000], "values": [0, 1] } ``` In this example, the view fades in while zooming in from 100 000 to 40 000 units per pixel. __Default value:__ ``1.0``
967
+ overhang (OverhangConfig | dict[str, Any]): Controls whether external overhang on each edge reserves layout space. Setting an edge to false lets axes, titles, legends, or custom view overhang overlap nearby content while remaining visible. **Default value:** all edges reserve overhang
968
+ padding (Paddings | PaddingsKwds | float): Padding applied to the view. Accepts either a number representing pixels or an object specifying separate paddings for each edge. Examples: - ``padding: 10`` - ``padding: { top: 10, right: 20, bottom: 10, left: 20 }`` **Default value:** ``0``
969
+ params (Sequence[PlainValueParameter | dict[str, Any] | TransitionedValueParameter | ExprParameter | SelectionParameter | RulerParameter]): Dynamic variables that parameterize a visualization.
970
+ resolve (ResolveKwds): Specifies how scales, axes, and legends are resolved in the view hierarchy. If legend resolution is not configured explicitly, it follows the corresponding scale resolution.
971
+ scales (ScalesKwds): Defines properties for scale resolutions used by this view subtree. Use this when a composed view shares a scale across child views and the scale settings, such as the visible domain, belong to the composed view rather than an individual encoding. An ancestor declaration shadows the whole declaration of a descendant that targets the same resolution. Declarations in separate sibling subtrees are ambiguous and cause an error. Expression references in these scale properties use this view's parameter scope and can access parameters declared here or on ancestors.
972
+ templates (dict[str, Any]): Schema-defined ``templates`` property.
973
+ theme (BuiltInThemeName_T | Sequence[BuiltInThemeName_T]): Selects built-in theme preset(s) for the whole visualization.
974
+ title (str | Title | TitleKwds): View title.
975
+ transform (Sequence[AlignmentMismatchesParams | dict[str, Any] | AggregateParams | CollectParams | CoverageParams | CoordinateLookupParams | CrossParams | Displace1DParams | FlattenDelimitedParams | FormulaParams | LookupParams | ExprFilterParams | SelectionFilterParams | AxisLabelLayoutParams | FilterScoredLabelsParams | FlattenParams | FlattenCompressedExonsParams | FlattenCigarParams | FlattenSequenceParams | IdentifierParams | LinearizeGenomicCoordinateParams | MeasureTextParams | TruncateTextParams | PackLegendLabelsParams | MergeFacetsParams | PileupParams | ProjectParams | RegexExtractParams | RegexFoldParams | SampleParams | SetIntersectionParams | StackParams | WindowParams]): An array of transformations applied to the data before visual encoding.
976
+ view (ViewBackground | ViewBackgroundKwds): Schema-defined ``view`` property.
977
+ viewportHeight (SizeDef | SizeDefKwds | float | ExprRef | dict[str, Any] | Literal['container']): Optional viewport height of the view. If the view size exceeds the viewport height, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or ``"container"``. **Default:** ``null`` (same as ``height``)
978
+ viewportWidth (SizeDef | SizeDefKwds | float | ExprRef | dict[str, Any] | Literal['container']): Optional viewport width of the view. If the view size exceeds the viewport width, it will be shown with scrollbars. This property implicitly enables clipping. If an expression reference is provided, it must resolve to a number or ``"container"``. **Default:** ``null`` (same as ``width``)
979
+ visible (bool): The default visibility of the view. An invisible view is removed from the layout and not rendered. For context, see toggleable view visibility. **Default:** ``true``
980
+ width (SizeDef | SizeDefKwds | float | Step | StepKwds | ExprRef | dict[str, Any] | Literal['container']): Width of the view. If a number, it is interpreted as pixels. If an expression reference is provided, it must resolve to a number or ``"container"``. Check child sizing for details. **Default:** ``"container"``
981
+ zindex (float): Z-order among sibling views in a composition. Higher values render later. Views with equal values render in declaration order. This does not affect layout order. __Default value:__ ``0``
982
+ """
983
+ properties = {
984
+ "stops": stops,
985
+ "assembly": assembly,
986
+ "axes": axes,
987
+ "background": background,
988
+ "baseUrl": baseUrl,
989
+ "config": config,
990
+ "cursor": cursor,
991
+ "data": data,
992
+ "datasets": datasets,
993
+ "description": description,
994
+ "domainInert": domainInert,
995
+ "encoding": encoding,
996
+ "genome": genome,
997
+ "genomes": genomes,
998
+ "height": height,
999
+ "legends": legends,
1000
+ "name": name,
1001
+ "opacity": opacity,
1002
+ "overhang": overhang,
1003
+ "padding": padding,
1004
+ "params": params,
1005
+ "resolve": resolve,
1006
+ "scales": scales,
1007
+ "templates": templates,
1008
+ "theme": theme,
1009
+ "title": title,
1010
+ "transform": transform,
1011
+ "view": view,
1012
+ "viewportHeight": viewportHeight,
1013
+ "viewportWidth": viewportWidth,
1014
+ "visible": visible,
1015
+ "width": width,
1016
+ "zindex": zindex,
1017
+ }
1018
+ defined: dict[str, Any] = {
1019
+ key: value for key, value in properties.items() if value is not Undefined
1020
+ }
1021
+ from genome_spy.chart import MultiscaleChart
1022
+
1023
+ return MultiscaleChart(multiscale=cast(Any, list(charts)), **defined)
1024
+
1025
+
1026
+ def import_view(
1027
+ *,
1028
+ url: str | UndefinedType = Undefined,
1029
+ template: str | UndefinedType = Undefined,
1030
+ config: core.GenomeSpyConfig | GenomeSpyConfigKwds | UndefinedType = Undefined,
1031
+ name: str | UndefinedType = Undefined,
1032
+ params: Sequence[
1033
+ core.PlainValueParameter
1034
+ | dict[str, Any]
1035
+ | core.TransitionedValueParameter
1036
+ | core.ExprParameter
1037
+ | core.SelectionParameter
1038
+ | core.RulerParameter
1039
+ ]
1040
+ | dict[str, Any]
1041
+ | UndefinedType = Undefined,
1042
+ visible: bool | UndefinedType = Undefined,
1043
+ zindex: float | UndefinedType = Undefined,
1044
+ ) -> ImportedView:
1045
+ """Create an imported child view from a URL or template."""
1046
+ if (url is Undefined) == (template is Undefined):
1047
+ raise ValueError("Specify exactly one of url or template.")
1048
+ properties = {
1049
+ "config": config,
1050
+ "name": name,
1051
+ "params": params,
1052
+ "visible": visible,
1053
+ "zindex": zindex,
1054
+ }
1055
+ defined: dict[str, Any] = {
1056
+ key: value for key, value in properties.items() if value is not Undefined
1057
+ }
1058
+ import_definition = {"url": url} if url is not Undefined else {"template": template}
1059
+ from genome_spy.chart import ImportedView
1060
+
1061
+ return ImportedView(import_=import_definition, **defined)
1062
+
1063
+
1064
+ __all__ = ["layer", "hconcat", "vconcat", "concat", "multiscale", "import_view"]