SyntenyViewMixin
Auto-generated @jbrowse/mobx-state-tree API for the current JBrowse release — see pluggable elements for concepts. Built into JBrowse core. View source.
What the linear synteny and dotplot views share beyond SyntenyColorsMixin:
the level-of-detail tier every track draws at, and a colour key the reader
closes per mode.
Members a composed model contributes are listed here too, so these tables are the whole surface.
Properties
| Member | Description | Defined by |
|---|---|---|
| lodMode | Level-of-detail tier selection for PIF adapters. 'auto' uses the adapter's bpPerPx threshold; 'fine' forces the per-row CIGAR tier (t/q); 'coarse' forces the tier whose CIGAR is folded to its large indels (T/Q) when present. One value for the view, so every track draws at the same tier. | SyntenyViewMixin |
alphaalpha: types.stripDefault(types.number, defaultAlpha) | Opacity of every alignment, 0 to 1. The synteny view defaults it low for dense unfiltered hairballs (with minAlignmentLength set, ~0.4 gives stronger colour); the dotplot defaults it opaque. | SyntenyColorsMixin |
| minAlignmentLength | Hide alignment blocks shorter than this many bp, which cuts whole-genome hairball noise. | SyntenyColorsMixin |
| color | The colour every track in the view paints with, a SyntenyColor object: { field: "strand" }, { field: "query" }, { field: "reference" }, { field: "track" }, a measurement (identity, mapq, dnds) or a column the tracks declare, with domain ordering a text column's labels; a colour string paints every alignment. Unset, the view's default paints: query on the circular view, the default scheme elsewhere. | TrackColorsMixin |
trackColorstrackColors: types.map(types.string) | trackId -> explicit color under color: { field: 'track' }. Absent means the track takes an automatic slot from the palette. | TrackColorsMixin |
hideUnlabelledhideUnlabelled: types.stripDefault(types.boolean, false) | Under a text-column mode, draw only the rows that carry a label. | TrackColorsMixin |
Volatiles
| Member | Description | Defined by |
|---|---|---|
colorLegendDismissedForcolorLegendDismissedFor: undefined as string | undefined | The field whose legend the reader closed. The legend comes back with the next field that has one, so a dismissal is scoped to the field it was made in rather than being a setting to find again. | SyntenyViewMixin |
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 a column's 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 |
|---|---|---|
hasLodCapableAdapterboolean | Whether any track's adapter has tiers to switch between, which gates the "Level of detail" setting. | SyntenyViewMixin |
showLegendboolean | The legend-host half of LegendMixin a view needs: whether the key draws, which is the mode having one and the reader not having closed it in this mode. ChromeLegend and SvgLegend read it. | SyntenyViewMixin |
legendSpecLegendSpec | The key ChromeLegend draws on screen and SvgLegend in the export. | SyntenyViewMixin |
defaultAlphanumber | The alpha a reset returns to. | SyntenyColorsMixin |
colorSettingSyntenyColorSnapshot | The color object as its snapshot holds it. | TrackColorsMixin |
colorValuestring | undefined | color.value: the colour every alignment paints under the default mode in place of the view's own scheme, or undefined for that scheme. | TrackColorsMixin |
colorDomainreadonly string[] | color.domain, the order a text column's labels take. | TrackColorsMixin |
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). A column 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 color: { field: 'track' }. Assigned across the whole view rather than per display, so an automatic slot can't duplicate a color pinned on a sibling. | TrackColorsMixin |
colorFieldstring | The field color paints by, '' for the default colour. | TrackColorsMixin |
hasLegendKeyboolean | Whether the mode has a key worth a box: a track palette, a ramp, a reader-named column, or strand on points. A reversed ribbon twists, but a whole-genome dotplot is mostly dots with no slope to read, so there the colour is the only strand cue and needs its key. | TrackColorsMixin |
colorLegendChipsColorChip[] | Legend rows naming the overlaid tracks — one per track with its palette color, however many levels it is on, and only under color: { field: 'track' }, since every other mode has a fixed legend of its own. | TrackColorsMixin |
colorScalesColorScale[] | The active mode's key, or none for a mode without one. View-wide rather than per display because the key is one box for the whole view, and the ramp domain it labels is the view's. | TrackColorsMixin |
Methods
| Member | Description | Defined by |
|---|---|---|
syntenyTracks() => ComparativeTrackModel[] | Overridable hook: every synteny track in the view, in paint order. | SyntenyColorsMixin |
colorableTrackConfigs() => { trackId: string; name: string; }[] | SyntenyColorsMixin | |
colorableAttributeNames() => string[] | The columns the tracks declare in their adapter's attributeColumns (the ortholog-table adapter's slot), one colour mode each. | SyntenyColorsMixin |
legendAlpha() => number | The key's chips are composited by the plot's opacity, as the alignments are. | SyntenyColorsMixin |
loadedAttributeRanges() => Record<string, AttributeRange>[] | One entry per loaded display: the span each numeric channel actually covered in the data that display fetched. Overridden by the composing view, which is the only thing that can reach the displays. From loaded DATA rather than from the config, unlike colorableAttributeNames — a column's observed span is not declared anywhere, so nothing before the first fetch can answer it. | TrackColorsMixin |
legendCigarOps() => number | undefined | Overridable hook: the indel ops the key lists a chip for, so it names only what the eye can find. undefined is the static menu preview; the dotplot draws flat points and never a CIGAR op. | TrackColorsMixin |
colorSurface() => SyntenyColorSurface | Overridable hook: what draws each alignment, a ribbon with match and indel blocks or one flat point (the dotplot). The key, the menu's help text and which fields key at all read it. | TrackColorsMixin |
offersReferenceColor() => boolean | Overridable hook: whether the view has a shared reference for the reference field to anchor on. It needs a stack of two or more levels; below that it is query or target by another name. | TrackColorsMixin |
trackColorFor(trackId: string) => string | TrackColorsMixin |
Actions
| Member | Description | Defined by |
|---|---|---|
setLodMode(value: LodMode) => void | SyntenyViewMixin | |
setShowLegend(show: boolean) => void | The legend host's setter: closing the key hides it for this mode only, so picking another mode brings its key up. | SyntenyViewMixin |
dismissLegendSection() => void | One section is the whole key here. | SyntenyViewMixin |
setAlpha(value: number) => void | SyntenyColorsMixin | |
setMinAlignmentLength(value: number) => void | SyntenyColorsMixin | |
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 |
setHideUnlabelled(value: boolean) => void | TrackColorsMixin | |
setColorField(field: string) => void | Set the field the view paints by over the color object ('' for the default colour), and rescale the ramp, which is the only way back from a domain one outlying window widened. | TrackColorsMixin |
setColorDomain(domain: string[]) => void | Declare the order a text column's labels take. The labels listed lead, the rest follow sorted; an empty list gives back the order the fetches found them in. | TrackColorsMixin |
setTrackColor(trackId: string, value: string | undefined) => void | Pin one track's color under color: { field: 'track' }, or release it back to an automatic palette slot. | TrackColorsMixin |
clearTrackColors() => void | TrackColorsMixin |
Related links
- Guide: URL query parameter API