genome_spy.selection_interval¶
- genome_spy.selection_interval(name=None, /, *, clear=Undefined, encodings=Undefined, extent=Undefined, mark=Undefined, on=Undefined, zoom=Undefined, description=Undefined, persist=Undefined, push=Undefined, value=Undefined, empty=True)View on GitHub¶
Create a GenomeSpy
selection_intervalparameter.- Parameters:
name – Parameter name. A stable name is generated when omitted.
clear – A string or object that defines the events that should clear the selection. __Default value:__
"dblclick"encodings – An array of encoding channels that define the interval selection.
extent – Visual extent of the interval selection rectangle.
"auto"draws one spanning rectangle when the selected channel can span a concat safely."view"draws one rectangle per participating view."container"requires one spanning rectangle. __Default value:__"auto"mark – Interval selections display a rectangle mark to show the selected range. Use the
markproperty to adjust the appearance of this rectangle.on – A string or object that defines the events to which the selection should listen. __Default value:__ - point selections:
"click"- interval selections: -"mousedown[event.shiftKey]"when any brushed channel is zoomable -"mousedown"otherwisezoom – Controls whether an active interval selection can be resized by mouse wheel. The wheel interaction only applies when the cursor is over the interval. Can be: -
true/false- event type string such as"wheel"or"wheel[event.altKey]"- anEventConfigobject Currently, only"wheel"events are supported. __Default value:__ -falsewhen any brushed channel uses a zoomable scale -trueotherwisedescription – A description of the parameter. Can be used for documentation and to explain the meaning of the control or selection.
persist – Whether the parameter should be persisted in bookmarks and provenance. This primarily affects GenomeSpy App behavior. Set to
falsefor ephemeral params (e.g., hover selections) or when the selection cannot be persisted due to missingencoding.key. __Default value:__truepush – Reuses the nearest same-named parameter in an ancestor scope and writes updates to it. Declare the target parameter on the ancestor first. This is useful when interaction in a child view updates state owned by a composed view, such as a parameter that controls a shared scale.
value – Initial value for the selection.
empty – Whether an empty selection matches as a predicate.
- Returns:
A reusable parameter handle.
- Raises:
TypeError – If the generated parameter definition is invalid.
Example
>>> selection_interval().param.to_dict(validate=False) {...}