LinearMultiRowFeatureDisplay
Auto-generated from the config schema in the source — see the config guide for concepts. Provided by the canvas plugin. View source.
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, coloring each row from rowColor 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',
displayId: 'ancestry_painting-LinearMultiRowFeatureDisplay',
rows: { field: 'sample', domain: ['HG00097', 'HG00096'] },
rowColor: {
domain: ['HG00096', 'HG00097'],
range: ['#4e79a7', '#f28e2b'],
},
},
],
}Omit rowColor entirely and the blocks paint in the default block color.
A row rowColor does not name paints the same way, unless unknown gives
unnamed rows a color. A feature's itemRgb is honored as its own color with
no configuration at all, and color.scale: 'identity' names it in the key.
To color per feature off some other attribute, set the color slot to a
jexl: expression reading it.
Omit rows.domain and the rows sort by value.
Paints interval features as colored blocks on stacked rows partitioned by a feature attribute ("chromosome / ancestry painting").
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
- Base config: BaseLinearDisplay
- Tutorial: ChromHMM chromatin states
- Tutorial: CNV cohort (TCGA)
- Tutorial: Phased trio analysis (1000 Genomes)
- Tutorial: QTL mapping (BXD mice)
- Tutorial: Structural variants (Cancer GIAB)
- User guide: Multi-row feature track
- Config guide: Grouping and lane order
- Config guide: Tracks
- Developer guide: Custom track and display types
Config slots
These 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 |
|---|---|
| rows Rows | One row per value of a feature attribute, and the arrangement a reader gives the rows. field names the attribute, or a jexl: expression derives one; empty, the default, picks one off the data (repClass where the features carry it, else name). domain is the row order: the values it lists lead, and the rest sort, digits by magnitude, with the row of features carrying no value last. labels, tree, treeProvenance and kept are what the arrangement dialog, a clustering run and a focus write, each as a session edit to this object. |
clusterFieldfeatureField = 'auto' | Feature attribute whose value each row is clustered on; auto (the default) takes the attribute the color slot reads, else name, and an empty string clusters on presence alone — which bins each row covers. A jexl: expression derives the value. |
lengthFieldstring = '' | Feature attribute holding a signed bp length change against the reference, which turns on indel glyphs over the blocks; empty (the default) leaves the display a plain block painter. |
| color FeatureColor | Each block's fill, the FeatureColor object: a CSS color or jexl: callback in value, or a field whose values each take a color through a scale, with a key. Unset, a feature's own itemRgb paints it if it has one, else rowColor paints its row's blocks, else the default block color does. scale: 'identity' keeps each feature's own color and names the domain colors in the key, which is how a file's itemRgb states get their names. |
| rowColor RowColor | A color per row, by value, as domain/range pairs: the bar beside the row's label, and the row's blocks while no color or itemRgb colors them. The arrangement dialog writes it. |
rowProportionnumber = 1 | Fraction of the row height each block fills (1 = full, leaving no gap between rows). advanced |
showLegendboolean = true | Show the categorical color key, which appears only in per-feature color mode — elsewhere the sidebar labels are already the key. |
| rowGroups RowGroup | An array of { match, group } tagging each row with the group of the first entry whose regex its name matches, an attribute like any other: facet: 'group' stacks the groups in bands, and rowColor: { field: 'group' } colors them. A row no entry matches has no group, and takes no color from the deal. |
| facet Facet | Stacks the rows in labelled bands: group bands them by their rowGroups group, the groups in the order rowGroups declares them unless domain lists some first, and the rows no entry matches last. Each band keeps the rows' arranged order and, where the cluster tree holds a clade of exactly its rows, draws that clade; a clustering run clusters each band apart. |
fetchSizeLimitnumber = 5_000_000 | The byte axis is the only gate this display has: it paints into fixed lanes, so it composes no density axis to fall through to. advanced |
rowHeightnumber = 0 | fixed row height in px; 0 (the default) auto-fits all rows to the display height, so adding rows shrinks them instead of growing the track |
showRowSeparatorsboolean = false | draw a hairline between adjacent rows; off by default, because a painting whose neighbouring rows differ in color already separates itself and the line only earns its pixel where they do not — a run of same-colored rows reads as one block without it, with no way to recover the row count by eye. Drawn only once rows are at least 4px tall: below that the line is as thick as the row it borders, turning a dense painting into a grid of hairlines with a little color between them |
showTreeboolean = true | show the cluster tree sidebar |
showBranchLengthboolean = true | position tree nodes by branch length (dendrogram) rather than evenly by topology (cladogram) |
showRowLabelsboolean = true | draw the row name over the left of each row |
treeAreaWidthnumber = 80 | width in px of the tree sidebar, which a drag on its edge also writes |
| Inherited from BaseLinearDisplay | 2 slots |
heightnumber = 100 | 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 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 |
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 |