genome_spy.ImportedView

class genome_spy.ImportedView(import_=Undefined, *, config=Undefined, name=Undefined, params=Undefined, visible=Undefined, zindex=Undefined)View on GitHub

Bases: ImportedViewConstructorMixin, ImportSpec

A child-view import that can participate in chart composition.

Methods

config([value, arrow, axis, axisBottom, ...])

Return a copy with a GenomeSpyConfig config.

copy(*[, deep])

Return a copy with optional keyword updates.

import_([value, url])

Return a copy with a UrlImport import.

name(value)

Return a copy with name updated.

params(value)

Return a copy with params updated.

resolve_references()

Return this class schema with referenced properties merged in.

to_dict(*[, include_schema, validate])

Serialize the imported child view without a root schema URL.

to_json(*[, validate])

Serialize this schema wrapper to formatted JSON.

validate(instance)

Validate an instance against this wrapper's schema.

visible(value)

Return a copy with visible updated.

zindex(value)

Return a copy with zindex updated.

to_dict(*, include_schema=False, validate=True)View on GitHub

Serialize the imported child view without a root schema URL.

Parameters:
  • include_schema – Accepted for composition compatibility; imports never emit a root $schema property.

  • validate – Validate against the generated import schema.

Returns:

The JSON-compatible imported-view specification.

Raises:

SchemaValidationError – If validation fails.

Example

>>> ImportedView(import_={"template": "track"}).to_dict()
{'import': {'template': 'track'}}
config(value=Undefined, /, *, arrow=Undefined, axis=Undefined, axisBottom=Undefined, axisIndex=Undefined, axisLeft=Undefined, axisLocus=Undefined, axisNominal=Undefined, axisOrdinal=Undefined, axisQuantitative=Undefined, axisRight=Undefined, axisTop=Undefined, axisX=Undefined, axisY=Undefined, legend=Undefined, legendTrack=Undefined, link=Undefined, mark=Undefined, point=Undefined, range=Undefined, rect=Undefined, rule=Undefined, scale=Undefined, style=Undefined, text=Undefined, tick=Undefined, title=Undefined, view=Undefined)View on GitHub

Return a copy with a GenomeSpyConfig config.

Parameters:
  • arrow (ArrowConfig | dict[str, Any]) – Defaults for arrow marks.

  • axis (AxisConfig | AxisConfigKwds) – Defaults shared by all axes.

  • axisBottom (AxisConfig | AxisConfigKwds) – Defaults for bottom-oriented axes.

  • axisIndex (AxisConfig | AxisConfigKwds) – Defaults for axes that visualize GenomeSpy index scales.

  • axisLeft (AxisConfig | AxisConfigKwds) – Defaults for left-oriented axes.

  • axisLocus (AxisConfig | AxisConfigKwds) – Defaults for axes that visualize GenomeSpy locus scales.

  • axisNominal (AxisConfig | AxisConfigKwds) – Defaults for axes that visualize nominal data.

  • axisOrdinal (AxisConfig | AxisConfigKwds) – Defaults for axes that visualize ordinal data.

  • axisQuantitative (AxisConfig | AxisConfigKwds) – Defaults for axes that visualize quantitative data.

  • axisRight (AxisConfig | AxisConfigKwds) – Defaults for right-oriented axes.

  • axisTop (AxisConfig | AxisConfigKwds) – Defaults for top-oriented axes.

  • axisX (AxisConfig | AxisConfigKwds) – Defaults for x axes.

  • axisY (AxisConfig | AxisConfigKwds) – Defaults for y axes.

  • legend (LegendConfig | LegendConfigKwds) – Defaults shared by all legends. Set disable to true to suppress automatic legend creation by default.

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

  • link (LinkConfig | LinkConfigKwds) – Defaults for link marks.

  • mark (MarkConfig | MarkConfigKwds) – Defaults shared by all mark types.

  • point (PointConfig | PointConfigKwds) – Defaults for point marks.

  • range (RangeConfig | RangeConfigKwds) – Named reusable ranges for channels such as shape, size, and color.

  • rect (RectConfig | RectConfigKwds) – Defaults for rect marks.

  • rule (RuleConfig | RuleConfigKwds) – Defaults for rule marks.

  • scale (ScaleConfig | ScaleConfigKwds) – Defaults for scale behavior and scale-type-specific buckets.

  • style (dict[str, Any]) – Named reusable style buckets that marks, axes, legends, titles, and views can reference through their style properties.

  • text (TextConfig | TextConfigKwds) – Defaults for text marks.

  • tick (TickConfig | dict[str, Any]) – Defaults for tick marks.

  • title (TitleConfig | TitleConfigKwds) – Defaults for view titles.

  • view (ViewConfig | ViewConfigKwds) – Defaults for view background styling, including fill, stroke, shadow, and z-order properties.

copy(*, deep=True, **kwds)View on GitHub

Return a copy with optional keyword updates.

import_(value=Undefined, /, *, url=Undefined)View on GitHub

Return a copy with a UrlImport import.

Parameters:

url (str) – Imports a specification from the specified URL.

name(value)View on GitHub

Return a copy with name updated.

params(value)View on GitHub

Return a copy with params updated.

classmethod resolve_references()View on GitHub

Return this class schema with referenced properties merged in.

to_json(*, validate=True)View on GitHub

Serialize this schema wrapper to formatted JSON.

classmethod validate(instance)View on GitHub

Validate an instance against this wrapper’s schema.

visible(value)View on GitHub

Return a copy with visible updated.

zindex(value)View on GitHub

Return a copy with zindex updated.