DotplotView
Auto-generated @jbrowse/mobx-state-tree API for the current JBrowse release —
see pluggable elements for concepts. Provided by the
dotplot-view plugin.
View source.
Example usage
Hand-authored under defaultSession.views. init.views lists the two
assemblies on the axes and tracks the synteny track(s) to plot (self-vs-self
is allowed):
{
type: 'DotplotView',
init: {
views: [{ assembly: 'hg38' }, { assembly: 'mm10' }],
tracks: ['hg38_vs_mm10.paf'],
colorBy: 'query',
},
}
Other init fields: autoDiagonalize, minAlignmentLength, and a per-axis
loc on each views entry — see the init property below.
Members a composed model contributes are listed here too, so these tables are the whole surface.
Properties
| Member | Description | Defined by |
|---|---|---|
idid: ElementId | DotplotView | |
typetype: types.literal('DotplotView') | DotplotView | |
heightheight: types.stripDefault(types.number, defaultHeight) | the height of the plot in pixels | DotplotView |
| trackSelectorType | vestigial: the hierarchical selector is the only one that exists, so this value is ignored. Retained because saved sessions and configs persist it. | DotplotView |
assemblyNamesassemblyNames: types.stripDefault(types.array(types.string), []) | the two assemblies being compared, horizontal axis first. A spec normally names these per axis instead, as views[0].assembly and views[1].assembly. | DotplotView |
drawCigardrawCigar: types.stripDefault(types.boolean, true) | resolve each alignment's CIGAR into the drawn shape rather than plotting it as a single straight segment | DotplotView |
showGridlinesshowGridlines: types.stripDefault(types.boolean, true) | carry each axis' ruler ticks across the plot as faint lines, the way LinearGenomeView's gridlines carry its own down over the tracks | DotplotView |
| lodMode | Level-of-detail tier override for PIF adapters. 'auto' uses the adapter's bpPerPx threshold; 'fine'/'coarse' force a tier. Stored view-level so all displays render at the same tier and the menu doesn't need to fan out per display. | DotplotView |
lockAspectRatiolockAspectRatio: types.stripDefault(types.boolean, false) | When true, hview and vview are kept at the same bpPerPx so the dotplot stays square. Wheel zoom already preserves the ratio; box-zoom and other independent ops trigger an autorun resync. | DotplotView |
lineWidthlineWidth: types.stripDefault(types.number, DEFAULT_LINE_WIDTH) | Screen-space line width (CSS pixels) applied to every dotplot display in this view. View-level because the GPU pass renders all displays with one uniform. | DotplotView |
alphaalpha: types.stripDefault(types.number, DEFAULT_ALPHA) | Plot-wide alpha applied to every point. View-level for the same reason lineWidth is: the only control is view-level, so storing it per display meant a track shown after the slider moved rendered at the default while the slider said otherwise. | DotplotView |
| minAlignmentLength | Hide alignments shorter than this many bp. Enforced per feature in buildLineSegments. Cuts whole-genome hairball noise. View-level, see alpha. | DotplotView |
| minIdentity | Hide alignments whose sequence identity is below this fraction (0-1), enforced per feature in buildLineSegments beside minAlignmentLength. A feature carrying no identity at all is kept at every threshold — the alternative blanks a plot whose adapter simply never reported one. View-level, see alpha. | DotplotView |
hviewhview: types.optional(DotplotHView, {}) | the horizontal axis, as a full 1D view state. A spec writes views[0] instead, which the launcher resolves into this. | DotplotView |
vviewvview: types.optional(DotplotVView, {}) | the vertical axis, the counterpart to hview. A spec writes views[1]. | DotplotView |
trackstracks: types.array(pm.pluggableMstType('track', 'stateModel')) | DotplotView | |
initinit: types.frozen<DotplotViewCommands | undefined>() | used for initializing the view from a session snapshot | DotplotView |
displayNamedisplayName: types.maybe(types.string) | displayName is displayed in the header of the view, or assembly names being used if none is specified | BaseViewModel |
minimizedminimized: types.stripDefault(types.boolean, false) | collapse the view to its header bar, keeping it in the session rather than closing it | BaseViewModel |
| highlight | translucent highlight bands, seeded from URL params or session JSON and added interactively via the rubber-band menu | HighlightsMixin |
showHighlightChipsshowHighlightChips: types.stripDefault(types.boolean, false) | pins the interactive highlight chip (link icon + context menu) to every highlight band; off by default, where a band instead reveals its chip while the pointer is in it. This is what a screenshot needs, since nothing hovers in one | HighlightsMixin |
colorBycolorBy: types.stripDefault(types.string, 'default') | The color-by mode the whole view renders with, unless a track overrides it in trackColorBy. | TrackColorsMixin |
trackColorBytrackColorBy: types.map(types.string) | trackId -> color-by mode for that track alone. Absent means the track follows the view-wide colorBy. | TrackColorsMixin |
trackColorstrackColors: types.map(types.string) | trackId -> explicit color under colorBy: 'track'. Absent means the track takes an automatic slot from the palette. | TrackColorsMixin |
showColorLegendshowColorLegend: types.stripDefault(types.boolean, false) | Show the floating color-by legend. Dismissible via the legend's close button; re-enable from the color-by (palette) menu. | TrackColorsMixin |
Volatiles
| Member | Description | Defined by |
|---|---|---|
volatileWidthvolatileWidth: undefined as number | undefined | DotplotView | |
volatileErrorvolatileError: undefined as unknown | DotplotView | |
| cursorMode | these are 'personal preferences', stored in volatile and loaded/written to localStorage | DotplotView |
| importFormSyntenyTrackSelections | DotplotView | |
widthwidth: 800 | BaseViewModel | |
bodyMountedbodyMounted: true | Whether the container has this view's body in the DOM.ViewContainer mounts a view's body only while an IntersectionObserver says it is on screen, to hold the app under the WebGL2 context ceiling (reference/GPU_CONTEXT_BUDGET.md). A view below the fold therefore has no canvas, so nothing ever calls markCanvasDrawn and the pre-first-paint term of displayPhase pins every display in it at loading with nothing left to resolve it — which parks [data-app-phase="ready"] for the whole app on a view the user cannot see.Defaults true so the containers that always mount a body — embedded views, workspace panels, and any test rendering a display directly — are unaffected and need not set it. The raw flag, written by this view's own container. A display asks effectiveBodyMounted instead, because a nested view has no container of its own. | BaseViewModel |
canvasDrawncanvasDrawn: false | flips true on first paint; read by test selectors to detect render | RenderLifecycleMixin |
currentRenderingBackendcurrentRenderingBackend: undefined | current backend reference, updated on context-loss recovery. Typed unknown (not generic B) on purpose: this mixin is composed by every display via a non-generic factory, so the per-display backend type B isn't known here — it's supplied at attachRenderingBackend<B> and narrowed with as B inside the autoruns. Don't "fix" the cast. | RenderLifecycleMixin |
renderTickrenderTick: 0 | counter the render autorun observes; bumped to force a re-render | RenderLifecycleMixin |
autorunsInstalledautorunsInstalled: false | guards attachRenderingBackend so the autorun pair spawns once per instance | RenderLifecycleMixin |
renderErrorrenderError: undefined | the render-backend (GPU/Canvas2D init or context-loss) error, or undefined. Single source of truth for the render-error terminal state: useRenderingBackend writes it from the canvas-init mechanism so the model — not React-local hook state — owns every terminal state. Read by displayPhase (whose renderError term outranks loading, suppressing the scrim) and by DisplayChrome (shows the retry overlay). | RenderLifecycleMixin |
awaitingAutoDiagonalizeawaitingAutoDiagonalize: false | True while the init autorun is waiting on the diagonalize RPC. Gates the canvas off — otherwise the user watches an undiagonalized hairball flash before the reorder kicks in. | DiagonalizeProgressMixin |
pendingAutoDiagonalizependingAutoDiagonalize: false | A reorder this init asked for that has not succeeded yet. Raised before any render can paint, and lowered only once the pass RESOLVES — a skipped or thrown reorder leaves it up, so the view's settled gate never reports done on an undiagonalized view and the capture fails loudly (times out) instead of committing a hairball.One flag rather than a requested/complete pair: the two only ever moved together, and every state a pair can drift into either wedges the gate shut or opens it on the wrong pass. | DiagonalizeProgressMixin |
diagonalizeStatusdiagonalizeStatus: createStatusChannel() | Live status from the auto-diagonalize RPC (download %, parse, algorithm phase) shown on the reordering spinner; blank outside that wait. A StatusChannel rather than a status field plus a setter: there is one operation to narrate here, and the channel is that pair with the message/fraction split already done, so the spinner reads { message, fraction } instead of calling statusMessageText / statusFraction at every render site. | DiagonalizeProgressMixin |
diagonalizeStopTokendiagonalizeStopToken: undefined as StopToken | undefined | Stop token for the in-flight auto-diagonalize, so the spinner's Cancel can abort it; undefined when none is running. | DiagonalizeProgressMixin |
seenAttributeRangesseenAttributeRanges: {} as Record<string, AttributeRange> | The widest span each numeric channel has been seen to cover, over every fetch this view has taken — what keeps an attribute:<column> ramp from re-scaling under a pan. Widened by observeAttributeRanges, dropped by resetAttributeRanges, read through attributeRanges, which is where the reasoning is. | TrackColorsMixin |
Getters
| Member | Description | Defined by |
|---|---|---|
widthnumber | DotplotView | |
hRefNameLabelsMap<string, string> | DotplotView | |
vRefNameLabelsMap<string, string> | DotplotView | |
borderXnumber | Left margin: fits the vertical (vview) axis labels. Derived purely from that axis's regions + zoom — never from viewWidth — so it can't feed back through viewWidth = width - borderX into a render loop. | DotplotView |
borderYnumber | Bottom margin: fits the horizontal (hview) axis labels. See borderX. | DotplotView |
assemblyErrorsstring | DotplotView | |
assembliesInitializedboolean | DotplotView | |
axisAssemblyErrorError | undefined | A dotplot plots one assembly against another, so anything but two names here cannot lay out. initializeDisplayedRegions walks the two axes in step with this array, so one name leaves the other axis with no regions and initialized never comes true — the view sat on its spinner saying "Loading" forever, with the assembly it was supposedly waiting for already loaded. Extra names are the same statement in the other direction: nothing reads past the second, so a third assembly is silently not plotted.Only reachable from a hand-authored snapshot — setAssemblyNames writes both, and applyInit already rejects an init naming one — which is exactly the case that needs telling. Zero names is not an error: it is the import form. | DotplotView |
errorunknown | The view's terminal state: whatever the import form's submit threw, else a pair of axes that cannot lay out, else whatever the assemblies did. Declared here rather than beside menuItems so every reader below is the same expression — showImportForm and showLoading each used to re-spell it, and showLoading spelled it as a two-term && that a third source of error would have to be added to in three places. | DotplotView |
initializedboolean | DotplotView | |
hticksTick[] | DotplotView | |
vticksTick[] | DotplotView | |
hTickPositionsPositionedTick[] | DotplotView | |
vTickPositionsPositionedTick[] | DotplotView | |
hasSomethingToShowboolean | DotplotView | |
initPendingboolean | An init blob that has not been applied yet — installInitAutorun clears it as the last thing an apply pass does. The plot is assembling itself: the axes can already exist, and be initialized, while the tracks or the region restriction are still to come, which is why the settled gate reads this.Read by settled, deliberately not by showLoading — a plot whose axes are up is worth showing while the rest lands. LGV's equivalent is awaitingInitNavigation, a narrower thing (init set and nothing on screen at all) that it does fold into showLoading; it used to share this name, and the two disagree exactly where a reader would assume they agree. | DotplotView |
showImportFormboolean | Whether to show the import form | DotplotView |
showLoadingboolean | Whether to show a loading indicator instead of the import form or view | DotplotView |
| loadingAssembly | The assembly whose load the spinner is waiting on. init names them before assemblyNames is materialized, so it is the source until then. | DotplotView |
loadingMessagestring | undefined | Label for the generic loading spinner, naming the assembly file being downloaded when the assembly load is what the wait is. The auto-diagonalize wait is a separate render branch (DiagonalizeLoadingScreen), so this only covers the plain "view not ready" case. | DotplotView |
loadingProgressnumber | undefined | Determinate fraction for the spinner's bar, when the assembly load reports one | DotplotView |
loadingSourcestring | undefined | The URL the assembly load is currently fetching, when the phase named one. Only the stalled-load notice reads it — see ViewLoadingScreen. | DotplotView |
viewWidthnumber | Plot area width. Floored at 0: the axis borders have their own MIN_BORDER floor, so a container narrower than that would otherwise yield a negative canvas dimension and a negative maxBpPerPx. | DotplotView |
viewHeightnumber | Plot area height. Floored at 0, see viewWidth. | DotplotView |
hblockLabelKeysToHideSet<string> | DotplotView | |
vblockLabelKeysToHideSet<string> | DotplotView | |
visibleHTickPositionsVisibleTick[] | The h ticks that land on the drawn axis, thinned to what can be read and flagged for labelling. hTickPositions comes from staticBlocks, which extend a screen past the viewport in both directions; clipping here rather than per element in the axis component keeps the SVG export from carrying a group per invisible tick, and is cached for the same reason hblockLabelKeysToHide is.Clip before thinning: spacing is a question about what is on screen, and offscreen ticks would otherwise claim slots from visible ones. | DotplotView |
visibleVTickPositionsVisibleTick[] | The v ticks that land on the drawn axis. See visibleHTickPositions. | DotplotView |
hRegionLinesAxisLine[] | Region-boundary lines for the horizontal axis, in plot px. Computed here rather than in the grid component so the screen and the SVG export cannot drift apart, and so the gridlines below can see which pixels a boundary already owns. | DotplotView |
vRegionLinesAxisLine[] | See hRegionLines. The vertical axis lays out bottom-up, so its block offsets are mirrored into screen y here — the same mirror its ticks and labels take. | DotplotView |
hGridlinesTickLine[] | The faint coordinate lines the horizontal ruler casts across the plot, in its two weights. Empty when the setting is off, and empty with it on whenever this axis could not number itself anywhere — which at whole-genome zoom is the usual case. All or nothing per axis, never per chromosome; see tickLines. | DotplotView |
vGridlinesTickLine[] | See hGridlines. | DotplotView |
gridlinesEmptyboolean | The setting is on and neither axis has a ruler to cast — a ticked checkbox doing nothing observable, which the menu says out loud rather than looking broken. The whole-genome view is this. | DotplotView |
hasVisibleRegionsboolean | Both axes have a region on screen, so the plot has a grid to draw and a first block to anchor its backdrop rect on. The grid reads the two block lists' heads, which only this makes safe. | DotplotView |
| views | DotplotView | |
number | The zoom-out limit both axes share under lockAspectRatio: one bpPerPx has to fit the LONGER genome, so it is the larger of the two axes' own fits. Read back by each axis as its maxBpPerPx (see axisMaxBpPerPx), which is what keeps every route to a zoom — the buttons, the wheel, box-zoom, showAllRegions — clamping against the same ceiling. | DotplotView |
hRegionSignaturestring | Signature of the horizontal axis' displayed-region order and orientation, which a diagonalize reorder/flip changes and a zoom or pan does not. Computed here, once for the view, because every display's currentFetchKey needs it alongside the zoom: derived inside that key it was rebuilt — a template literal per displayed region, so thousands on a fragmented assembly — per display on every wheel step. As its own primitive-valued computed it notifies only when the regions really change. | DotplotView |
vRegionSignaturestring | The vertical axis' displayed-region signature. See hRegionSignature. | DotplotView |
dotplotDisplaysDotplotDisplayModel[] | Every DotplotDisplay under this view's tracks. Filtered by type rather than taken as tracks[i].displays[0]: showTrack only ever builds one view-compatible display, but a hand-written or legacy session snapshot is hydrated verbatim, and an empty or foreign displays array put an undefined into this list that every consumer below dereferences — settled and geometryByDisplayKey both crash the view on it. Same spelling as the synteny level's linearSyntenyDisplays.Not index-aligned with tracks, so a consumer that wants a display's track reads display.parentTrack rather than tracks[i]. | DotplotView |
trackWarningsTrackWarning[] | Every loaded track's render warnings, under the name to report them by. Shared with the synteny view's own report (see collectTrackWarnings for why the name has to come off the display's parentTrack), and a cached computed rather than a render-time flatMap: the header that reads it re-renders on every pointermove of a selection drag, and resolving a name is a getConf per track. | DotplotView |
surfaceReadinessComparativeSurface | The plot rect as the displays drawing onto it see it: first paint, plus the two flags that mean what is on screen is not the answer yet. Published here so a display reads one field, and so settled below and every display's displayPhase are computed from the same three values. | DotplotView |
displayPhaseDisplayStatusPhase | What the shared canvas publishes as data-display-phase: the ranking over the plots drawing onto it. Its twin settled below is the stricter question — see comparativeReadiness. | DotplotView |
settledboolean | Canvas has painted and no display is still fetching, so what's on screen is the final settled content. Drives the data-display-drawn on dotplot_webgl_canvas that screenshot capture and the browser-test suites wait on — so it must mean "done", not just "first paint".Not the same question as "is every display finished" — see comparativeReadiness, which holds both and says why an error answers them differently. | DotplotView |
hoveredDisplayDotplotDisplayModel | undefined | The one track that owns the plot's hover, or undefined. At most one can: setHoveredFeature points a single display at the hit and clears every other in the same batch.Resolved here so the two readers below — and the components — take the view they already have rather than looping the tracks themselves. | DotplotView |
hoveredTooltipLinesstring[] | undefined | The hovered alignment's tooltip lines, or undefined when nothing is hovered. | DotplotView |
hoveredHighlightDotplotHoverHighlight | undefined | The hovered alignment's restroke geometry — see DotplotDisplay.hoveredFeatureHighlight. | DotplotView |
hasLodCapableAdapterboolean | True if any track has an adapter with tiered storage. Used to gate the LOD menu — only the indexed PIF adapters have tiers. | DotplotView |
geometryByDisplayKeyMap<number, DotplotGeometryData> | Per-display GPU geometry keyed by displayKey. The upload autorun diffs this map: new entries upload, vanished entries evict. Drawn in insertion order, so tracks paint bottom-of-the-list last. | DotplotView |
| plotTransform | The cumBp -> plot px reconstruction, as the numbers everything that draws or hit-tests this plot runs on: the viewport-start cumBp per axis, the inverse bpPerPx per axis, and the plot height the v axis is flipped through (it lays out bottom-up). Its own getter because three readers want exactly these and nothing else — the render state below, the pick's exact test, and DotplotDisplay.hoveredFeatureHighlight. Taking them off dotplotRenderState also subscribes to alpha, lineWidth and the display-key list, so an opacity drag rebuilt the hover path.viewHeight belongs in here and not beside it: this is also what setupClearHoverOnPlotMove watches to decide the plot has moved under a stationary cursor, and a height change slides every alignment down the canvas exactly as a pan does. Left out, it was the one way to move the plot that kept the hover pinned to the alignment it no longer pointed at. | DotplotView |
| dotplotRenderState | Aggregated per-frame render state — a resolved value, never undefined; "the view isn't measured yet" is the canRender precondition below.An empty displayKeys is a real frame, not a skip: both backends clear before drawing, so painting zero displays is what wipes the plot when the last track is hidden. Gating the render pass on it left the departed track's pixels on the canvas (its buffer was deleted, but nothing repainted). | DotplotView |
canRenderboolean | Render-lifecycle precondition (overrides RenderLifecycleMixin's default-true hook): before the axes have regions and a measured width there is nothing to paint against. Gating the autorun pair here is what lets dotplotRenderState stay a resolved getter. | DotplotView |
effectiveBodyMountedboolean | Whether this view's body is in the DOM, counting the views it is nested inside — which is the question a display's phase actually asks.bodyMounted alone answers it only for a view a container renders directly. A view nested in another view (a synteny row, a breakpoint panel) has no container writing its flag, so it reads true forever while its whole subtree is out of the DOM, and every display in it waits for a first paint that nothing will make — the hang this flag exists to prevent, one level down.An ancestor that does not carry the flag at all leaves the answer alone rather than excusing the paint: only an explicit false unmounts, so a duck-typed stand-in that forgot it keeps waiting, which is the failure that shows up as a slow test rather than as a picture of an empty view. | BaseViewModel |
rendersCanvasboolean | Overridable hook (default true): whether this display paints a canvas in its current configuration, as opposed to a deliberate static placeholder (LD with the triangle off, sequence past base resolution — both render a message where the <canvas> would go, so canvasRef is never called and canvasDrawn can never flip).Lives here, beside canvasDrawn, because every consumer of "has this display painted" needs the pair — and until 2026-08 each family declared its own copy (per-region hard-coded true, global carried the hook for LD), so a display could express the state only to whichever family it happened to compose. See painted below for the reader that was missed. | RenderLifecycleMixin |
paintInertboolean | Overridable hook (default false): the display has reached a state it will not paint its way out of, so painted below should answer finished rather than pending. Both LGV fetch families fill it with !!error — a fetch that failed before first paint keeps its canvas mounted, since the error bar is an overlay rather than a subtree replacement, so nothing ever draws into it. Named for fetchInert on the comparative side.A hook rather than a read of error here, for two reasons that both bite: this package is a leaf and error belongs to the fetch mixins, and declaring that name here would collide with FetchMixin's volatile — types.compose gives the collision to its later argument, and the two families compose the two mixins in opposite orders. | RenderLifecycleMixin |
paintedboolean | The first-paint answer every consumer outside the display should read, canvasDrawn being only the raw flag: a display that is deliberately not painting a canvas has finished, and saying otherwise is a lie that never resolves.The two rendersCanvas: false states each had three of their four consumers wired by hand — the loading scrim (rendersCanvas / fetchInert) and the SVG export (fetchInert) — while the fourth, data-display-drawn, went on publishing "false" forever off the raw flag. That attribute is what PENDING_DISPLAYS (@jbrowse/browser-test-utils) selects on, so a zoomed-out reference sequence track made every waitForDisplaysDone on the page burn its full timeout — silently, since that wait swallows its own. Same shape as fetchInert on the comparative side: the reader you forget is the one outside the display, so the display has to publish one name for it.paintInert is the third term and the same argument once more, for the state where a display would paint a canvas and never gets to — a fetch that failed before first paint. See that hook. | RenderLifecycleMixin |
colorableAttributesstring[] | Distinct numeric columns across the overlaid tracks, in first-seen order — two tracks declaring dn offer one dn mode, not two. | TrackColorsMixin |
attributeRangesRecord<string, AttributeRange> | The span each numeric channel covers: unioned over the loaded displays, and over every fetch this view has already taken (seenAttributeRanges). An attribute:<column> mode has no declared domain, so this is what its ramp scales to, what the legend labels it with, and — since it is the one domain — what the two cannot disagree about.MONOTONIC, which is the point. A fetch's payload reports the span of the slice it holds, and that slice is the snapped window: painting straight off it re-maps every feature onto the ramp each time a pan rolls the window over, so a ribbon in the middle of the ramp turns into one at the bottom while the reader is scrolling and its value has not changed. A domain that only ever widens still says what the reader is looking at — the legend prints the actual numbers — and settles instead of oscillating. Monotonic UNTIL A MODE IS PICKED, which is the way back: one window holding an outlier would otherwise compress the ramp for the rest of the session, and the union above is over the LOADED spans, so resetAttributeRanges rescales to what is on screen there and then.View-wide rather than per display because the floating legend is one box for the whole view: two displays scaling the same ramp from different spans would make that one legend lie about one of them. | TrackColorsMixin |
colorableTracksColorableTrack[] | colorableTrackConfigs paired with whatever color the user pinned. This is the single definition of "the tracks that get colors" — the palette, the legend and the palette menu all read it, so they cannot disagree about which tracks are in play. | TrackColorsMixin |
trackColorAssignmentsMap<string, string> | trackId -> the color it draws in under colorBy: 'track'. Assigned across the whole view rather than per display, so an automatic slot can't duplicate a color pinned on a sibling. | TrackColorsMixin |
uniformColorBySyntenyColorBy | undefined | The mode to report as "the view's mode" — undefined when tracks disagree, so the menu shows nothing checked and the legend says so instead of picking one track's answer for everyone. | TrackColorsMixin |
colorLegendChipsColorChip[] | Legend rows naming the overlaid tracks — non-empty only when they are colored by track, or by different modes. | TrackColorsMixin |
Methods
| Member | Description | Defined by |
|---|---|---|
colorableTrackConfigs() => { trackId: string; name: string; }[] | Every track that can take a palette slot, in paint order, paired with whatever color the user pinned on it. | DotplotView |
colorableAttributeNames() => string[] | The numeric columns the overlaid tracks declare, so the palette menu can offer one mode per measurement without any of them being a named mode. attributeColumns is the ortholog-table adapter's slot; a track whose adapter has no such slot contributes nothing. | DotplotView |
loadedAttributeRanges() => Record<string, AttributeRange>[] | Each loaded display's observed attribute spans, which the mixin unions into the domain the legend labels its ramp with. | DotplotView |
| getCoords | Both corners of a drag rect, in bp on each axis. The vertical axis lays out bottom-up, so its pixels are flipped through viewHeight first. Undefined for a drag too small to be a selection — the same threshold the interaction hook uses to tell a drag from a click. | DotplotView |
pickFeatureAt(x: number, y: number) => DotplotPlotPickHit | undefined | The alignment under a pointer position (plot px, y downward), across every track on the shared canvas, or undefined. Resolved on the model rather than through the rendering backend, which is where this departs from synteny's backend.pick(...): dotplot geometry is already here in absolute cumBp (display.instanceData), so this answers with NO backend attached at all — before the first paint, through a context loss that has not recovered, and in a test with no canvas. (Both of synteny's backends implement pick, so its hover is not GPU-only either despite gpuRenderingBackend's name; what it cannot do is answer while nothing is attached. It lives in the backend because the projected geometry it indexes does, which also means each backend builds its own index.)Nearest wins ACROSS tracks too, ties going to the later track (the one drawn on top) — see pickDotplotFeature for why a dotplot answers nearest where a ribbon answers topmost. | DotplotView |
| getHHighlightCoords | Map a highlight/bookmark region to {left, width} px on the horizontal axis. left is already screen-offset. Returns undefined when the region isn't on hview's assembly/displayed regions. | DotplotView |
| getVHighlightCoords | Map a highlight/bookmark region to {top, height} px on the vertical axis. The vview lays out bottom-to-top, so the band is y-flipped into screen space. Returns undefined when the region isn't on vview's assembly/displayed regions. | DotplotView |
| DotplotView | ||
resolveColorBy(trackId: string) => SyntenyColorBy | The mode one track renders with: its own override, else the view-wide mode. | TrackColorsMixin |
trackColorFor(trackId: string) => string | TrackColorsMixin |
Actions
| Member | Description | Defined by |
|---|---|---|
setImportFormSyntenyTrack(arg: number, val: ImportFormSyntenyTrack) => void | DotplotView | |
clearImportFormSyntenyTracks() => void | Drop the import form's pending selections once they have been applied. Left in place they outlive the form: "return to import form" would reopen on a finished upload from the previous launch, and a pair whose assemblies no longer match it reads as an unfinished upload and disables Launch for something this visit never started. | DotplotView |
startRenderingBackend(backend: DotplotRenderingBackend) => void | DotplotView | |
setHoveredFeature(hit: DotplotPlotPickHit | undefined) => void | Point the whole plot's hover state at one pick hit: the track whose geometry was hit takes the segment index, every other track clears, so undefined (a miss) clears the plot. An action rather than a loop in the pointer handler so the N writes land in one MobX batch — and so nothing outside the model has to resolve a displayKey to a display. Same shape as the synteny level's setHoveredFeature. | DotplotView |
setCursorMode(mode: CursorMode) => void | DotplotView | |
setDrawCigar(flag: boolean) => void | DotplotView | |
setShowGridlines(flag: boolean) => void | DotplotView | |
setLodMode(value: LodMode) => void | DotplotView | |
setLockAspectRatio(flag: boolean) => void | DotplotView | |
setLineWidth(value: number) => void | DotplotView | |
setAlpha(value: number) => void | DotplotView | |
setMinAlignmentLength(value: number) => void | DotplotView | |
setMinIdentity(value: number) => void | DotplotView | |
clearView() => void | returns to the import form | DotplotView |
setWidth(newWidth: number) => number | DotplotView | |
setHeight(newHeight: number) => number | DotplotView | |
setError(e: unknown) => void | DotplotView | |
setInit(init?: DotplotViewCommands | undefined) => void | DotplotView | |
zoomOut() => void | DotplotView | |
zoomIn() => void | DotplotView | |
scrollXY(dx: number, dy: number) => void | Pan both axes one gesture step. Each delta is in its own axis' scroll direction, not screen px — the vertical axis lays out bottom-up, and both callers (wheel, drag) already hold the flipped value for their own reasons. One action rather than two scroll calls, because an MST action is a MobX action: unbatched, the render autorun ran twice per pointermove and drew a whole frame against a moved h axis and a stale v one. | DotplotView |
zoomAt(factor: number, [x, y]: Coord) => void | Zoom both axes by factor, holding the locus under a plot-area point still. The anchor is the same component-px Coord the drag handlers pass around, so the vertical flip through viewHeight happens here — the way getCoords already does it — rather than at the call site against a separately measured element height.Multiplying both axes by one factor is what makes wheel zoom ratio-preserving, so the aspect lock never has to correct it. One action, for the reason scrollXY documents. | DotplotView |
activateTrackSelector() => Widget | DotplotView | |
| showTrack | initialSnapshot is annotated rather than inferred from its default. A bare {} accepts a number, so this signature satisfied applySyntenyTrackSelections' (trackId, level) => void callback — passing model.showTrack there typechecked and handed the pair index over as the new track's snapshot. | DotplotView |
hideTrack(trackId: string) => boolean | DotplotView | |
toggleTrack(trackId: string) => boolean | DotplotView | |
setAssemblyNames(target: string, query: string) => void | DotplotView | |
zoomInToMouseCoords(mousedown: Coord, mouseup: Coord) => void | zooms into clicked and dragged region | DotplotView |
addHighlightFromMouseCoords(mousedown: Coord, mouseup: Coord) => void | highlights the clicked and dragged region: the x-span becomes a band on the horizontal axis and the y-span a band on the vertical axis, so the drag rect is their intersection | DotplotView |
showAllRegions() => void | DotplotView | |
initializeDisplayedRegions() => void | DotplotView | |
onDotplotView(mousedown: Coord, mouseup: Coord) => void | creates a linear synteny view from the clicked and dragged region | DotplotView |
exportSvg(opts?: ExportSvgOptions) => Promise<void> | creates an svg export and save using FileSaver | DotplotView |
applySquare(ratio: number) => void | Set both axes to the average bpPerPx (hview divided by ratio), re-anchoring each on the locus that was at its center. setBpPerPx alone would leave offsetPx untouched while bpPerPx changed under it, scrolling the plot; the centerAt calls are what hold it still. | DotplotView |
squareView() => void | Equalize both axes' bpPerPx. Also what the aspect-ratio lock applies to absorb divergence from box-zoom and other per-axis operations — deliberately not clamped to either axis's own maxBpPerPx, since a shared bpPerPx that fits the larger genome necessarily exceeds the smaller axis's limit, and it converges in one step where a clamped one would ping-pong between the two maxima. | DotplotView |
squareViewProportional() => void | DotplotView | |
setDisplayName(name: string) => void | BaseViewModel | |
setBodyMounted(flag: boolean) => void | See bodyMounted. Written by the view's container, which is the only thing that knows whether it rendered the body. | BaseViewModel |
setMinimized(flag: boolean) => void | BaseViewModel | |
markCanvasDrawn() => void | RenderLifecycleMixin | |
resetCanvasDrawn() => void | RenderLifecycleMixin | |
stopRenderingBackend() => void | RenderLifecycleMixin | |
renderNow() => void | RenderLifecycleMixin | |
setRenderError(error: unknown) => void | set/clear the render-backend error. Called by useRenderingBackend: with the error when the canvas factory rejects (or context-loss re-init fails), and with undefined on successful (re)init and on retry. | RenderLifecycleMixin |
| attachRenderingBackend | attach a GPU/Canvas2D backend and install the upload + render autorun pair. Idempotent: re-calling swaps the backend and does not run setup again, so the callbacks and everything they close over are the first call's. | RenderLifecycleMixin |
addToHighlights(highlight: HighlightType) => void | HighlightsMixin | |
setHighlight(highlight?: HighlightType[] | undefined) => void | HighlightsMixin | |
removeHighlight(highlight: HighlightType) => void | HighlightsMixin | |
updateHighlight(old: HighlightType, updates: Partial<HighlightType>) => void | HighlightsMixin | |
setShowHighlightChips(arg: boolean) => void | HighlightsMixin | |
setAwaitingAutoDiagonalize(arg: boolean) => void | DiagonalizeProgressMixin | |
beginAutoDiagonalize(requested: boolean) => void | Declare the gate at the top of one init apply pass: a reorder is pending iff THIS init asked for one. Assigning rather than raising is what hands the gate over cleanly — a superseded init that asked for a reorder and then skipped it would otherwise leave the flag up with nothing coming, wedging settled forever. | DiagonalizeProgressMixin |
finishAutoDiagonalize() => void | The init-time reorder resolved, so the view on screen is the diagonalized one — open the gate. | DiagonalizeProgressMixin |
setDiagonalizeStopToken(arg?: StopToken | undefined) => void | DiagonalizeProgressMixin | |
cancelAutoDiagonalize() => void | Abort an in-flight auto-diagonalize; withDiagonalizeProgress's finally clears the wait flag, revealing the (undiagonalized) view.Lowers the gate too. The abort reaches the caller as a throw, which skips its finishAutoDiagonalize() — right for a reorder that failed on its own (settled stays false and a capture times out loudly rather than committing a hairball), wrong for one the user stopped: cancelling IS the user settling for this view, and a gate nothing will lower again leaves settled false forever. | DiagonalizeProgressMixin |
observeAttributeRanges(ranges: Record<string, AttributeRange>) => void | Fold one fetch's observed attribute spans into the domain this view paints and labels its ramps with. Called by each display as its fetch lands, because the accumulation has to outlive the payload it came from: the previous window's span is gone from loadedAttributeRanges the moment the next one commits. | TrackColorsMixin |
resetAttributeRanges() => void | Forget the accumulated domain, leaving attributeRanges reporting what the LOADED fetches cover and nothing else.The way back from a monotonic domain, and the only one: a single window holding an outlier widens the ramp for the rest of the session, and attributeRanges unions the loaded spans over this, so a reset rescales to what is on screen without waiting for a refetch. Picking a mode is what calls it — the gesture a reader makes when the ramp is telling them nothing is to choose it again. | TrackColorsMixin |
setColorBy(value: SyntenyColorBy) => void | Set the view-wide mode. Clears every per-track override, so picking a mode from the top level of the palette menu really does mean "all tracks" — and rescales the ramp, which is the only way back from a domain one outlying window widened. | TrackColorsMixin |
setTrackColorBy(trackId: string, value: SyntenyColorBy | undefined) => void | Point one track at its own mode, or back at the view-wide one. | TrackColorsMixin |
setTrackColor(trackId: string, value: string | undefined) => void | Pin one track's color under colorBy: 'track', or release it back to an automatic palette slot. | TrackColorsMixin |
clearTrackColorSettings() => void | TrackColorsMixin | |
setShowColorLegend(value: boolean) => void | TrackColorsMixin |
Related links
- Guide: URL query parameter API