LinearMultiRowFeatureDisplay
Auto-generated config schema for the current JBrowse release — 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 HG00097
Paint one row per sample, coloring each row from sampleColorMap:
{
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',
partitionField: 'sample',
sampleColorMap: { HG00096: '#4e79a7', HG00097: '#f28e2b' },
},
],
}
Omit sampleColorMap entirely and each row is auto-assigned a distinct
palette color — unless the features carry an itemRgb, which is honored as
the per-feature color with no configuration at all. To color per feature off
some other attribute, set the color slot to a jexl: expression reading it.
See the Config slots section below for all available configuration fields.
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
- Guide: ChromHMM chromatin states
- Guide: CNV cohort (TCGA)
- Guide: Custom track and display types
- Guide: Multi-row feature track
- Guide: Pangenome (pggb)
- Guide: Phased trio analysis (1000 Genomes)
- Guide: QTL mapping (BXD mice)
- Guide: Structural variants (Cancer GIAB)
- Guide: Tracks
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 |
|---|---|
partitionFieldfeatureField = '' | Feature attribute whose value assigns each feature to a row; empty (the default) picks one off the data, and a jexl: expression derives one. |
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. |
colormaybeColor | Per-block fill: a CSS color, or a jexl: expression for per-feature coloring (e.g. jexl:`rgb(${get(feature,'ancestryRgb')})` ).callback args: feature |
sampleColorMapfrozen = {} | Optional map of partitionField value to color, e.g. { HG00096: '#4e79a7' }, overriding the color slot where it matches. |
rowProportionnumber = 1 | Fraction of the row height each block fills (1 = full, leaving no gap between rows). advanced |
colorRowLabelsboolean = false | Tint each sidebar label box with the color that row's blocks are painted in; rowGroups and a dialog-set color both win over it, and per-feature color mode leaves no one row color to tint with. |
showLegendboolean = true | Show the categorical color key, which appears only in per-feature color mode — elsewhere the sidebar labels are already the key. |
legendfrozen = [] | Explicit color key, for a category encoded only in the block color and so unavailable to the auto-derived legend this overrides. |
colorDomainstringArray = [] | The order the colour key lists its categories in: the labels listed here first, the rest sorted. The blocks take their colour per feature, from itemRgb or the color jexl, so this orders the key alone and paints nothing differently. |
rowGroupsfrozen = [] | An array of { match, group, color } tagging rows by a regex on their name, pulling matched rows into contiguous blocks (except under a cluster tree, which already owns the row order) and tinting their sidebar swatch — never their blocks. |
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 |
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 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 |
domainstringArray = [] | optional row order; listed partition values first, the rest sorted; left off, every value the data holds, sorted |
| Inherited from BaseLinearDisplay | 3 slots |
heightnumber = 100 | default height for the track |
mouseoverstring = | text to display when the cursor hovers over a feature callback args: feature |
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 |