genome_spy.multiscale

genome_spy.multiscale(*charts, stops, assembly=Undefined, axes=Undefined, background=Undefined, baseUrl=Undefined, config=Undefined, cursor=Undefined, data=Undefined, datasets=Undefined, description=Undefined, domainInert=Undefined, encoding=Undefined, genome=Undefined, genomes=Undefined, height=Undefined, legends=Undefined, name=Undefined, opacity=Undefined, overhang=Undefined, padding=Undefined, params=Undefined, resolve=Undefined, scales=Undefined, templates=Undefined, theme=Undefined, title=Undefined, transform=Undefined, view=Undefined, viewportHeight=Undefined, viewportWidth=Undefined, visible=Undefined, width=Undefined, zindex=Undefined)View on GitHub

Return a multiscale composition of the given charts.

Parameters:
  • 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.

  • 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.

  • 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.

  • background (str) – Background color of the canvas.

  • 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.

  • config (GenomeSpyConfig | GenomeSpyConfigKwds) – Configures defaults for this view subtree. Properties in child views override properties inherited from ancestors.

  • 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

  • data (Any) – Specifies a data source. If omitted, the data source is inherited from the parent view.

  • 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.

  • 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.

  • domainInert (bool) – If true, this view and its descendants do not contribute to scale domains. Child views inherit this flag automatically. Default value: false

  • encoding (Encoding | EncodingKwds) – Specifies how data are encoded using the visual channels.

  • genome (UrlGenomeConfig | dict[str, Any] | InlineGenomeConfig | GenomeConfigBase) – Schema-defined genome property.

  • genomes (dict[str, Any]) – Named genome assembly definitions. Each object key is the assembly name.

  • 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"

  • 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.

  • 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.

  • 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

  • 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

  • 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

  • params (Sequence[PlainValueParameter | dict[str, Any] | TransitionedValueParameter | ExprParameter | SelectionParameter | RulerParameter]) – Dynamic variables that parameterize a visualization.

  • 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.

  • 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.

  • templates (dict[str, Any]) – Schema-defined templates property.

  • theme (BuiltInThemeName_T | Sequence[BuiltInThemeName_T]) – Selects built-in theme preset(s) for the whole visualization.

  • title (str | Title | TitleKwds) – View title.

  • 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.

  • view (ViewBackground | ViewBackgroundKwds) – Schema-defined view property.

  • 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)

  • 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)

  • 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

  • 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"

  • 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