LDTrackDisplay
Auto-generated config schema for the current JBrowse release — see the
config guide for concepts. Provided by the variants
plugin.
View source.
Example usage
The pre-computed heatmap, with the legend on so the R² ramp is labelled:
{
type: 'LDTrack',
trackId: 'ld',
name: 'Linkage disequilibrium',
assemblyNames: ['hg38'],
adapter: {
type: 'PlinkLDTabixAdapter',
uri: 'https://example.com/plink.ld.gz',
},
displays: [
{
type: 'LDTrackDisplay',
displayId: 'ld-LDTrackDisplay',
showLegend: true,
},
],
}
See the Config slots section below for all available configuration fields.
Linkage disequilibrium heatmap read from an LDTrack's pre-computed file (e.g.
PLINK --r2 output), rather than computed from genotypes. Use
LDDisplay instead to compute LD from a VariantTrack's own
VCF.
The genotype-derived filters the shared base declares
(minorAlleleFrequencyFilter, hweFilterThreshold, callRateFilter) have
nothing to act on here — the file's rows are already computed — so they are
inherited but inert.
Every slot comes from the shared base below; this display adds none of its own.
Related links
- Adapter: PlinkLDAdapter
- Adapter: PlinkLDTabixAdapter
- Base config: SharedLDDisplay
- Guide: Custom track and display types
- Guide: Defaults for all tracks
- Guide: Tracks
Config slots
These slots go on a display entry:
"displays": [{ "type": "LDTrackDisplay", ... }], 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 |
|---|---|
| Inherited from SharedLDDisplay | 17 slots |
minorAlleleFrequencyFilternumber = 0.1 | Filter variants by minor allele frequency (0-1). Variants with MAF below this threshold will be hidden advanced |
lengthCutoffFilternumber = Number.MAX_SAFE_INTEGER | Maximum length of variants to include (in bp) advanced |
lineZoneHeightnumber = 100 | Height of the zone for connecting lines at the top advanced |
ldMetricstringEnum (r2, dprime) = 'r2' | LD metric to compute: 'r2' (squared correlation) or 'dprime' (normalized D) |
showLegendmaybeBoolean = false promotable | Whether to show the legend. Unset (the default) follows the session-wide default for this display type, falling back to off; an explicit true/false customizes the track. |
showLDTriangleboolean = true | Whether to show the LD triangle heatmap |
squashToHeightboolean = false | When true, squash the LD triangle to fit the display height advanced |
hweFilterThresholdnumber = 0 | HWE filter p-value threshold (variants with HWE p < this are excluded). Set to 0 to disable HWE filtering advanced |
callRateFilternumber = 0 | Call rate filter threshold (0-1). Variants with fewer than this proportion of non-missing genotypes are excluded. Set to 0 to disable. advanced |
maxVariantSeparationnumber = 0 | Maximum separation, in variants, between the two SNPs of a computed pair. Pairs further apart are not computed and not drawn, which turns the matrix from n²/2 cells into n·k and so makes the cost linear in the variant count rather than quadratic. This is plink's --ld-window, and like it the window is the way to look at a large region at all: the full triangle for 50,000 variants is 1.25e9 cells, which no GPU will allocate. Set to 0 for the full triangle.advanced |
showVerticalGuidesboolean = true | Whether to show vertical guides at the connected genome positions on hover advanced |
showLabelsboolean = false | Whether to show variant labels above the tick marks advanced |
tickHeightnumber = 6 | Height of the vertical tick marks at the genomic position advanced |
useGenomicPositionsboolean = false | When true, draw cells sized according to genomic distance between SNPs rather than uniform squares advanced |
signedLDboolean = false | When true, show signed LD values (-1 to 1) instead of absolute values (0 to 1). For R², this shows R (correlation) instead. For D', this preserves the sign. advanced |
ldMethodstringEnum (auto, phased, composite) = 'auto' | Which LD estimator to compute. 'auto' picks haplotypic LD for a phased callset and the Weir composite estimate for an unphased one, which is the most precise statistic each file can support. 'composite' forces the composite estimate even on phased data — the two are different statistics that coincide only under Hardy-Weinberg, so forcing it is how a phased panel is made comparable to an unphased cohort, or to plink --r2 output. 'phased' is a preference rather than an instruction: unphased data carries no gametes to count, so it declines to composite, and method on the result reports what actually ran.advanced |
heightnumber = 400 | Starting height in pixels for the LD triangle, excluding the lineZoneHeight band; drag-resizable |
| Inherited from BaseLinearDisplay | 5 slots |
maxFeatureScreenDensitynumber = 1 | maximum features per pixel before showing a "too many features" message advanced |
mouseoverstring = | text to display when the cursor hovers over a feature callback args: feature |
jexlFiltersstringArray = [] | config jexlFilters are deferred evaluated so they are prepended with jexl at runtime rather than being stored with jexl in the config |
fetchSizeLimitnumber = 1_000_000 | maximum data to attempt to download for a given track, used if adapter doesn't specify one advanced |
forceLoadboolean = false | Declarative equivalent of the "Force load" button on the "too much data" banner: when true the display always renders, however large the region or dense the features. Off by default (the gate guards against huge downloads). Set it on a view no one can interact with — an embedded / notebook view, or a screenshot — where the region is known and you want it drawn without a click. advanced |