BreakpointSplitView
Auto-generated from the @jbrowse/mobx-state-tree model in the source — see the developer guide for concepts. Provided by the breakpoint-split-view plugin. View source.
Example usage
Hand-authored under defaultSession.views, with every setting written
directly on the view object. views is one entry per stacked panel, each
declaring the assembly, a loc, and the tracks to show. The two panels
flank a structural-variant breakpoint:
{
type: 'BreakpointSplitView',
views: [
{ assembly: 'hg38', loc: 'chr1:1,000,000-1,100,000', tracks: ['alignments'] },
{ assembly: 'hg38', loc: 'chr5:2,000,000-2,100,000', tracks: ['alignments'] },
],
}Each tracks entry can also be a { trackId, displaySnapshot } object to
set per-panel display options (e.g. a shorter alignments height).
Each section ends with the members a composed model contributes, linked to the page that documents them.
Properties
| Member | Description |
|---|---|
typetype: types.literal('BreakpointSplitView') | |
heightheight: types.stripDefault(types.number, defaultHeight) | the height of the whole view in pixels, panels and overlay together |
showIntraviewLinksshowIntraviewLinks: types.stripDefault(types.boolean, true) | draw the links whose two ends land in the same panel, as well as the ones that cross between panels |
linkViewslinkViews: types.stripDefault(types.boolean, false) | sync scroll and zoom across the panels, so panning one pans them all |
interactiveOverlayinteractiveOverlay: types.stripDefault(types.boolean, true) | make the alignment squiggles drawn between the panels clickable, rather than a static overlay |
showHeadershowHeader: types.stripDefault(types.boolean, true) | show the view's own header bar, above the panels' own |
| views | |
| launch | transient launch state: the declarative panels written on the view object as views, which need a measured width before they can be built rows. preProcessSnapshot moves them here off the snapshot, the afterAttach autorun applies them and clears this, so a saved session never retains it. Not written by hand: author every setting directly on the view. |
From BaseViewModel: id, displayName, minimized
Volatiles
| Member | Description |
|---|---|
widthnumber | |
matchedTrackFeatures{} | |
reloadCounternumber | The pure "go again" signal the shared fetch skeleton reads above every gate, bumped by reload(): after a failure every other input of the overlay fetch is unchanged, so nothing else can rewake it. The Retry on the failure notification is what spends it. |
fetchStatusStatusChannel | What the overlay-feature fetch is doing, for the corner chip. A StatusChannel rather than the statusMessage/statusProgress/ setStatusMessage trio a display declares: this is a view with one operation to narrate, and the trio is a status vocabulary it has no other use for. |
hoveredOverlayundefined | Which overlay curve the pointer is on, and the reason it lives here rather than in each overlay's React state: a hover the viewport can invalidate needs one place to be cleared from, and overlayTransformKey and the afterAttach reaction clear it here. |
From BaseViewModel: bodyMounted
Getters
| Member | Description |
|---|---|
| ownViews | The census entry for this view: its panels are views in their own right, and it holds no tracks outside them. |
scrollZoomboolean | scroll-to-zoom is a global, personal preference resolved from the session; toggling it in any view applies everywhere |
| pendingLaunch | the launch state that still has something to apply — the gate the loading and import-form paths below read. |
hasSomethingToShowboolean | |
initializedboolean | True on the import form too: with no panels and none pending there is nothing left to initialize, and AppReadyMarker reads a false here as the app still loading — which held data-app-phase at loading for as long as an empty split view stayed open. |
errorunknown | Resolved, like LGV's and linear-comparative's: it folds in the sub-views, whose assemblies are what initialized waits on. Without them a failed assembly leaves initialized false forever with nothing to report, and an SVG export waiting on it hangs behind the dialog's spinner instead of raising the error (see awaitViewInitialized). |
showLoadingboolean | Spinner instead of content, i.e. sub-views exist but haven't loaded their assemblies yet. Named to match LGV/dotplot/synteny/circular, since ViewContainer reads this name to publish data-view-phase. |
| loadingAssembly | The assembly whose load the spinner is waiting on. Delegated to the first sub-view that hasn't initialized, since each LGV already resolves this for itself; before the sub-views exist, init is what names them. |
loadingViewLoading | undefined | What the loading screen says while showLoading, read off the assembly whose load is the wait; undefined otherwise. |
showImportFormboolean | A failed assembly counts: the views it left behind never initialize, so there is nothing to show and no second attempt coming in this session. The form — which reports error in its banner — is then the only way forward, matching LGV/synteny/dotplot/circular rather than spinning on a showLoading that can never resolve. |
| assemblies | One assembly per row, index-aligned with views.Per row and not one for the view, because the rows are independently assembly-picked (the import form has an assembly selector per row, and init carries one per entry). Resolving every row's refNames through row 0's assembly is right only while they all name the same one: on a genuinely cross-assembly view the strict resolver answers undefined for every contig belonging to any other row, and the overlay drew NO connectors at all.A row whose assembly has not loaded is undefined rather than a hole, so a level index stays a level index; its features drop, as they do for any unresolvable refName. |
matchedTracksOverlayTrack[] | Find all track ids that match across multiple views, or return just the single view's track if only a single row is used |
overlayTracksOverlayTrack[] | The matched tracks the overlay draws for — alignments and variants. |
fetchedTracksOverlayTrack[] | The overlay tracks the overlay fetch asks for: the variant tracks. An alignments track's reads come off its own display instead. |
fetchInertboolean | Same name and same meaning as FetchMixin.fetchInert, on a view rather than a display: with no variant track matched across the rows there is nothing for the overlay fetch to ask for, so prepare declines instead of running an empty fetch and commit on every pan. |
overlayTransformKeystring | Every number that moves the overlay under a stationary cursor, in one value — what installClearHoverOnSurfaceMove watches.Per row, offsetPx and bpPerPx, which covers a pan or a zoom from any entry point: the wheel, the header buttons, a locstring search, or a linkViews echo of the row next to it. Per matched track and per row, where the track sits and the body's scrollTop and height, since a pileup scrolls and a track above it resizes under a pointer that never moved, plus regionTooLarge, whose flip swaps the body for the banner and back.Scoped to what places the overlay tracks: a track below them growing moves nothing the overlay draws on, and clearing the hover for it would read as a flicker. |
variantJunctionsByTrackMap<string, Feature[][]> | Each fetched variant track's records paired into junctions, keyed by trackId. A function of the fetched features alone, kept apart from overlayMatches so a track resize re-runs only the layout half. |
readChainsByTrackMap<string, ReadChain[]> | Each alignments track's split reads and discordant pairs, read off the displays in every row and resolved into connections, keyed by trackId. Reads no row, so a resize or a scroll leaves it alone. |
overlayMatchesMap<string, OverlayMatch> | Every overlay track's connections with their layout rects, keyed by trackId. Cached, so scrolling within loaded data does not look a row up again. |
From BaseViewModel: rendersDisplays, effectiveBodyMounted, ownTracks
Methods
| Member | Description |
|---|---|
exportSvg(opts?: ExportSvgOptions) => Promise<string> | renders the view to SVG markup, which it returns; saves it through FileSaver unless save: false |
getMatchedTracks(trackConfigId: string) => OverlayTrack[] | Get tracks with a given trackId across multiple views. Callers that index the result by view level (getTrackOverlayData, getMatchedFeaturesInLayout) rely on it staying aligned with views — which holds only because overlays are driven by overlayMatches, whose trackIds come from matchedTracks (the intersect across all views), so the track is present in every view and filter drops nothing. Don't level-index the result for an arbitrary trackId. |
connectorRows(trackId: string) => ConnectorRow[] | Per row, whether the track is minimized and whether its own pileup draws a junction's connector, so the overlay leaves it out. Reads no scroll or zoom. |
readSources(trackId: string) => (ReadSource | undefined)[] | The reads each row's alignments display lays out, one entry per row. |
| getTrackOverlayData | Per-render precompute for an overlay track. Resolves an OverlayLevel of geometry per view level, then returns getX/getY closures for converting feature layout records to SVG coordinates.yOffsetsOverride — SVG export: fixed track tops. Each track keeps its scroll, which the exported bodies draw at too. Live rendering stacks each view's height and reads its getTrackYOffset, which the LGV keeps equal to the pixels (its label bands are measured into the model), so the overlay re-renders from MobX alone rather than polling the DOM. |
| getMatchedFeaturesInLayout | |
() => MenuItem[] | |
() => MenuItem[] | |
(px: number) => MenuItem[] | What a bare click on the shared rubberband strip offers: one row per panel, each holding that panel's own click menu at the base it paints under px. A pixel rather than an offset, since each panel maps it through its own pxToBp. |
Actions
| Member | Description |
|---|---|
setWidth(newWidth: number) => void | |
setHoveredOverlay(arg: OverlayHover | undefined) => void | undefined when the pointer leaves a curve, and when the picture moves out from under it — see overlayTransformKey. |
setInteractiveOverlay(arg: boolean) => void | |
setShowIntraviewLinks(arg: boolean) => void | |
setLinkViews(arg: boolean) => void | |
setScrollZoom(arg: boolean) => void | |
setShowHeader(arg: boolean) => void | |
setMatchedTrackFeatures(obj: Record<string, Feature[][]>) => void | |
reload() => void | Re-run the overlay-feature fetch with no input change — what the Retry on its failure notification calls. |
reverseViewOrder() => void | |
squareView() => void | |
| setLaunch | |
setViews(viewInits: BreakpointSplitViewInitView[]) => void |
From BaseViewModel: setDisplayName, setBodyMounted, setMinimized
Related links
- Guide: URL query parameter API