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 display for feature, alignments or variant tracks. It is experimental in v5, and its settings may change. A list of marks — bars, points, rules, lines, rects, 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
- Extended by: LinearMultiRowFeatureDisplay
- 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
Color channels
| Setting | Page | scale.type |
Preset fields |
|---|---|---|---|
marks.encoding.color |
MarkColor | ordinal, linear, log, symlog, threshold, identity | strand, svType, impact, score |
encoding.color |
MarkColor | ordinal, linear, log, symlog, threshold, identity | strand, svType, impact, score |
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. |
| 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 assigns each distinct value of field a shape from range. Unset beside a field, it is ordinal. |
marks.encoding.shape.scale.rangestringEnumArray (circle, triangle-down, diamond, square) = [] |
The shape names an ordinal scale assigns, in order. When empty, the scale uses circle, triangle-down and diamond. square is used only if listed. |
marks.encoding.shape.scale.domainstringArray = [] |
The values in legend order, walking range from the first entry; left empty, each value's shape is computed from the value, 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. When empty, the field is the one the steps before this mark's encode produce: a coverage step's depth, or the single output of an aggregate with one op. 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. It is a px diameter, not Vega-Lite's area. |
| 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, rect, text or link, with the members one type reads, a line's or a link's interpolate, a rect'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 list of MarkTransform entries |
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 when the view's bp per px is at least this value. 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 list of MarkTransform entries |
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: "tags.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. Beside rows, a facet on a row attribute, the group rows.groups writes, stacks the rows in labelled bands instead, each band's rows in their arranged order. |
| rows MarkRows |
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, colors, tree and focus this object holds. A row's color, rows.colors pinned on it or rows.color mapped from an attribute, is the bar beside its label, and the color of a mark naming none, or of a mark colored by the rows' own field. A facet on a row attribute, the group rows.groups tags, stacks the rows in bands; a facet on a feature field draws its sections in place of the rows, and the display shows a notice. |
| encoding MarkDisplayEncoding |
The display-level MarkDisplayEncoding, shared by all marks. y is the YChannel that every mark's encoding.y uses, and it names no field because each mark sets its own. color is the default color for any mark whose encoding.color is unset, as a ggplot2 layer inherits the plot's aesthetics. encoding.y.axis is the value axis; the row axis is rows.axis. |
originnumber = 0 |
The value bars grow from. The axis widens to include it whenever a bar mark is drawn. |
| legend Legend |
The key for every mark whose color or shape is a scale; show defaults to on. |
| filter list of FieldPredicate entries |
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 takes precedence over 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 with no user interaction, such as an embedded or notebook view or a screenshot, where the region is known and should draw without a click. advanced |
Retired keys
An older config may still write these. Each loads without an error, and jbrowse validate reports it as stale.
| Key | On load |
|---|---|
maxFeatureScreenDensity |
ignored |
maxDisplayedBpPerPx |
ignored |
mouseover |
ignored |
jexlFilters |
moved into a current slot |
renderer |
ignored |
color |
ignored |