genome_spy.param¶
- genome_spy.param(name=None, /, *, bind=Undefined, description=Undefined, expr=Undefined, persist=Undefined, push=Undefined, ruler=Undefined, select=Undefined, transition=Undefined, value=Undefined, empty=True)View on GitHub¶
Create a reusable GenomeSpy parameter handle.
The overloads and accepted properties are generated from the concrete leaves of GenomeSpy’s
Parameterunion.- Parameters:
name – Parameter name. A stable name is generated when omitted.
bind – Binds the parameter to an external input element such as a slider, selection list or radio button group.
description – A description of the parameter. Can be used for documentation and to explain the meaning of the control or selection.
expr – An expression for the value of the parameter. This expression may include other parameters, in which case the parameter will automatically update in response to upstream parameter changes.
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.
ruler – Tracks a domain coordinate and displays it as a ruler in compatible views.
select – Determines the default event processing and data query for the selection. GenomeSpy supports two selection types, following the Vega-Lite model: -
"point"– to select multiple discrete data values; the first value is selected onclickand additional values toggled on shift-click. -"interval"– to select a continuous range of data values ondrag.transition – Smoothly follows numeric target values.
value – The initial value of the parameter. __Default value:__
undefinedempty – Whether an empty selection matches as a predicate.
- Returns:
A reusable parameter handle.
- Raises:
TypeError – If the arguments match no unique parameter branch.
Example
>>> param("cutoff", value=0.5).param.to_dict() {'name': 'cutoff', 'value': 0.5}