LinearMultiRowFeatureDisplay
Auto-generated from the config schema in the source — see the config guide for concepts. Provided by the canvas plugin. View source.
Paints interval features as colored blocks on stacked rows partitioned by a feature attribute ("chromosome / ancestry painting").
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', sort: ['HG00097', 'HG00096'] },
rowColor: {
scale: {
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 scale.unknown
gives unnamed rows a color. A feature's itemRgb colors it with no
configuration at all, and encoding.color.scale.type: 'identity' names it
in the key. To color per feature off some other attribute, set
encoding.color.value to a jexl: expression reading it.
Omit rows.sort and the rows sort by value.
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: QTL mapping (BXD mice)
- 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
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 |
|---|---|
| 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 have it, else name). sort is the row order: the values it lists lead, and the rest sort, digits by magnitude, with the row of features with 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, and which "Sort rows by ... here" orders by at a column; auto (the default) takes the attribute encoding.color reads, else name, and an empty string compares presence alone — which bins each row covers. A jexl: expression derives the value. |
| encoding FeatureEncoding | The blocks' channels: encoding.color, each block's fill, the FeatureColor channel: a CSS color or jexl: callback in value, or a field whose values each take a color through scale, with a key. Unset, a feature's itemRgb paints it if it has one, else rowColor paints its row's blocks, else the default block color does. scale.type: 'identity' keeps each feature's color and names the scale.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 scale.domain/scale.range pairs: the bar beside the row's label, and the row's blocks while no encoding.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 |
| legend Legend | The color key, which appears only while a field paints the blocks — 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 sort 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. |
| axis RowAxisWithGrid | The guide down the left of the rows: the cluster tree, each row's name and the lines between rows. |
fetchSizeLimitnumber = 5000000 | 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 |
| 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 |
color | 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 |
showRowSeparators | moved into a current slot |