LDColor
Auto-generated from the config schema in the source — see the config guide for concepts. Provided by the variants plugin. View source.
The LD display's encoding.color paints the statistic the cells show,
r2 or dprime, through a linear scale onto a named scale.scheme. An
unset scheme is the metric's own, reds for r² and blues for D'. The domain
is the statistic's 0 to 1 rather than the loaded values', so one r² paints
one color on every track; scale.domainMin and scale.domainMax narrow
it. The slots are the shared color channel's, so jbrowse validate and
"Edit plot..." judge them as they judge any other display's. A string is
the field.
Example usage
{
type: 'LDTrackDisplay',
encoding: {
color: { field: 'dprime', scale: { scheme: 'viridis', domainMin: 0.2 } },
},
}Config slots
A setting written to it replaces it whole, since its members are alternatives: 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 (r2, dprime) = 'r2' | The file column the cells show: r2 (R², the R2/PHASED_R2 column) or dprime (D', the DP/ABS_DPRIME one). A file with only one of the two uses that one whichever is asked for, and the legend and the menu show which. |
| scale LDColorScale sub-schema | The ramp the statistic runs along, Vega-Lite's scale object. |
scale.schememaybeStringEnum (viridis, magma, inferno, cividis, juicebox, fall, reds, blues, redblue, purpleorange, redgreyblue, redyellowblue) | the named ramp the statistic runs across; unset is the field's own, reds for r2 and blues for dprime |
scale.reversemaybeBoolean | Unset turns round a scheme dark at its low end, since an unpainted cell is the page behind the matrix. |
scale.domainMinmaybeNumber | the value the bottom color paints, everything below it too; unset is 0 |
scale.domainMaxmaybeNumber | the value the top color paints, everything above it too; unset is 1 |
scale.typemaybeStringEnum (linear) | linear, the one scale; unset is linear |
Related links
- Tutorial: LD at a selective sweep (human)
- Config guide: Variant track
- Developer guide: Upgrading to v5