LinearSyntenyView
Auto-generated from the @jbrowse/mobx-state-tree model in the source — see the developer guide for concepts. Provided by the linear-comparative-view plugin. View source.
Example usage
Hand-authored under defaultSession.views, with every setting written
directly on the view object. views declares the member assemblies (stacked
as linear views) and tracks the synteny feature track connecting them with
a ribbon:
{
type: 'LinearSyntenyView',
views: [{ assembly: 'hg38' }, { assembly: 'mm10' }],
tracks: ['hg38_vs_mm10.paf'],
drawCurves: true,
color: { field: 'query' },
}The launch keys are views, tracks, levelHeights, autoDiagonalize,
sameScale and collapseEmptyRows; everything else is a property below and
needs no list to join.
Stacks a linear genome view per genome, and draws the synteny tracks between adjacent rows as ribbons joining the aligned regions.
Each section ends with the members a composed model contributes, linked to the page that documents them.
Properties
| Member | Description |
|---|---|
idid: ElementId | |
typetype: types.literal('LinearSyntenyView') | |
| cigarMode | How per-base insertions and deletions inside each alignment are shown: 'full' paints indel wedges, 'matches' leaves them see-through, 'off' draws blocks only. |
drawCurvesdrawCurves: types.stripDefault(types.boolean, false) | Draw every band's ribbons as bezier curves rather than straight chords. |
drawLocationMarkersdrawLocationMarkers: types.stripDefault(types.boolean, false) | Continue the query row's scalebar grid down through every band: a tick at each round query coordinate, joined to the coordinate the alignment pairs it with. |
showOffscreenMatesshowOffscreenMates: types.stripDefault(types.boolean, true) | Mark the alignments the view cannot draw a ribbon for, along both edges of each band. Costs a second query per pair of rows. |
| overdrawPx | pixels beyond the visible viewport edge that synteny lines are still drawn. Effective up to the pan buffer (syntenyPanBufferPx: 2000px, or half the viewport when that is wider) — the worker emits CIGAR detail and location markers only that far, so a larger value draws ribbons whose detail stops partway along them. |
| launch | Transient launch state: the settings written on the view object that need resolving before they can be view state — the genome rows to open, the synteny tracks for each band, the shared scale. The afterAttach autorun applies and clears it. Not written by hand: author every setting directly on the view. |
| trackSelectorType | Ignored: the hierarchical selector is the only one. Declared because sessions and share links still carry it. |
followSyntenyfollowSynteny: types.stripDefault(types.boolean, false) | The non-anchor rows follow the anchor row through the alignment, moving to whatever region aligns to its window. |
sameScalesameScale: types.stripDefault(types.boolean, false) | Hold every genome row on one bp/px — the coarsest row's fit — so the rows compare by drawn length instead of each filling its pane. Moves the rows' zoom-out limit (sharedFit), so it holds across later zooms. |
followAnchorIndexfollowAnchorIndex: types.stripDefault(types.number, 0) | Which genome row drives the others while following. |
diagonalizeAnchorRowdiagonalizeAnchorRow: types.stripDefault(types.number, 0) | Which genome row "Re-order chromosomes" keeps as it is: the rows below it are ordered against the row above them, and the rows above it against the row below. |
followMatchOrientationfollowMatchOrientation: types.stripDefault(types.boolean, false) | While following, flip a row whose placing alignment runs the other way from the anchor's, so the two pan in the same direction. |
levelslevels: types.array(LinearSyntenyLevel) | One synteny band per adjacent pair of views, each holding its own track list. The track-selector and add-track widgets address a band through trackContainerFor. |
| views | N genome rows, with N-1 synteny levels between adjacent pairs (see reconcileLevels). |
9 inherited properties from 5 models
From BaseViewModel: displayName, minimized
From SyntenyViewMixin: lodMode
From SyntenyColorsMixin: opacity, minAlignmentLength
Volatiles
| Member | Description |
|---|---|
widthnumber | undefined | |
volatileErrorunknown | View-level failure, e.g. a launch that couldn't be applied. Volatile so a reload retries from a clean slate. |
followReportFollowReport | What the follow's last settled pass reports, for the header's follow button: rows holding because nothing aligns under the anchor, a row placed proportionally rather than by a CIGAR walk, a level with no synteny track, a multi-contig answer refused as mostly filler. |
10 inherited volatiles from 6 models
From BaseViewModel: bodyMounted
From DiagonalizeProgressMixin: awaitingAutoDiagonalize, pendingAutoDiagonalize, diagonalizeStatus, diagonalizeCancel, diagonalizeError
From ImportFormSyntenyMixin: importFormSyntenyTrackSelections
From SyntenyViewMixin: colorLegendDismissedFor
Getters
| Member | Description |
|---|---|
| bandGestureRows | The rows a drag or a wheel on a band moves: every row the follow cannot place. Off, that is every row; on, it is the anchor and any row whose level toward the anchor has no synteny track. |
scrollZoomboolean | scroll-to-zoom is a global, personal preference resolved from the session; toggling it in any view applies everywhere |
initializedboolean | |
errorunknown | The view's own failure or the first failed row's, so an export or launcher waiting on a stack with a failed row is told why. |
stackErrorunknown | The failure that leaves the stack nothing to show: the view's own, or every row's. One failed row reports itself in its place in the stack. |
assemblyNamesstring[] | |
SharedFit | The zoom-out limit every row shares while sameScale is on (sharedFit.ts). Each row pulls it through its own maxBpPerPx, finding this view by the presence of this getter. |
allSyntenyDisplaysLinearSyntenyDisplayModel[] | Every synteny display across every level. |
number | |
followPairs{…}[] | Each connected synteny level resolved into the pair of rows a follow moves it between: which row stays, which moves, which axis the anchor window is read off, and the assembly naming the level's lane of an all-vs-all track. Ordered outward from the anchor, so each level's staying row is the anchor or a row a nearer level has already placed, and a stack of three or more settles in one pass. |
trackWarningsTrackWarning[] | Every synteny display's data-quality warnings (e.g. a reversed assembly row order), grouped under the track that raised each: what the header's warning button counts and its dialog reports. |
trackContainersTrackContainer[] | Every band's track list, for a reader walking the session for displays. |
| ownTracks | Every track in the view, across its bands. |
| ownViews | |
| pendingLaunch | the launch state that still has something to apply — the gate the loading and import-form paths below read. |
hasSomethingToShowboolean | |
initPendingboolean | A launch that has not finished applying: the rows can exist, and be initialized, while the synteny tracks are still several awaits away. The levels' settled gate reads it. |
showAssemblyNameInSubviewScalebarboolean | Opts each row's scalebar into captioning its refName labels with the assembly name ("hg38" ahead of "chr1"). Read duck-typed by the child LinearGenomeView. |
drawCIGARboolean | |
drawCIGARMatchesOnlyboolean | |
hasCigarDataboolean | Whether any synteny display could show CIGAR detail, which gates the CIGAR setting. True while no display has fetched yet, and false with no synteny tracks. |
presentCigarKindsnumber | Union across loaded displays of the CIGAR indel ops drawn on screen, which the legend lists chips for. |
autoFadeWidthPxnumber | The width 'auto' compares against its thresholds: the narrowest capped mean block width of any loaded display with at least FADE_AUTO_MIN_FEATURES blocks, or Infinity with none. |
anchorAssemblyNamestring | undefined | The assembly the 'reference' color field keys on: the one bordering the most synteny levels, ties to the topmost. In a stacked ref-vs-A / ref-vs-B layout that is the shared reference, so a region keeps its color across levels. |
showLoadingboolean | Whether to show a loading indicator instead of the import form or view |
| loadingAssembly | The assembly whose load the spinner is waiting on. init names them before the rows are built, so it is the source until then. |
loadingViewLoading | undefined | What the loading screen says while showLoading, read off the assembly whose load is the wait; undefined otherwise. |
showImportFormboolean | Whether to show the import form: nothing to show, or a failure that leaves the stack nothing to show (stackError), which the form reports in a banner. |
statusViewStatus | The view's lifecycle as one value — ready, error, loading or noRegions — for a host that draws its own chrome. Same shape and precedence as the linear view's. |
24 inherited getters from 5 models
From BaseViewModel: rendersDisplays, effectiveBodyMounted
From SyntenyViewMixin: hasLodCapableAdapter, showLegend, legendSpec
From SyntenyColorsMixin: defaultOpacity, opacitySetting, opacityFade, opacityLevel, opacityField
From TrackColorsMixin: colorSetting, colorPaint, colorValue, colorDomain, colorRange, colorableAttributes, attributeRanges, colorableTracks, trackColorAssignments, colorField, hasLegendKey, colorLegendChips, colorScales
Methods
| Member | Description |
|---|---|
trackContainerFor(id: string) => TrackContainer | undefined | The level that owns a given track list, by id. The track-selector and add-track widgets target a level through here, since this view holds one track list per band rather than one of its own. |
syntenyTracks() => ComparativeTrackModel[] | Every synteny track across every level, in order. |
loadedAttributeRanges() => Record<string, AttributeRange>[] | Each loaded display's observed attribute spans, which the mixin unions into the domain the legend labels its ramp with. |
legendCigarOps() => number | Only the indel ops drawn on screen get a chip. |
offersReferenceColor() => boolean | A stack of two or more levels shares an anchor assembly. |
(extraSubMenus?: MenuItem[]) => MenuItem[] | The header's view-options menu: the zoom actions, the row coupling, what varies with the stack under "Rows", then Export SVG. Every render setting is in SyntenySettingsMenu instead. ViewOptionsMenuButton passes the "Show..." submenu as extraSubMenus, since the search box prefs are React state. |
() => MenuItem[] | |
() => MenuItem[] | |
(px: number) => MenuItem[] | What a bare click on the shared rubberband strip offers: one row per genome row, each holding that row's own click menu at the base it paints under px. A pixel rather than an offset, since each row maps it through its own pxToBp. |
6 inherited methods from 2 models
From SyntenyColorsMixin: colorableTrackConfigs, colorableAttributeNames, legendAlpha
From TrackColorsMixin: colorSurface, shapeShowsStrand, trackColorFor
Actions
| Member | Description |
|---|---|
setFollowReport(report: Partial<FollowReport>) => void | Merge into followReport. Declared ahead of afterAttach, which installs the follow that calls it. |
setFollowSynteny(flag: boolean) => void | |
setFollowAnchorIndex(idx: number) => void | |
clearClickedFeatures() => void | Release the clicked ribbon in every band, ahead of a band pointing its own: the drawer shows one feature, so one ribbon is outlined |
holdFollowAnchor<T>(fn: () => T) => T | Run a navigation of a row as the follow's own placement rather than as a gesture. While following, a gesture on any row makes that row the anchor, and the follow tells a gesture from its own work by root action: whatever fn navigates is a nested action of this one. |
takeOutRows() => void | |
reconcileLevels() => void | Keep exactly one synteny level per gap between adjacent views, growing or shrinking from the end, and both anchors inside the stack. |
setWidth(newWidth: number) => void | |
setError(e: unknown) => void | |
| setViews | |
| addView | Push a new genome row. The new trailing level starts with no synteny tracks. |
removeRow(idx: number) => void | Drop one genome row and the bands beside it. An interior row leaves one new band between the rows it separated, drawn by a track that connects them where the session has one — a track the removed bands were already showing first, which is what an all-vs-all file gives. |
reverseRows() => void | Flip the stack top to bottom. Every band keeps the pair of rows it draws between, so its tracks stay with it. |
setFollowMatchOrientation(arg: boolean) => void | |
setScrollZoom(arg: boolean) => void | |
activateTrackSelector(level: number) => Widget | |
toggleTrack(trackId: string, level?: any) => boolean | |
| showTrack | No-op for a level that doesn't exist, matching hideTrack/toggleTrack. |
| launchTrack | showTrack for a track whose display state model may be lazily loaded: loads it, then shows |
hideTrack(trackId: string, level?: any) => void | |
panStack(dx: number) => void | A band's drag, over bandGestureRows. The rows' scrolls nest under this action, so none of them reads as a gesture that would take the anchor. |
squareView() => void | Every row onto the rows' average bp/px, each keeping its centre. |
showAllRegionsAcrossRows(sameScale: boolean) => void | Every row onto its whole assembly, either all on one bp/px — the coarsest row's fit, so the largest genome fills its pane and the others draw shorter in proportion — or each fit to its own pane. sameScale latches, so the shared scale holds across later zooms. |
setSameScale(sameScale: boolean) => void | |
setDiagonalizeAnchorRow(row: number) => void | |
() => void | Latch sameScale and zoom every row onto the shared scale, keeping each row's regions and centre. |
clearView() => void | Back to the import form. Drops launch too, which hasSomethingToShow keys off while there are no rows. |
compactAllViews() => void | |
expandAllViews() => void | |
resizeAllLevelHeights(distance: number, levelIdx?: any, from?: number[]) => number | Resize every synteny band at once by scaleBandHeights, choosing the total so the bar under band levelIdx moves by distance: the bands down to it take exactly that, and the rest keep their proportion to them. from is the heights to scale; a drag passes the ones it started with, so whole-pixel rounding does not compound frame by frame. Returns how far that bar can go, which is distance unless the floor stopped it. |
autoScaleLevelHeights() => void | |
| appendRow | Append an assembly to the bottom of the stack, optionally showing a synteny track on the new level. Returns launchTrack's promise rather than awaiting it, so the action stays synchronous. |
setDrawCurves(arg: boolean) => void | |
setCigarMode(arg: "full" | "matches" | "off") => void | |
setDrawLocationMarkers(arg: boolean) => void | |
setShowOffscreenMates(flag: boolean) => void | |
setOverdrawPx(arg: number) => void | |
showAllRegions() => void | Every row back to its own whole assembly, fit to its own width, which also turns sameScale off. |
| setLaunch | |
exportSvg(opts?: ExportSvgOptions) => Promise<string> | |
openInCircularSyntenyView() => void | a circular view of this view's two genomes with its synteny tracks as ribbons, the second genome reordered to follow the first, and this view's color and length filter |
26 inherited actions from 7 models
From BaseViewModel: setDisplayName, setBodyMounted, setMinimized
From DiagonalizeProgressMixin: setAwaitingAutoDiagonalize, beginAutoDiagonalize, finishAutoDiagonalize, setDiagonalizeError, setDiagonalizeCancel, cancelAutoDiagonalize
From ImportFormSyntenyMixin: setImportFormSyntenyTrack, clearImportFormSyntenyTracks
From SyntenyViewMixin: setLodMode, setShowLegend, dismissLegendSection
From SyntenyColorsMixin: setOpacity, setOpacityField, setMinAlignmentLength
From TrackColorsMixin: observeAttributeRanges, resetAttributeRanges, setHideUnlabelled, setColorField, setColorDomain, setTrackColor, clearTrackColors
From SyntenyFadeMixin: setFadeThinAlignmentsMode, setFadeThinLatch
Related links
- Docs: URL query parameter API