ValueScale
Auto-generated config schema for the current JBrowse release — see the config guide for concepts. Built into JBrowse core. View source.
Example usage
A log axis floored at 1:
{
type: 'LinearWiggleDisplay',
scales: { y: { type: 'log', domainMin: 1 } },
}The whole visible range, rather than the 99th percentile the wiggle displays start on:
{
type: 'LinearWiggleDisplay',
scales: { y: { domainQuantile: 1 } },
}Three samples' coverage on one axis that still follows the data, each track's display naming the same group:
{
type: 'LinearAlignmentsDisplay',
scales: { y: { autoscaleGroup: 'depth' } },
}A titled axis with a labelled genome-wide threshold over a plain suggestive one:
{
type: 'LinearMarkDisplay',
scales: {
y: {
title: '-log10 p',
rules: [{ value: 7.3, color: 'red', label: 'p = 5e-8' }, 5],
},
},
}See the Config slots section below for all available configuration fields.
The value scale of a quantitative display, written as scales.y: the
wiggle plot, the alignments coverage band and the mark display, the
Manhattan plot among them, each carry one, with the axis guides it draws —
its ticks, its grid, its rules and its title.
Vega-Lite's spelling: a pinned end is domainMin or domainMax, and an end
left unset autoscales over the loaded regions.
Two defaults come from the display rather than from the scale.
domainQuantile starts at 0.99 on the wiggle plot and the coverage band,
clipping the outermost 1% of each sign, and at 1, the extremes, on the mark
display, where the outliers are often the subject. symlogConstant starts at 0 on the wiggle family and the mark
display and at 1 on the coverage band.
Every scale carries the same guides: rules, reference lines at chosen
values, grid, a line at every tick, minimalTicks, and title, the
caption beside the axis. A rule naming no color draws in the one colour
the chrome rules every plot in, so a red line is a claim its author makes
rather than a meaning a display assigns.
Config slots
These slots go on a display entry: "displays": [{ "type": "ValueScale", ... }], or in the track's displayDefaults when this is its default display. Slot types (fileLocation, frozen, ...) are explained in the config slot types reference. Slots a base configuration contributes are listed here too, so this table is the whole surface.
| Slot | Description |
|---|---|
scales.y.rules.valuenumber = 0 | Where the rule sits on the axis, in the units the axis plots: a -log10(p) over a Manhattan plot, a depth over coverage. |
scales.y.rules.colormaybeColor | The line's colour, and its label's. Unset draws every rule in the one colour the chrome rules plots in, so a threshold that means something particular — genome-wide significance, a diploid depth — is one an author paints, on the plot where it means it. |
scales.y.rules.labelstring = '' | Free text drawn at the rule's right-hand end. JBrowse assigns it no meaning: "2 copies" over a coverage plot is a claim only the author can make, since no ploidy can be assumed. |
scales.y.typestringEnum (linear, log, symlog) = 'linear' | How the axis reads its domain — the ticks, the cross-hatches and the renderer's placement all come from it. log cannot represent 0 or negative values and floors the domain above them; symlog is log-like away from zero and linear through it, so a track whose values touch or cross 0 keeps them. |
scales.y.domainMinmaybeNumber | The bottom of the axis, pinning what would otherwise autoscale to the loaded regions. Unset autoscales that end. The score menu's "Set min/max" writes here. |
scales.y.domainMaxmaybeNumber | The top of the axis. Unset autoscales that end. |
scales.y.autoscaleGroupmaybeString | A name shared by the tracks whose axes autoscale together: each unpinned end spans the data of every track in the view naming the same group, so three coverage lanes stay comparable as the view moves. A pinned end stays this track's own. The score menu's "Autoscale with other tracks" writes it. |
scales.y.symlogConstantnumber = per display | Width of symlog's linear region around zero. 0 derives it from the domain, a thousandth of its largest magnitude — right for a wiggle track, whose units are its own. The coverage band starts at 1 instead, which makes symlog exactly log(depth+1) and puts the knee at one read.advanced |
scales.y.domainQuantilenumber = per display | What an unpinned end follows over the loaded values: 1 their extremes, and below it that quantile of each sign's magnitudes, anchored at 0, so 0.99 drops the outermost 1% of each sign and one spike no longer flattens the rest. The two signs are measured on their own, so a sparse minority tail stays visible and all-positive data keeps its bottom at 0. The score menu's "Clip outliers" toggles it. |
scales.y.gridboolean = false | Rule the plot across at every tick, ggplot2's panel grid and Vega-Lite's axis.grid. The score menu's "Show cross hatches" toggles it. |
scales.y.minimalTicksboolean = false | Label only the two ends of the axis. advanced |
scales.y.titlemaybeString | The caption beside the axis, naming what it measures, drawn once however many bands the scale rules and at every zoom. Optional, as JBrowse's other captions are: unset, "" or null, the axis has none; some text is that text. |
scales.y.rulestypes.array(valueScaleRuleSchema()) | Horizontal reference lines at chosen values, across every band the scale rules: a significance threshold, a zero line, an allele-frequency cut. Each is { value, color, label }, or a bare number for a plain line. An autoscaled end widens to keep every rule on the axis; a pinned domainMin or domainMax that excludes a rule drops it. |
Related links
- Guide: A selected haplotype (Dog10K)
- Guide: CNV across a population (1000 Genomes)
- Guide: CNV cohort (TCGA)
- Config guide: Hi-C track
- Guide: Mutation cohort (TCGA)
- Config guide: Quantitative track
- User guide: Quantitative track
- Guide: Upgrading to v5
- Guide: URL query parameter API