LDColor
Auto-generated config schema for the current JBrowse release — see the config guide for concepts. Provided by the variants plugin. View source.
Example usage
{
type: 'LDTrackDisplay',
color: { field: 'dprime', scheme: 'viridis', domainMin: 0.2 },
}See the Config slots section below for all available configuration fields.
The LD display's color: which statistic the cells are, r2 or dprime,
through a linear scale onto a named 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 colour on every
track; domainMin and domainMax narrow it. The slots are the shared
colour object's, so jbrowse validate and "Edit plot..." judge them as they
judge any other display's.
Config slots
These slots go on a display entry: "displays": [{ "type": "LDColor", ... }], 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 |
|---|---|
fieldstringEnum (r2, dprime) = 'r2' | Which of the file's columns the cells are: r2 (R², the R2/PHASED_R2 column) or dprime (D', the DP/ABS_DPRIME one). A file that carries only one of the two serves that one whichever is asked for, and the legend and the menu say which. |
schememaybeStringEnum (viridis, magma, inferno, cividis, juicebox, fall, reds, blues, redblue, purpleorange, redgreyblue) | the named ramp the statistic runs across; unset is the field's own, reds for r2 and blues for dprime |
reversemaybeBoolean | Unset turns round a scheme dark at its low end, since an unpainted cell is the page behind the matrix. |
domainMinmaybeNumber | the value the bottom colour paints, everything below it too; unset is 0 |
domainMaxmaybeNumber | the value the top colour paints, everything above it too; unset is 1 |
scalemaybeStringEnum (linear) | linear, the one scale; unset is linear |
Related links
- Guide: LD at a selective sweep (human)
- Guide: Upgrading to v5
- Config guide: Variant track