WiggleColor
Auto-generated from the config schema in the source — see the config guide for concepts. Provided by the wiggle plugin. View source.
Example usage
{ type: 'LinearWiggleDisplay', color: 'darkgreen' }{
type: 'LinearWiggleDisplay',
color: { field: 'score', scale: 'threshold', domain: [2], range: ['#2166ac', '#b2182b'] },
}{
type: 'LinearWiggleDisplay',
mark: 'span',
color: { field: 'score', scale: 'linear', scheme: 'viridis' },
}The quantitative display's color: one CSS color for every bar, or score
through a scale. Through a threshold scale it is the bicolor plot — a
color each side of one cut, the origin where the domain names none, and a
color per band where it names more — and through linear a gradient across
the y domain, through the y scale's own type, which colors each bar, point
and density cell by its score. A line still parts in the gradient's two end
colors. A subtrack's own color is rowColor's. A wiggle colors per
signal rather than per feature, so a jexl: callback over a feature has
nothing to read here.
Config slots
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 |
|---|---|
valuemaybeColor | One CSS color for every bar. Writing color: "darkgreen" lands here. Unset, the display paints the pos/neg pair about the origin, and several sources sharing one plot box each paint their row color. |
fieldmaybeStringEnum (score) | score, the value each bar carries. Unset, the color paints value, or score while value is unset too, which jbrowse validate reads alike. |
scalemaybeStringEnum (none, linear, threshold) | The scale from score to a color. threshold paints each band between two of its cuts, and on a density plot (mark: 'span') fades from white at the lowest cut to the first range color below it and the last above it; linear runs range, else scheme, else viridis across the y domain through scales.y.type, with domainMid at the middle stop, coloring each bar, point and density cell by its score, and a one-color range runs from white to that color; a line still parts in the two end colors. none paints value, keeping the field for a switch back. Unset beside the field, it is threshold. |
domainstringArray = [] | for a threshold scale, up to eight cut points, sorted, empty meaning one at the origin |
rangecolorArray = [] | a threshold scale's color for each band, lowest first, one more than the cuts, a missing middle band grey; a linear scale's stops, evenly spaced, one color meaning white to it |
schememaybeStringEnum (viridis, magma, inferno, cividis, juicebox, fall, reds, blues, redblue, purpleorange, redgreyblue, blueyellowred) | a named ramp: a linear or log scale runs along it, and a threshold that writes cuts takes one color per interval from end to end; range's colors, where it lists any, win over it |
reverseboolean = false | turns the ramp round, so its last color paints the bottom of a linear or log domain or a threshold's lowest interval |
domainMidmaybeNumber | the value the ramp's middle stop sits at, so a diverging ramp centres somewhere other than the middle of the domain, both sides on one scale: the farther end of the domain reaches its end color and equal distances from the middle take equal colors; unset, the stops are evenly spaced across it |
labelsstringArray = [] | key label for each domain value, one each in order, or under threshold for each interval from the lowest; one past the list keeps its own name |
titlemaybeString | key title; unset keeps the display's own heading, "" draws none |
Related links
- Tutorial: CNV across a population (1000 Genomes)
- Developer guide: Upgrading to v5