genome_spy.RulerParameter¶
- class genome_spy.RulerParameter(description=Undefined, name=Undefined, persist=Undefined, push=Undefined, ruler=Undefined, value=Undefined, **kwds)View on GitHub¶
Bases:
GenomeSpySchemaGenerated wrapper for
RulerParameter.Methods
copy(*[, deep])Return a copy with optional keyword updates.
description(value)Return a copy with
descriptionupdated.name(value)Return a copy with
nameupdated.persist(value)Return a copy with
persistupdated.push(value)Return a copy with
pushupdated.Return this class schema with referenced properties merged in.
ruler([value, clear, disabled, display, ...])Return a copy with a
RulerConfigruler.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
RulerInitMappingvalue.- description(value)View on GitHub¶
Return a copy with
descriptionupdated.
- name(value)View on GitHub¶
Return a copy with
nameupdated.
- persist(value)View on GitHub¶
Return a copy with
persistupdated.
- push(value)View on GitHub¶
Return a copy with
pushupdated.
- 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
RulerConfigruler.- Parameters:
clear (RulerClear_T) – Event that clears the ruler, or
falseto keep the current value. __Default value:__"mouseleave"foron: "mousemove", otherwisefalse.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:__falsedisplay (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 whendisplayis"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.falsekeeps the original coordinate. __Default value:__"auto"for index and locus scales, otherwisefalse.source (RulerSource_T) – Source of the ruler coordinate.
"pointer"uses pointer events configured byon."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
RulerInitMappingvalue.- Parameters:
x (Scalar_T | ChromosomalLocus | dict[str, Any] | None) – Schema-defined
xproperty.y (Scalar_T | ChromosomalLocus | dict[str, Any] | None) – Schema-defined
yproperty.
- 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.