LinearMarkDisplay
Auto-generated from the config schema in the source — see the config guide for concepts. Provided by the marks plugin. View source.
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.
Example usage
A BED score column as bars, colored 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: { type: 'ordinal' } },
},
maxBpPerPx: 100,
},
{
mark: 'bar',
transform: [
{ type: 'bin', step: 10000 },
{ type: 'aggregate', groupby: ['start', 'end'], ops: [{ op: 'count' }] },
],
minBpPerPx: 100,
},
],
},
],
}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
- User guide: Circular genome view
- Config guide: Hi-C track
- Config guide: Mark display
- Config guide: Tracks
- Developer guide: Custom track and display types
Config slots
Display 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, triangle-down, diamond, square) = 'circle' | circle, triangle-down, diamond or square, 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 an ordinal scale reads — or a jexl expression over feature, which is slower per feature and so the opt-in. |
| marks.encoding.shape.scale MarkShapeScale sub-schema | How the field's values map to shapes, Vega-Lite's scale object. |
marks.encoding.shape.scale.typemaybeStringEnum (ordinal) | ordinal hands a shape from range to each distinct value of field. Unset beside a field, it is ordinal. |
marks.encoding.shape.scale.rangestringEnumArray (circle, triangle-down, diamond, square) = [] | The shape names an ordinal scale hands out, in order. Empty is circle, triangle-down, diamond; square draws only where listed. |
marks.encoding.shape.scale.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.scale.namesstringArray = [] | The key's name for each domain value, one each in order; a value past the end of the list shows its name. |
| marks.encoding.shape.legend MarkShapeLegend sub-schema | The key this channel's scale draws. |
marks.encoding.shape.legend.titlemaybeString | The heading of the key an ordinal scale draws, naming what the shape marks. Unset, the key is titled with field; "" is a key with no title. |
marks.encoding.shape.legend.valuesstringArray = [] | 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.legend.missingLabelmaybeString | The key's name for a feature with nothing in field; unset is "(no value)". Vega-Lite's legend has no such member, so it keeps its JBrowse name. |
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 shows a corner notice, 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 encoding.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 color: a field through an ordinal or continuous scale, written bare or as an object, or a constant { value }, a CSS color or a jexl callback returning one. legend shapes the key the scale draws. |
| marks.encoding.shape MarkShape sub-schema | For a point mark: a field through an ordinal scale over circle, triangle-down and diamond, written bare or as an object, or a constant { value }, one of those names, square, or a jexl callback returning one. legend shapes the key the scale draws. |
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 | A point's diameter in px. The track menu's Point size writes every point mark's number. |
| marks.encoding.strokeWidth MarkSize | A stroked mark's width in px, Vega-Lite's stroke width: a rule's or a line's thickness, or a link's stroke; a field, which a link alone reads, goes through a linear or log scale into a width, scale.range the px at each end of the domain. |
| marks.mark MarkDef | What the mark draws, a MarkDef object or its type alone: bar, point, rule, line, span, text or link, with the members one type reads, a line's or a link's interpolate, a span's height and a line's gapBp. |
| marks.encoding MarkEncoding sub-schema | The feature field each of the mark's channels reads. 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.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. |
| marks list of Mark entries | 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, sort, 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: "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, the display shows a notice. |
| rowColor RowColor | The bar beside each row's label; the marks keep their color. Under the default field name, a row's value paired with a color in scale.domain/scale.range, which the arrangement dialog writes. |
| axis RowAxis | The row axis down the left of the rows rows draws: the cluster tree and each row's value. The value axis is encoding.y.axis. |
| encoding YEncoding | The channels the marks are read through, owned by the display rather than by a mark: y alone, a YChannel every mark's encoding.y shares. It names no field, since each mark names its own, so a bare string here is refused. encoding.y.axis is the value axis; the row axis beside rows is axis. |
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 |
| legend Legend | The key for every mark whose color or shape is a scale; show defaults to on. |
| filter FieldPredicate | The features the display draws, a list of FieldPredicate entries a feature must all pass: a field of the feature's own ({ field: "score", gte: 5 }) or a jexl: expression that must hold. |
heightnumber = 150 | default height for the track |
fetchSizeLimitnumber = 1000000 | bytes a region may fetch before the display asks first; an adapter that sets its own limit overrides this 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 |
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 |
Retired keys
An older config may still write these. Each loads without an error, and jbrowse validate reports it as stale.
| Key | On load |
|---|---|
scales | moved into a current slot |
maxFeatureScreenDensity | ignored |
maxDisplayedBpPerPx | ignored |
mouseover | ignored |
jexlFilters | moved into a current slot |
showTree | moved into a current slot |
showBranchLength | moved into a current slot |
showRowLabels | moved into a current slot |
treeAreaWidth | moved into a current slot |