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: [
{
mark: 'bar',
encoding: { y: 'score', color: { field: 'strand', scale: 'categorical' } },
maxBpPerPx: 100,
},
{
mark: 'bar',
transform: [
{ type: 'bin', step: 10000 },
{ type: 'aggregate', groupby: ['start', 'end'], ops: [{ op: 'count' }] },
],
minBpPerPx: 100,
},
],
},
],
}See the Config slots section below for all available configuration fields.
A grammar of graphics over a feature, alignments or variant track: a list of marks — bars, points, rules, lines, spans, text or links — each with an encoding naming which feature fields feed its channels and a transform list run before it. 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
- Extended by: LinearManhattanDisplay
- State model: runtime API
- Guide: Circular genome view
- Guide: Custom track and display types
- Config guide: Hi-C track
- 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.shape.valuestringEnum = 'circle' | circle, triangle-down or diamond, or a jexl callback over feature returning one, for a point mark whose shape is not a scale.callback args: feature |
marks.encoding.shape.fieldfeatureField = '' | The feature field a categorical scale reads — or a jexl expression over feature, which is slower per feature and so the opt-in. |
marks.encoding.shape.scalemaybeStringEnum (none, categorical) | categorical hands a shape from range to each distinct value of field; none draws value. Unset beside a field, it is categorical. |
marks.encoding.shape.rangestringEnumArray = [] | The shape names a categorical scale hands out, in order. Empty is circle, triangle-down, diamond. |
marks.encoding.shape.domainstringArray = [] | The values in legend order, walking range from the first entry; left empty, each value derives its shape from itself, so every region agrees. |
marks.encoding.shape.titlemaybeString | The heading of the key a categorical scale draws, naming what the shape marks. Unset, the key is titled with field; "" is a key with no title. |
marks.encoding.shape.labelsstringArray = [] | What the key names each domain value, one each in order; one past the list keeps its own name. |
marks.encoding.shape.breaksstringArray = [] | The values the key lists, in this order; empty lists every value the loaded regions met. A value left out still takes its shape. |
marks.encoding.shape.missingLabelmaybeString | What the key calls a feature with nothing in field; unset is "(no value)". |
marks.encoding.xfeatureField = 'start' | The feature field, or jexl expression over feature, giving the mark's left edge in bp. |
| marks.encoding.x2 MarkLocus | The feature field, or jexl expression, giving the mark's right edge in bp, or for a link its far foot: an object naming the field holding the foot's sequence beside the one holding its position, where a mate may lie on another sequence. Left at end behind a mate step, it is the other end the step found. |
marks.encoding.yfeatureField = '' | The feature field, or jexl expression over feature, plotted on the score axis. A feature whose value is not a finite number is skipped. Empty reads what the steps before this mark's encode wrote, the way a ggplot2 stat names what its geom plots: a coverage step's depth, or the one summary an aggregate with one op writes. A bar or point with neither draws nothing, and the track's corner notice says so, while a text with neither stands at the apex of a link drawn between its two ends, or in the middle of its band where none is. The scale it is read through is the display's scales.y. |
marks.encoding.rowfeatureField = '' | The feature field, or jexl expression, naming the band the mark stands in, an integer from 0; a feature with nothing there sits on band 0. Empty reads the field the last pileup before this mark's encode wrote, this mark's own, the facet's or the display's, and puts every mark on one band across the whole plot where none packs. |
| marks.encoding.color MarkColor | The mark's colour: a field through a categorical or continuous scale, written bare or as an object with the scale's members, or a constant { value }, a CSS colour or a jexl callback returning one. A scale is what the legend describes. |
marks.encoding.shapemarkShapeSchema | For a point mark: a field through a categorical scale over circle, triangle-down and diamond, written bare or as an object, or a constant { value }, one of those names or a jexl callback returning one. A scale is what the legend describes. |
marks.encoding.textfeatureField = 'name' | For a text mark: the feature field, or jexl expression over feature, it prints, name unset. A feature with nothing there prints nothing. |
| marks.encoding.size MarkSize | The mark's size in px: a number is a point's diameter, a rule's thickness, a line's width or a link's stroke; a field, which a link alone reads, goes through a linear or log scale into a stroke width, range the px at each end of the domain. The track menu's Point size writes every point mark's number. |
marks.markstringEnum (bar, point, rule, line, span, text, link) = 'bar' | bar stands between origin and y; point is a shape at y over the middle of x to x2; rule is a line across x to x2 at y, encoding.size px thick; line is a stroke through consecutive values, held across each span or run centre to centre as interpolate says, dropping to origin across a gap; span is a band across the whole plot from x to x2; text prints a field over the middle of x to x2, just above y where it names one, at the apex of a link drawn between the same two ends, and in the middle of its band otherwise, and a label that would overlap one already placed to its left is left out; link is a curve from x up and over to x2, which may lie on another sequence, its apex at y where it names one. |
marks.interpolatestringEnum (step, linear) = 'step' | How a line joins its values: step holds each across its span, as the data says; linear runs from one span's centre to the next, smoother where the spans are few. Read by a line alone. |
marks.linkShapestringEnum (dome, arc, line) = 'dome' | How a link mark draws: dome, a half-ellipse whose apex is the pair's half-width clamped to the band, arc, a true semicircle that may leave it, or line, a straight segment between the feet, on the baseline or at the y value. Past three block widths a dome or arc becomes a circle whose legs rise from each foot. |
marks.rowProportionnumber = 1 | The fraction of its row's height a span fills, centred in the row, so below 1 the rows stand apart. Read by a span alone; the track menu's Row height presets write every span's. |
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.transform MarkTransform | Steps over the region's features before this mark encodes them, in order, after the display's own transform, and over each section alone under a facet. A bin then an aggregate grouped by start and end is a density: count per bin, which the mark plots as y unless its encoding names another field. |
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. |
marksmarkListSchema([]) | The marks to draw, in order — a later one paints over an earlier one. Each is a mark and an encoding. |
| transform MarkTransform | Steps over the region's features before the facet splits them and before any mark's own, after filter: where a field the facet reads is made, such as a formula lifting a read's tag. |
| facet MarkFacet | Labelled sections, one per value of a field, each as tall as its steps pack it: "HP", or { field, domain, transform } with the order the sections stack in and the steps each runs before any mark's, a per-section pileup among them. A chip names each section and hides it. Split after transform and before any mark's own steps. |
| rows Rows | One row per value of a field, for bar and point marks: "source" over a multi-BigWig is one xyplot per file. The worker splits the features on the field as it does for facet, and the rows take the tree sidebar, the row labels, clustering and the arrangement dialog, whose order, labels, tree and focus this object holds. Beside a facet, the facet draws; on another field that asks for bands of rows, which are not drawn yet, and a notice says so. |
| rowColor RowColor | The bar beside each row's label, the marks keeping their own colour: under the default field name, a row's value paired with a colour in domain/range, which the arrangement dialog writes. |
| scales ValueScale | The scales the marks are read through, owned by the display rather than by a mark: y alone, and every mark's encoding.y shares it. The same object the wiggle family declares. |
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 |
showLegendboolean = true | Draw the colour key for every mark whose colour is a scale. Defaults to on. |
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 |
showTreeboolean = true | show the cluster tree beside the rows |
showBranchLengthboolean = true | position tree nodes by branch length (dendrogram) rather than evenly by topology (cladogram) |
showRowLabelsboolean = true | draw the row value over the left of each row |
treeAreaWidthnumber = 80 | width in px of the tree sidebar, which a drag on its edge also writes |
rowHeightnumber = 0 | per-row height in px under rows, scrolling the rows that do not fit; 0 (the default) fits the rows to the plot instead, dividing it between them |
filterexpressionArray = [] | jexl: expressions a feature must pass to be drawn |