genome_spy.selection_point

genome_spy.selection_point(name=None, /, *, clear=Undefined, on=Undefined, toggle=Undefined, description=Undefined, persist=Undefined, push=Undefined, value=Undefined, empty=True)View on GitHub

Create a GenomeSpy selection_point parameter.

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"

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

  • toggle – Controls whether data values should be toggled (inserted or removed from a point selection) when clicking with the shift key pressed. - true – additional values can be selected by shift-clicking. - false – only a single value can be selected at a time. __Default value:__ true

  • description – 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 false for ephemeral params (e.g., hover selections) or when the selection cannot be persisted due to missing encoding.key. __Default value:__ true

  • push – 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_point().param.to_dict(validate=False)
{...}