LinearMultiRowFeatureDisplay
Auto-generated from the config schema in the source. See the config guide for concepts. Provided by the marks plugin. View source.
Colored features in stacked rows, one row per value of a feature
attribute: a chromosome painting, an ancestry painting, a chromatin-state
track per cell type. It is the mark display with a rect per feature as
its plot, so every mark, scale, facet and row setting applies.
It draws what the config states and saves no guess. Rows: one per value
of rows.field, whose declared default is type, so a GFF3 draws a row per
feature type and a ClinVar bigBed a row per variant type. rows: 'sample'
or rows: { field: 'sample', ... } overrides it, as the examples write, and
rows: '' is one row. Where no feature in view carries the field in force,
as a plain BED carries no type, the features draw in the one row of no
value and the display opens the track menu's One row per picker once,
listing the attributes the features in view carry. Color: a stated rows.colors entry, else each feature's own BED
color (itemRgb, a bigBed's reserved, a BED9's ninth column), else the
default; a placeholder 0 or 0,0,0 reads as no color. A key appears only
where a color names its values: a field, or an identity scale's domain
and names, as the second example writes. Shape: one rect per feature;
"Edit plot..." offers a BED12 row's blocks joined by a line, and a
transcript with its protein domains over it.
Example usage
A custom BED with a column naming each row, its columns named by a
#-prefixed header line (tab-separated, shown space-aligned):
#chrom start end name sample
chr1 0 2000000 seg1 HG00096
chr1 2000000 5500000 seg2 HG00096
chr1 0 3500000 seg3 HG00097Paint one row per sample, pinning each row's color in rows.colors and fixing
HG00097 above HG00096 regardless of file order:
{
type: 'FeatureTrack',
trackId: 'ancestry_painting',
name: 'Ancestry painting',
assemblyNames: ['hg38'],
adapter: {
type: 'BedTabixAdapter',
uri: 'https://example.com/painting.bed.gz',
},
displays: [
{
type: 'LinearMultiRowFeatureDisplay',
rows: {
field: 'sample',
sort: ['HG00097', 'HG00096'],
colors: { HG00096: '#4e79a7', HG00097: '#f28e2b' },
},
},
],
}The rows shorthand, a row per sample, and each feature in its file's
BED color, with a key naming three of them;
where black is a color the file means, the written identity scale also
paints 0,0,0 as black:
{
type: 'LinearMultiRowFeatureDisplay',
rows: 'sample',
encoding: {
color: {
scale: {
type: 'identity',
domain: ['rgb(227,26,28)', 'rgb(31,120,180)', 'rgb(170,170,170)'],
names: ['Maternal', 'Paternal', 'Unknown'],
},
},
},
}One row, written so the type default does not split the features:
{ type: 'LinearMultiRowFeatureDisplay', rows: '' }Related links
- Adapter: BedAdapter
- Adapter: BedTabixAdapter
- Adapter: BigBedAdapter
- Adapter: CrisprGuideAdapter
- Adapter: FromConfigAdapter
- Adapter: GenbankAdapter
- Adapter: Gff3Adapter
- Adapter: Gff3TabixAdapter
- Adapter: GtfAdapter
- Adapter: GtfTabixAdapter
- Adapter: NCListAdapter
- Adapter: SequenceSearchAdapter
- Adapter: SPARQLAdapter
- State model: runtime API
- Base config: LinearMarkDisplay
- Tutorial: ChromHMM chromatin states
- Tutorial: CNV cohort (TCGA)
- Tutorial: Structural variants (Cancer GIAB) part 2: copy number
- User guide: Multi-row feature track
- Config guide: Grouping and lane order
- 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": "LinearMultiRowFeatureDisplay", ... }], 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 |
|---|---|
fetchSizeLimitnumber = 5000000 |
The bytes a region may download before the display asks first: a painting's rows stack many features over each base. advanced |
| marks list of Mark entries |
The plot, as LinearMarkDisplay reads it: unwritten, a rect per feature. |
| rows MultiRowRows |
The rows, a MultiRowRows: a row per value of field, type unless written, and '' for one row. |
| tooltip MultiRowTooltip |
The box hovering a feature opens, a MultiRowTooltip: its first line names the feature, its name else its ID, unless field says otherwise. |
| Inherited from LinearMarkDisplay | 33 slots |
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 of strings or numbers = [] |
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 of strings or numbers = [] |
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 of strings or numbers = [] |
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. |
| 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. |
| 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 |
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 |