WiggleColor
Auto-generated from the config schema in the source — see the config guide for concepts. Provided by the wiggle plugin. View source.
The quantitative display's encoding.color: one CSS color for every mark,
the plotted score through a scale, or each subtrack in its row color.
field is score, which stands for the plotted value whatever field y
names, or source, the subtrack.
thresholdpaints a solid color each side of one cut, theoriginwherescale.domainnames none, and a color per band where it names more, on every marklinearpaints a gradient across the y domain, through the y scale's own type: each bar, point and density cell by its score, and a line by the score along it- unset
scale.type, a two-colorscale.range(red and blue unset) is the pair about theorigin: bars, points and lines solid either side of it, and a heatmap (mark: 'rect') fading to each from white at it, a ramp whose middle stopscale.domainMidmoves
source paints each subtrack its row color, its rows.colors entry, else the
file's color, else a palette color where several share one plot, on both
sides of the origin; a subtrack with none paints the score's pair. A
color writing nothing does the same on bars, points and lines, so a lone
BigWig keeps its pair, and a heatmap ramps the score. A wiggle colors per
signal rather than per feature, so a jexl: callback over a feature has
nothing to read here.
Example usage
{ type: 'LinearWiggleDisplay', encoding: { color: { value: 'darkgreen' } } }{
type: 'LinearWiggleDisplay',
encoding: {
color: {
scale: { type: 'threshold', domain: [2], range: ['#2166ac', '#b2182b'] },
},
},
}{
type: 'LinearWiggleDisplay',
mark: 'rect',
encoding: { color: { scale: { type: 'linear', scheme: 'viridis' } } },
}Subtracks in their row colors, as they paint while encoding.color is
unset:
{ type: 'LinearWiggleDisplay', encoding: { color: 'source' } }A copy-number heatmap, white at two copies, blue losses and red gains:
{
type: 'LinearWiggleDisplay',
mark: 'rect',
origin: 2,
encoding: { color: { scale: { range: ['#2166ac', '#b2182b'] } } },
}Preset fields
A field named here paints through its own scale while scale.type is unset, and range and names index its levels in order while domain is unwritten. Any other field is threshold.
| Field | Scale | Levels | Names | Other defaults |
|---|---|---|---|---|
source | ordinal |
Config slots
A setting written to it replaces it whole: a member left out returns to its default. 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 |
|---|---|
fieldstringEnum ("", score, source) = '' | score for the plotted value, through scale; source for each subtrack's row color, which reads no scale. Unset, a color writing a scale maps score, and one writing nothing maps source on bars, points and lines and score on a heatmap. |
valuemaybeColor | One CSS color for every mark, a density cell included, so a heatmap under one is a flat strip. Unset, the display paints the pair about the origin, and several sources sharing one plot box each paint their row color. |
| scale WiggleColorScale sub-schema | The scale from the score to a color. threshold paints each band between two of its cuts, solid, on every mark; linear runs range, else scheme, else viridis across the y domain through encoding.y.scale.type, with domainMid at the middle stop, coloring each bar, point and density cell by its score; a one-color range paints flat, so one color is value. With type unset, range is the pair about the origin: a threshold on bars, points and lines, and on a heatmap a ramp through white at the origin. |
| legend WiggleColorLegend sub-schema | The key this channel draws. |
scale.typemaybeStringEnum (linear, threshold) | threshold bands score at the domain cuts, solid on every mark, linear ramps it across the y domain; unset, range is the pair about the origin, solid on bars, points and lines and fading from white there on a heatmap |
scale.domainstringArray = [] | for a threshold scale, up to eight cut points, sorted, empty meaning one at the origin |
scale.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 painting flat |
scale.schememaybeStringEnum (viridis, magma, inferno, cividis, juicebox, fall, reds, blues, redblue, purpleorange, redgreyblue, redyellowblue) | a named ramp: a ramp scale runs along it, a threshold that writes cuts takes one color per interval from end to end, and an ordinal scale that lists a domain one per value; range's colors, where it lists any, win over it |
scale.reversemaybeBoolean | turns the ramp round, so its last color paints the bottom of a ramp's domain or a threshold's lowest interval; unset follows the field's preset, else runs as written |
scale.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 |
scale.namesstringArray = [] | key name for each domain value, one each in order, or under threshold for each interval from the lowest; a value past the end of the list shows its own |
legend.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