LinearMultiRowFeatureDisplay
Auto-generated from the @jbrowse/mobx-state-tree model in the source — see the developer guide for concepts. Provided by the canvas plugin. View source.
Partitions a single feature track into stacked rows by a feature attribute and paints each feature as a colored block on its row.
The configuration slots for this model are documented on its config schema page.
Each section ends with the members a composed model contributes, linked to the page that documents them.
Properties
| Member | Description |
|---|---|
typetype: types.literal('LinearMultiRowFeatureDisplay') | |
configurationconfiguration: ConfigurationReference(configSchema) | |
hiddenCategories: types.array(types.string) | Legend categories toggled off, by label; features painted in a hidden category's color drop out of both render paths and the hit test. |
4 inherited properties from 2 models
From BaseDisplay: id
From TreeSidebarMixin: runClustering, clusterRegion, sortRowsBy
Volatiles
28 inherited volatiles from 10 models
From BaseDisplay: error, statusMessage, statusProgress
From TrackHeightMixin: scrollTop, hostHeight
From MultiRegionDisplayMixin: loadedRegions
From RegionTooLargeMixin: forceLoadTrack, byteEstimate, gateMeasuredViewportKey
From RenderLifecycleMixin: canvasDrawn, paintCount, currentRenderingBackend, renderTick, autorunsInstalled, renderError, offScreen
From FetchMixin: activeSignal, fetchGeneration, reloadCounter, statusWindow, fetchCanceled, fetchRotation
From LegendMixin: dismissedLegendSections
From TreeSidebarMixin: hoveredTreeNode, treeCanvas, mouseoverCanvas
From ContextMenuMixin:
Getters
| Member | Description |
|---|---|
rpcDataMapReadonlyMap<number, MultiRowRegionData> | The foundation's per-region store, narrowed. |
prefersOffsetboolean | This display always draws its label above the plot. |
| view | |
| conf | Config typed off the concrete schema, which ConfigurationReference erases to any. |
gateEnabledboolean | The byte-gate opt-in: this display paints into fixed lanes, so a high feature count is not a per-glyph render cost and only bytes gate it. |
showRowSeparatorsboolean | |
rowsFieldstring | The raw rows.field, forwarded to the worker which resolves it per feature. Reading it through readConfObject would evaluate a jexl: expression against no context and ship the empty string as an attribute name, drawing one unnamed row with nothing thrown. |
clusterFieldstring | The raw clusterField slot, auto until the user picks one. |
lengthFieldstring | Feature attribute holding a signed bp length change vs the reference; empty turns the indel-glyph pass off. |
rowProportionnumber | |
rowGroupsRowGroup[] | Regex-to-group entries: a row takes the group of the first entry its name matches. |
facetFacetSetting | undefined | The facet object as written: group stacks the rows in bands by their rowGroups group; undefined draws no bands. |
rowGroupMatchersCompiledRowGroup[] | The rowGroups entries whose match compiles. |
colorSettingColorSetting | The color object as written, its value and field raw: either may be a jexl: expression over a feature, which has none here. |
workerColorWorkerColor | The two members the worker reads, the rest being the main thread's. |
colorEncodingstring | FieldColorEncoding | undefined | colorSetting as it paints, through the one resolver every display's color object goes through: color.value, or a field through its scale, score a ramp and any other field categorical while scale is unset. |
colorFieldstring | undefined | The field the color paints by, through any scale, or undefined while color.value paints. |
categoricalColorFieldCategoricalField | undefined | The color channel's field while it paints through a categorical scale, which a facet on the same field shares. |
paintedColorFieldCategoricalField | undefined | The field the color channel paints through a categorical or threshold scale, a threshold's values filed under their bins. |
identityKeyEntries{ value: string; label: string; color: string; }[] | The rows an identity scale's key names, empty under any other scale. |
colorKeyTitlestring | undefined | The key's heading: the color's title, or its field's preset's, else the field. |
colorValueExtent[number, number] | The smallest and largest number the loaded regions' values of the painting field hold, which a ramp's open ends follow. |
colorValueGaps{ missing: boolean; notNumber: boolean; } | Whether a loaded feature holds no value in the painting field, or text that is no number, which a ramp's key lists beside its bar. |
| colorRamp | The ramp a linear or log color paints through, over the loaded values where an end is left open. |
paintColorValue((value: string) => string) | undefined | The color a field value paints, while a field paints. A ramp paints a value-less feature the no-value grey, as the categorical and threshold scales do. |
| fieldPalette | paintColorValue with each value's packed colors held for every region and re-encode that asks, while the scale stands. |
colorNoticesstring[] | What the color object's slots say together that it cannot paint as written. |
noticesstring[] | The corner notice's lines: colorNotices, which a display with more to say extends. |
discoveredRowsRowSource[] | TreeSidebarMixin's hook: the distinct partition values across all loaded regions, in the order the config.json declares, the rest sorted. |
unlistedRowsSortUnlistedRowsSort | TreeSidebarMixin's hook: the rows an order does not list sort, digits by magnitude and the unanswered row last, since discovered values arrive in no order of their own. |
rowBandingRowBanding | undefined | TreeSidebarMixin's hook: the facet, its bands listed first and then the rowGroups groups in the order they are declared. A row carries only its name and group, so a facet on a feature field bands nothing and says so in rowBandingNotices; banding by one would split rows in the worker. |
noticesstring[] | colorNotices and rowBandingNotices. |
hasDrawnFeaturesboolean | Whether anything is painted right now. An identity scale's key is gated on this. |
usedItemRgbboolean | Whether the loaded data colored itself via itemRgb, which suppresses the per-row palette that would paint over those colors. |
rowColorPaintsMarksboolean | TreeSidebarMixin's hook: a row's color paints its blocks while nothing else colors them: no color value or field, and no itemRgb in the file. |
answeredRowsFieldstring | undefined | The attribute a loaded region actually resolved its rows on, or undefined while none has. |
effectiveRowsFieldstring | The attribute the rows are actually partitioned on: the slot, or what the worker picked off the data under auto. Everything asking "which attribute are these rows" reads this rather than the raw slot above. |
effectiveClusterFieldstring | The attribute each row's blocks are clustered on, resolving auto off the coloring; empty clusters on presence alone. |
pinnedRowsFieldstring | What a fetch issued now should partition on under auto. Deliberately not an rpcProps() key, which would refetch every region the moment the first one answered. |
rowsFieldCandidatesstring[] | The attribute names on the loaded features, offered by the "One row per..." menu. |
clusterCandidatesstring[] | The attribute names "Cluster rows by similarity" offers. |
rowCountsByFieldReadonlyMap<string, RowCountByField> | How many rows each candidate would draw, which the menu shows beside each name so a reader can judge it before paying the refetch. |
rowIndexByValueMap<string, number> | |
rowColorStringsByIndex(string | undefined)[] | Per-row CSS color by display row, undefined where the row has none or rowColorPaintsMarks is off, and the feature's own color paints instead. |
rowColorsByIndex(number | undefined)[] | rowColorStringsByIndex packed for the painters, applied at render time so any color change repaints without a refetch. |
nrownumber | Number of displayed rows, at least 1 so the auto-fit division is safe and the canvas mounts before data arrives. |
fitTargetHeightnumber | The track height that auto-fit mode divides among rows. |
identityLegendLegendEntry[] | The rows an identity color names, whether or not anything is drawn. |
colorLegendLegendEntry[] | Categorical color key: an identity scale's colors, else the one the color field's scale derives from the values the worker found, else the one the painted colors derive, each named by the features carrying it. All are gated on there being a painting to key, since a key is a claim about colors on screen. Empty under a ramp, which paints over all of them. |
ReadonlySet<string> | The single place "is this category hidden?" is answered, so a change to how a label is matched cannot reach some legends and miss the rest. |
ReadonlySet<number> | ABGR colors currently hidden via the legend's category toggles. Both render paths and the hit test skip features painted in one of these, so a toggle drops it everywhere without a refetch. |
autoRowHeightnumber | The display height under rowsTopOffset split evenly across rows. Deliberately not floored at a pixel — rowBand widens a sub-pixel row for drawing without changing how many rows fit, where a floor here would grow the track to thousands of pixels instead. |
maxCanvasHeightnumber | Ceiling on the whole row stack in CSS px: this display sizes its canvas to its content and never scrolls, so nothing downstream bounds it. |
effectiveRowHeightnumber | Overrides RowHeightMixin's resolved height to cap the row stack at maxCanvasHeight, since nothing downstream bounds it. The cap is not floored back up: a row below a pixel is legitimate here. |
colorScalesColorScale[] | LegendMixin's hook, two vocabularies as two scales: the per-feature painting, toggleable and dimmed where a category is hidden, and the row color key, which names rows and is not. |
hasLegendKeyboolean | Overrides LegendMixin's: an identity key merely waiting for data must not take the way back to the "Show legend" toggle with it. |
heightnumber | Overrides BaseLinearDisplay.height so the track container matches the rendering canvas. The MIN_DISPLAY_HEIGHT floor is on the track, never on the row, so a sub-pixel row stays legitimate. With no rows it is the height slot whatever the row mode. |
rowsHeightnumber | The box the rows paint in, under rowsTopOffset: the canvas, its overlays and the labels. |
number | Pixel width reserved on the left for the tree, 0 when no tree shows. |
SvgSidebarProps | |
rowKeysRowKeys | The key each row name holds across every loaded region, assigned at the name's first arrival and never moved; the instance buffers carry these. |
encodeInputsMultiRowEncodeInputs | What the encode reads, and so what re-encodes every region on its identity: the keys, the hidden categories and the color field's palette. The reader's order, focus and colors are the table's. |
rowTableRowTable | The row table both backends and the hit test place each key through: its drawn row, hidden where the focus left it out, and its color override. Rebuilt on a reorder, focus, recolor or a new name, which is one texture upload and no instance bytes. |
renderStateMultiRowRenderState | Render state passed to the GPU/Canvas2D backend each frame. |
indelGlyphRegionsMap<number, MultiRowRegionData> | undefined | Per-region data for the indel-glyph overlay, undefined when there is no glyph pass. A plain Map rather than the ObservableMap: the overlay draws inside an effect, where nothing it reads is tracked, so the read has to happen here for a refetch to redraw the glyphs. |
encodedChannelsReadonlyMap<number, MultiRowEncoded> | Every loaded region's span channels with their per-key buckets: what uploadedChannels adds the insertion markers to, and what the row sort reads. The memo lives in this closure so it outlives a context-loss recovery. |
uploadedChannelsReadonlyMap<number, MultiRowUploadData> | encodedChannels with each region's insertion markers, in the theme's insertion color: what the backend uploads, the hit test reads and the hover and export draw from. |
hoverInkHighlightRect[] | The box of the block to mark, for the chrome's highlight. The hover drops when a right-click menu opens, else its tooltip sticks under the menu, so the menu's own feature stands in. |
highlightStyleHighlightStyle | A wash and a border: the block colors are the data. |
hoveredRowRowSource | undefined | The row the hovered feature sits on, off the live order. |
126 inherited getters from 9 models
From BaseDisplay: parentTrack, RenderingComponent, DisplayBlurb, adapterConfig, isMinimized, hoveredFeature, featureNoun, featureWidgetType, plotKeys, plot, plotExamples, configDocsUrl
From TrackHeightMixin: configuredHeight, allottedHeight, resizing, scrollContentHeight, scrollViewportHeight, scrollableHeight
From MultiRegionDisplayMixin: host, canvasWidthPx, settledSubPixelBinBp, canRender, rendersCanvas, trackVisibleRegions, viewportWithinLoadedData, viewportEmpty, fetchSuspended, layoutReady, dataSuperseded, renderBlocks, fetchInputs, regionPayloads, hasRegionData, staleSettingsDrawn, dataCurrent, loadedAssembly, phaseViewportCurrent, svgReady, paintInert, paintSuperseded, displayPhase
From RegionTooLargeMixin: byteGateAdapterConfig, configuredFetchSizeLimit, densityTooLarge, byteGateAdapterPath, adapterFetchSizeLimit, configForceLoad, gateViewportSpanBp, gateViewport, aboveForceLoadFloor, gateExempt, estimatedFetchBytes, gateMeasurementStale, gateByteLimit, gateActive, densityGateActive, tooLargeStatus, regionTooLarge, regionTooLargeReason, zoomCanReleaseGate, gateSkipsMeasuredViewport
From RenderLifecycleMixin: painted
From FetchMixin: isLoading, isLoadingOrCanceled, fetchInert, awaitingPrerequisite, awaitingDependentData, settingsFetchInputs
From LegendMixin: showLegend, legendTop, legendRight, legendSpec
From RowHeightMixin: rowHeight
From TreeSidebarMixin: showTree, showBranchLength, showRowLabels, treeAreaWidth, rowDomain, rowLabels, rowTreeProvenance, rowFocus, rowColorSetting, baseRowColor, baseRowDomain, guideTreeNewick, rowAlias, rowsHeaderHeight, rowFocusLineHeight, rowsTopOffset, guideTree, guideTreeHonoursDomain, rowTree, rowOrder, expandedRows, , rowNoun, internalRowFields, rowColorFields, rowBandingNotices, rowPaletteDeals, rowColorDealRows, rowStylingIsCustom, rowColorChoice, rowColorAttribute, dealtRowColors, rowColorAttributesOffered, resolvedRowColors, rowArrangementIsCustom, editableSources, rowColorKeyInputs, rowColorScales, clusterableSources, parsedTree, root, bandedRows, bandedSources, rowBands, sources, treeRoot, drawsTree, rowsContentHeight, hierarchy, spatialIndex, clusterPartition, treelessBandCount, treeHasBranchLengths
Methods
| Member | Description |
|---|---|
rampColorScales(id: string) => ColorScale[] | The key a ramp paints, under the caller's scale id: the bar over its domain, and a row apiece for the values the ramp has no color for. Both displays composing this built it from the same three getters, so the derivation is here rather than twice over. |
expandRows(rows: RowSource[]) => RowSource[] | TreeSidebarMixin's hook: each row tagged with the group of the first rowGroups entry its name matches. |
| rpcProps | Fetch-input cache keys; color is resolved in the worker, so the raw color slot is one. |
| uploadedChannelsIn | uploadedChannels in another palette: the SVG export's, whose theme need not be the session's. |
featureAt(mouseX: number, mouseY: number) => MultiRowHit | undefined | The feature under a display-relative pixel. |
| contextTargetAt | What a right-click at this display-relative pixel resolves to. |
regionHasData(displayedRegionIndex: number) => boolean | A region that answered a different attribute than the pin holds nothing this display can draw, and is refetched with the field spelled out. A view, not an action: an action untracks the rpcDataMap read and FetchVisibleRegions keeps a stale answer. |
() => MenuItem[] | Items for the right-click context menu, built from the clicked position. |
() => MenuItem[] |
15 inherited methods from 5 models
From BaseDisplay: renderingProps, liftPlot, plotProblems, plotWrites
From MultiRegionDisplayMixin: isCacheValid
From RegionTooLargeMixin: resolvedByteLimit, gateFetchState
From LegendMixin: svgLegendWidth, colorScalesIn, legendSpecIn
From TreeSidebarMixin: , rowBand, dealtRowColorsFor, rowColorFor, rowOrderWillDropTree
Actions
| Member | Description |
|---|---|
setShowRowSeparators(f: boolean) => void | |
toggleCategory(values: readonly string[]) => void | Show or hide a key row's names together, at render time with no refetch: a row any of whose names is hidden shows again. |
(labels: string[]) => void | |
setRowsField(field: string) => void | Repartition. The arrangement and the row colors stay: a name keyed on another field matches nothing and comes back with the field. The legend's hidden categories clear. Writing rows.field refetches on its own. |
setClusterField(field: string) => void | Recluster on a different feature attribute; empty clusters on presence alone. |
| setFacet | Writes the facet object; undefined draws no bands. Naming the field already banding, with no domain, keeps its band order. |
sortRowsByValueAt(refName: string, pos: number) => boolean | Reorder the rows by the value each carries at (refName, pos), off the already-loaded region data with no refetch. |
selectFeatureById(featureId: string, displayedRegionIndex: number) => void | Re-fetch the full clicked feature by id and open it in the feature details widget, since the painting ships only the slim render arrays. |
| setRpcData | Stage a region as fetched, so a test stands up a loaded display in one call; production goes through ctx.commitRegion. |
setHeight(newHeight: number) => number | Set the track height: auto-fit restretches the rows to it, fixed mode redistributes what rowsTopOffset leaves across the current rows as a row height, and with no rows it is the height slot either way. |
resizeHeight(distance: number) => number | Drag-resize, deferring to setHeight. |
setFitToHeight() => void | Switch to auto-fit, seeding the height slot from the current content height so toggling on does not jump. |
startRenderingBackend(backend: MultiRowRenderingBackend) => void | |
| fetchNeeded | |
renderSvg(opts: ExportSvgDisplayOptions) => Promise<ReactNode> |
61 inherited actions from 11 models
From BaseDisplay: setStatusMessage, setError, clearHoveredFeature, reload, applyDisplaySettings, applyPlot
From TrackHeightMixin: setScrollTop, setHostHeight, expandToContentHeight
From MultiRegionDisplayMixin: setLoadedRegion, evictRegionStore, dropLoadedRegion, clearDisplaySpecificData, clearSettingsBakedData, clearAllRpcData, invalidateSettings, fetchRegions, afterAttach
From RegionTooLargeMixin: clearByteEstimate, clearGateMeasurements, setForceLoadTrack, commitFetchBytes, forceLoad
From RenderLifecycleMixin: markCanvasDrawn, resetCanvasDrawn, stopRenderingBackend, renderNow, setOffScreen, setRenderError, attachRenderingBackend
From FetchMixin: stopActiveFetch, openStatusStream, cancelFetch, cancelFetchByUser, beforeDestroy, beginFetch, endFetch, runFetch
From LegendMixin: setShowLegend, dismissLegendSection
From RowHeightMixin: setRowHeight
From TreeSidebarMixin: setShowTree, setShowBranchLength, setShowRowLabels, setTreeAreaWidth, setRunClustering, setClusterRegion, setSortRowsBy, setHoveredTreeNode, setTreeCanvasRef, setMouseoverCanvasRef, setRowOrder, setRowLabels, setRowFocus, applyRowEdits, resetRowArrangement, setRowColorChoice, focusLegendEntry
From ContextMenuMixin: ,