ScoreScaleMixin
Auto-generated @jbrowse/mobx-state-tree API for the current JBrowse release — see pluggable elements for concepts. Built into JBrowse core. View source.
#crossCuttingMixin Score axis. Nothing — the config slots. Brings scaleType / autoscaleType / minScore / maxScore / *Bound / numStdDev and their setters, i.e. the whole ScoreScaleModel interface the shared score menu and SetMinMaxDialog consume
The score axis every quantitative display shares: which scale, how to
autoscale it, and the manual min/max bounds. This is the runtime half of
ScoreScaleModel in scoreMenuItems.ts — that interface is what the
shared Score menu, the autoscale/scale submenus and SetMinMaxDialog consume,
and it was already the canonical contract while two displays hand-wrote
identical implementations of it (WiggleScoreConfigMixin, and the alignments
coverage band). Composing this is now how a display satisfies it, so a new
score display cannot satisfy it partially.
Deliberately just the axis. Colors, resolution, cross-hatches and the
autoscale computation stay in WiggleScoreConfigMixin / WiggleCommonMixin
— the alignments coverage band shares this axis but none of the rest.
minScore/maxScore are the raw slot values with their
Number.MIN_VALUE/Number.MAX_VALUE "unset" sentinels intact, because that
is what the dialog round-trips; minScoreBound/maxScoreBound are the
resolved bounds, where undefined means "autoscale this end". Every consumer
that computes a domain reads the *Bound pair.
Getters
| Member | Description |
|---|---|
scaleTypestring | |
autoscaleTypestring | |
numStdDevnumber | |
minScorenumber | Raw slot value, sentinel intact — see the class comment. |
maxScorenumber | Raw slot value, sentinel intact — see the class comment. |
defaultScoreDomain[number | undefined, number | undefined] | Overridable hook: what each end of the domain falls back to where the config leaves its bound unset. [undefined, undefined] — the default — means autoscale both ends, which is right for a track whose scores have no absolute meaning (a bigwig's units are its own).A display whose scores are bounded by construction overrides it, so the axis stops being a function of what happens to be on screen: GC content is a fraction, so 0 and 1 are its real limits and mean the same thing at every locus. Autoscaled, the same GC value drew at different heights depending on where the user had panned, and the track could not be read across loci. A hook rather than a config default because the answer can depend on display state — GC's does, on gcMode — and rather than each display re-resolving the sentinels below, which is the one thing that must not be duplicated: config bounds still win, precisely because they are checked before this is consulted. |
minScoreBoundnumber | undefined | Resolved lower bound; undefined means autoscale this end. |
maxScoreBoundnumber | undefined | Resolved upper bound; undefined means autoscale this end. |
Actions
| Member | Description |
|---|---|
setScaleType(scaleType: string) => void | |
setAutoscale(val?: string | undefined) => void | |
setMinScore(val?: number | undefined) => void | |
setMaxScore(val?: number | undefined) => void |