genome_spy.RulerParameter

class genome_spy.RulerParameter(description=Undefined, name=Undefined, persist=Undefined, push=Undefined, ruler=Undefined, value=Undefined, **kwds)View on GitHub

Bases: GenomeSpySchema

Generated wrapper for RulerParameter.

Methods

copy(*[, deep])

Return a copy with optional keyword updates.

description(value)

Return a copy with description updated.

name(value)

Return a copy with name updated.

persist(value)

Return a copy with persist updated.

push(value)

Return a copy with push updated.

resolve_references()

Return this class schema with referenced properties merged in.

ruler([value, clear, disabled, display, ...])

Return a copy with a RulerConfig ruler.

to_dict(*[, validate])

Serialize this schema wrapper to a JSON-compatible dictionary.

to_json(*[, validate])

Serialize this schema wrapper to formatted JSON.

validate(instance)

Validate an instance against this wrapper's schema.

value([value, x, y])

Return a copy with a RulerInitMapping value.

description(value)View on GitHub

Return a copy with description updated.

name(value)View on GitHub

Return a copy with name updated.

persist(value)View on GitHub

Return a copy with persist updated.

push(value)View on GitHub

Return a copy with push updated.

ruler(value=Undefined, /, *, clear=Undefined, disabled=Undefined, display=Undefined, encodings=Undefined, extent=Undefined, mark=Undefined, on=Undefined, snap=Undefined, source=Undefined)View on GitHub

Return a copy with a RulerConfig ruler.

Parameters:
  • clear (RulerClear_T) – Event that clears the ruler, or false to keep the current value. __Default value:__ "mouseleave" for on: "mousemove", otherwise false.

  • disabled (bool | ExprRef | dict[str, Any]) – 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

  • display (RulerDisplay_T) – 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".

  • encodings (Sequence[PrimaryPositionalChannel_T]) – Positional channels whose domain coordinates are tracked by the ruler. __Default value:__ ["x"]

  • extent (RulerExtent_T) – 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"

  • mark (RulerMarkConfig | RulerMarkConfigKwds) – 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".

  • on (RulerEventType_T | RulerEventConfig | RulerEventConfigKwds | str) – 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"

  • snap (RulerSnap_T) – 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.

  • source (RulerSource_T) – Source of the ruler coordinate. "pointer" uses pointer events configured by on. "viewport" tracks the center of the current viewport. __Default value:__ "pointer"

value(value=Undefined, /, *, x=Undefined, y=Undefined)View on GitHub

Return a copy with a RulerInitMapping value.

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

Return a copy with optional keyword updates.

classmethod resolve_references()View on GitHub

Return this class schema with referenced properties merged in.

to_dict(*, validate=True)View on GitHub

Serialize this schema wrapper to a JSON-compatible dictionary.

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.