LinearMarkDisplay
Auto-generated config schema for the current JBrowse release — see the config guide for concepts. Provided by the marks plugin. View source.
Example usage
A BED score column as bars, coloured by strand, with the key on screen, and a per-10 kb count in its place once the view is wider than 100 bp per px:
{
type: 'FeatureTrack',
trackId: 'scores',
name: 'Scores',
assemblyNames: ['hg38'],
adapter: { type: 'BedTabixAdapter', uri: 'https://example.com/scores.bed.gz' },
displays: [
{
type: 'LinearMarkDisplay',
displayId: 'scores-LinearMarkDisplay',
marks: [
{
shape: 'bar',
encoding: { y: 'score', color: { field: 'strand', scale: 'categorical' } },
maxBpPerPx: 100,
},
{
shape: 'bar',
transform: [
{ type: 'bin', step: 10000 },
{ type: 'aggregate', groupby: ['start', 'end'], ops: [{ op: 'count' }] },
],
encoding: { y: 'count' },
minBpPerPx: 100,
},
],
},
],
}
See the Config slots section below for all available configuration fields.
A display whose picture is declared in config: a list of marks — bars, points or spans — each with an encoding naming which feature fields feed its channels. One fetch per region evaluates every encoding in the worker; the marks draw in order over one score axis.
Related links
- Adapter: BedAdapter
- Adapter: BedTabixAdapter
- Adapter: BigBedAdapter
- Adapter: CrisprGuideAdapter
- Adapter: FromConfigAdapter
- Adapter: Gff3Adapter
- Adapter: Gff3TabixAdapter
- Adapter: GtfAdapter
- Adapter: GtfTabixAdapter
- Adapter: NCListAdapter
- Adapter: SequenceSearchAdapter
- Adapter: SPARQLAdapter
- State model: runtime API
- Guide: Circular genome view
- Guide: Custom track and display types
- Guide: Mark display
- Guide: Tracks
Config slots
These slots go on a display entry: "displays": [{ "type": "LinearMarkDisplay", ... }], 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 |
|---|---|
marks.encoding.color.valuecolor = '#0068d1' | A CSS colour, or a jexl callback over feature returning one, for a mark whose colour is not a scale. Writing color: 'red' or color: 'jexl:…' directly on the encoding lands here.callback args: feature |
marks.encoding.color.fieldstring = '' | The feature field a scale reads — or a jexl callback over feature, which is slower per feature and so the opt-in. |
marks.encoding.color.scalestringEnum (none, categorical, linear, log) = 'none' | How field becomes a colour. categorical hands out palette entries per distinct value; linear and log read the value through domain into ramp. none paints value. |
marks.encoding.color.palettestringArray = [] | The CSS colours a categorical scale hands out, in order. Empty uses the built-in qualitative palette. |
marks.encoding.color.domainstringArray = [] | For a categorical scale, the values in legend order, walking the palette from the first entry; left empty, each value derives its colour from itself, so every region agrees. For a linear or log scale, the [min, max] the ramp spans; empty uses each region's own extremes. |
marks.encoding.color.rampstringArray = [] | A linear or log scale's ramp: ["viridis"], or two or more CSS colour stops spaced evenly. Empty is viridis. |
marks.encoding.glyph.valuestring = 'disc' | disc, triangle or diamond, or a jexl callback over feature returning one, for a point mark whose glyph is not a scale. Writing glyph: 'triangle' directly on the encoding lands here.callback args: feature |
marks.encoding.glyph.fieldstring = '' | The feature field a categorical scale reads — or a jexl callback over feature, which is slower per feature and so the opt-in. |
marks.encoding.glyph.scalestringEnum (none, categorical) = 'none' | categorical hands a glyph from range to each distinct value of field; none draws value. |
marks.encoding.glyph.rangestringArray = [] | The glyph names a categorical scale hands out, in order. Empty is disc, triangle, diamond. |
marks.encoding.glyph.domainstringArray = [] | The values in legend order, walking range from the first entry; left empty, each value derives its glyph from itself, so every region agrees. |
marks.encoding.y.fieldstring = '' | The feature field, or jexl callback over feature, plotted on the score axis. A feature whose value is not a finite number is skipped. Empty for a mark with no value, such as a span; a bar or point must name one, and the config is refused where it does not. Writing y: 'score' directly on the encoding lands here. |
marks.encoding.y.scalestringEnum (linear, log) = 'linear' | How the axis reads the domain. This is the display's value scale: the ticks, the cross-hatches and the shader's placement all come from it, and the first mark that names a field is the one that owns it. |
marks.encoding.y.domainstringArray = [] | The [min, max] the axis spans, pinning what would otherwise autoscale to the loaded regions. An empty entry autoscales that end, so ["0", ""] pins the floor alone. The score menu's "Set min/max" writes here. |
marks.encoding.y.resolvestringEnum (shared, independent) = 'shared' | Which axis this mark reads. shared folds it into the display's one y domain with every other mark. independent gives it a domain folded from its own layers and a second axis on the right, so a coverage run and the raw features can share a plot. One mark per display may ask for it. |
marks.encoding.xstring = 'start' | The feature field, or jexl callback over feature, giving the mark's left edge in bp. |
marks.encoding.x2string = 'end' | The feature field, or jexl callback, giving the mark's right edge in bp. |
marks.encoding.ymarkValueSchema | The value plotted on the score axis: a feature field, a jexl callback, or an object naming the field with the scale it is read through. The scale is the display's — its axis and its shader read the same declaration. |
marks.encoding.rowstring = '' | For a span mark: the feature field, or jexl callback, naming the band the span stacks on, an integer from 0; a feature with nothing there sits on band 0. Empty puts every span on one band across the whole plot. |
marks.encoding.colormarkColorSchema | The mark's colour: a CSS colour, a jexl callback returning one, or an object binding a field to a categorical or continuous scale. A scale is what the legend describes. |
marks.encoding.glyphmarkGlyphSchema | For a point mark: disc, triangle or diamond, a jexl callback over feature returning one, or an object binding a field to a categorical scale over those names. A scale is what the legend describes. |
marks.transform.ops.opstringEnum (count, sum, mean, min, max) = 'count' | count needs no field; sum, mean, min and max read one. |
marks.transform.ops.fieldstring = '' | The feature field the op reads, for every op but count. |
marks.transform.ops.asstring = '' | The output field. Empty is count, or <op>_<field>. |
marks.transform.typestringEnum (filter, formula, bin, aggregate, coverage, flatten, stack) = 'filter' | filter keeps the features expr admits; formula writes expr's value into as; bin snaps each feature to the step-bp bin its field falls in, writing the bin's edges over start and end (or the two names in as); aggregate folds each groupby group into one feature carrying ops; coverage replaces the features with runs of how many overlap each stretch, in as (coverage); flatten fans out an array field; stack writes each feature's row in a greedy first-fit packing, which a span reading row draws as a pileup. |
marks.transform.exprstring = '' | A jexl callback over feature, for a filter or formula step.callback args: feature |
marks.transform.fieldstring = '' | For a bin step, the field placing a feature in a bin, start when empty; for a flatten step, the array field fanned out, subfeatures when empty. |
marks.transform.stepnumber = 10000 | For a bin step: the bin width in bp, aligned to the genome, or "auto" for a width that follows the view's zoom — the target of four pixels per bin, snapped up to the next 1/2/5 rung, resolved before the fetch and keyed into it. |
marks.transform.asstringArray = [] | The field a formula, coverage or stack step writes, the two fields a bin step writes its edges to, or the field a flatten step writes each element's index to. A single name may be written as a string. A stack leaving it empty writes row. |
marks.transform.fieldsstringArray = [] | For a stack step: the two fields giving the interval it packs, start and end when empty. |
marks.transform.paddingnumber = 0 | For a stack step: bp of clearance kept between two features sharing a row, so a pileup does not butt its reads together. |
marks.transform.groupbystringArray = [] | For an aggregate step: the fields whose distinct value sets make the groups — ["start", "end"] after a bin. Empty folds the whole region into one feature. For a stack step: the groups packed on their own rows, each numbered from 0. |
marks.transform.opstypes.array(aggregateOpSchema) | For an aggregate step: the summaries each group carries. |
marks.shapestringEnum (bar, point, span) = 'bar' | bar stands between origin and y; point is a glyph at y; span is a band across the whole plot from x to x2. |
marks.encodingmarkEncodingSchema | Which feature fields feed the mark's channels. Every channel has a default, so {} draws a bar from start to end with no value. |
marks.transformtypes.array(transformStepSchema) | Steps over the region's features before this mark encodes them, in order, after the display's jexlFilters. A bin then an aggregate grouped by start and end is a density: count per bin, plotted as y. |
marks.sourcestringEnum (features, density) = 'features' | Where this mark draws from once the byte gate refuses the features. features is off — the mark draws nothing past the budget. density draws the adapter's densityAdapter sidecar in the banner's place, one bar per sidecar bin over this mark's own y axis, and needs no transform: the sidecar has already binned. With no density mark the banner stands. |
marks.minBpPerPxnumber = 0 | The mark draws only when the view is at least this zoomed out, in bp per px. 0 sets no bound. With maxBpPerPx on another mark, one config shows a density zoomed out and the features zoomed in. |
marks.maxBpPerPxnumber = 0 | The mark draws only when the view is zoomed in past this, in bp per px. 0 sets no bound. |
markstypes.array(markSchema) | The marks to draw, in order — a later one paints over an earlier one. Each is a shape and an encoding. |
originnumber = 0 | The value bars grow from. The axis widens to include it whenever a bar mark is drawn. |
minWidthPxnumber = 1 | Narrowest a bar or span is painted, in px, grown off its start edge. advanced |
scatterPointSizenumber = 4 | Diameter in px of point marks. |
minimalTicksboolean = false | Draw only the min/max y-axis ticks. advanced |
showLegendboolean = true | Draw the colour key for every mark whose colour is a scale. Defaults to on. |
jexlFiltersstringArray = [] | Jexl filters every feature must pass before it is encoded, written without the jexl: prefix. |
heightnumber = 150 | default height for the track |
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 |
densityTierstringEnum (auto, features, density) = 'auto' | when to draw the features-per-bin density band in place of features: "auto" swaps to it where the region is too large to fetch, "features" never does and keeps the banner, "density" always does. Needs a density source on the adapter (its densityAdapter slot) advanced |
densityTierBpPerPxnumber = 0 | in "auto" mode, also draw the density band from this many bp per pixel outward, before the region is too large to fetch; 0 leaves the swap to the fetch-size gate alone advanced |
minScorenumber = Number.MIN_VALUE | Fixed minimum score bound. The default (Number.MIN_VALUE) is a sentinel meaning "unset, use autoscale" advanced |
maxScorenumber = Number.MAX_VALUE | Fixed maximum score bound. The default (Number.MAX_VALUE) is a sentinel meaning "unset, use autoscale" advanced |
scaleTypestringEnum (linear, log) = 'linear' | Scale type (linear or log) |
autoscalestringEnum (local, localsd, localpercentile) = 'localpercentile' | Autoscale type: "local" uses the min/max in the visible region, "localsd" uses mean ± numStdDev standard deviations, "localpercentile" uses the numQuantile-th percentile score as the max (robust to skewed/peaky data) |
numStdDevnumber = 3 | Number of standard deviations to use for the localsd autoscale type advanced |
displayCrossHatchesboolean = false | Rule the score axis with horizontal cross hatches at the tick positions — the config form of the score menu's "Show cross hatches". Ignored by the density rendering types, which spend color rather than height on the score and so have no axis to rule |