ChordSyntenyDisplay
Auto-generated @jbrowse/mobx-state-tree API for the current JBrowse release — see pluggable elements for concepts. Provided by the circular-view plugin. View source.
Example usage
The circular-view display for a SyntenyTrack: each alignment is drawn as a
ribbon between its span on one side and its mate's span on the other, so an
inversion reads as a twist. The track config below is what creates it; its
colors are the config slots on ChordSyntenyDisplay:
{
type: 'SyntenyTrack',
trackId: 'volvox_self',
name: 'Volvox self-alignment',
assemblyNames: ['volvox', 'volvox'],
adapter: {
type: 'PAFAdapter',
uri: 'https://example.com/volvox_self.paf',
queryAssembly: 'volvox',
targetAssembly: 'volvox',
},
displays: [
{
type: 'ChordSyntenyDisplay',
displayId: 'volvox_self-ChordSyntenyDisplay',
},
],
}A track aligning two assemblies needs both of them on the circle, which is
the view's assembly: ['hg38', 'mm39'] — see the
synteny track guide.
The configuration slots for this model are documented on its config schema page.
Members a composed model contributes are listed here too, so these tables are the whole surface.
Properties
| Member | Description | Defined by |
|---|---|---|
typetype: types.literal('ChordSyntenyDisplay') | ChordSyntenyDisplay | |
configurationconfiguration: ConfigurationReference(configSchema) | ChordSyntenyDisplay | |
idid: ElementId | BaseDisplay |
Volatiles
| Member | Description | Defined by |
|---|---|---|
featuresfeatures: undefined as Feature[] | undefined | BaseChordDisplay | |
reloadCounterreloadCounter: 0 | the fetch's pure "go again" signal | BaseChordDisplay |
errorerror: undefined as unknown | BaseDisplay | |
statusMessagestatusMessage: undefined as string | undefined | BaseDisplay | |
statusProgressstatusProgress: undefined as number | undefined | determinate progress fraction [0,1] for the current status, or undefined when the in-flight phase is indeterminate. Set alongside statusMessage by setStatusMessage; a display that never shows a bar simply leaves it undefined. | BaseDisplay |
Getters
| Member | Description | Defined by |
|---|---|---|
readyboolean | loaded, and no reorder this launch asked for still owed. Ribbons drawn before it would be drawn against the arcs it is about to move; a reorder that failed keeps this false and shows as displayPhase error, so a capture never commits the hairball | ChordSyntenyDisplay |
displayErrorunknown | the fetch's error, or else the owed reorder's | ChordSyntenyDisplay |
featureNounstring | ChordSyntenyDisplay | |
attributeRangesRecord<string, AttributeRange> | the span or label list each colour channel covers over the held alignments, which the view's ramps and key scale to | ChordSyntenyDisplay |
channelNamesstring[] | the colour channels the view's modes can paint: the preset measurements and the columns the adapter declares | ChordSyntenyDisplay |
ribbonColorsMap<string, number> | each alignment's packed colour under the view's color, by feature id. A chromosome mode paints the ideogram colour of the chromosome it joins, so a ribbon matches the arc it leaves; a label the view hides paints at zero alpha | ChordSyntenyDisplay |
ribbonFill(feature: Feature) => string | the resting fill of each ribbon, opaque: the ribbons share one ribbonOpacity, so an opacity drag repaints no ribbon | ChordSyntenyDisplay |
ribbonOpacitynumber | the fill opacity every resting ribbon draws at, the view's opacityLevel; a ribbon's own colour alpha (a color.value's, an opacity field's fade) rides its lane | ChordSyntenyDisplay |
drawnFeaturesFeature[] | undefined | what the ribbons draw: the held alignments at least the view's minAlignmentLength long on their own side, less those the view's colour hides | ChordSyntenyDisplay |
shapeAlphanumber | ribbonOpacity, as the canvas reads it | ChordSyntenyDisplay |
| ribbonFeet | every held alignment's feet on the circle's unrolled axis, by the feature's place in features: rebuilt by a fetch or a change to the regions, never by a recolour, a zoom or a rotation | ChordSyntenyDisplay |
ribbonLanesRibbonLanes | the drawn alignments as the ribbon mark's lanes, each in its colour at that colour's own alpha | ChordSyntenyDisplay |
paintedAssemblyNamestring | undefined | the genome whose ideogram this track paints: the second of the two it joins on the circle, none for a genome aligned to itself | ChordSyntenyDisplay |
ideogramPaintReadonlyMap<string, PaintRun[]> | the painted genome's ideogram, by slice key: each stretch in the colour of the first genome's chromosome that the drawn ribbons over it mostly come from, one bin per CSS px | ChordSyntenyDisplay |
drawnCountnumber | how many alignments the canvas draws as ribbons | ChordSyntenyDisplay |
cappedMeanSpanPxnumber | the drawn alignments' mean span on screen, each counted at no more than the width the thin fade stops caring about, which the view's 'auto' fade is decided on | ChordSyntenyDisplay |
laneIndexByIdMap<string, number> | each drawn feature's place in the lanes, by id | ChordSyntenyDisplay |
shapesRibbonShape[] | every drawn alignment as the export draws it | ChordSyntenyDisplay |
legendColorstring | undefined | the ribbon fill the circle's key shows: the one colour every ribbon paints when the view's mode keys nothing of its own | ChordSyntenyDisplay |
featureWidgetType{ type: string; id: string; } | the panel the linear synteny displays open for the same record, so a ribbon clicked on the circle and a ribbon clicked in a synteny view share one drawer entry | ChordSyntenyDisplay |
chordCellChordCell | undefined | what the view's canvas draws for this display: its lanes while it is ready, nothing while its loading or error ring covers the circle | ChordSyntenyDisplay |
| view | BaseChordDisplay | |
trackAssemblyNamesstring[] | the track's assemblies that are on the circle, canonical and in the order the circle lays them out | BaseChordDisplay |
fetchInertboolean | nothing of this track's is on the circle, so the fetch never runs; the SVG export's wait and the retry contract check both read it | BaseChordDisplay |
loadedboolean | BaseChordDisplay | |
svgReadyboolean | the off-screen export gate, on the shared computeSvgReady policy. A radial display has no box to draw an error in, so the export fails rather than exporting a message | BaseChordDisplay |
displayPhaseDisplayStatusPhase | BaseChordDisplay | |
radiusPxnumber | BaseChordDisplay | |
bezierRadiusRationumber | how far from the center a chord across the circle passes, as a fraction of the radius; a shorter chord bows less, in proportion to its span | BaseChordDisplay |
bezierRadiusnumber | BaseChordDisplay | |
sliceIndexRecord<string, Slice> | every slice of the circle, keyed by canonical assembly AND refName: two genomes on one circle can each carry a chr1. An elided slice answers to each refName it swallowed. | BaseChordDisplay |
selectedFeatureIdstring | undefined | BaseChordDisplay | |
hoveredFeatureIdstring | undefined | the feature under the pointer, which the view hit-tests for every chord display at once | BaseChordDisplay |
chordStageChordStage | the polar stage as the canvas and the pointer see it, rotation in | BaseChordDisplay |
figureStageChordStage | the polar stage on the unrotated figure, which the view's SVG turns: what the export and the highlight paths are placed on | BaseChordDisplay |
parentTrackAbstractTrackModel | BaseDisplay | |
RenderingComponentFC<…> | BaseDisplay | |
| DisplayBlurb | BaseDisplay | |
adapterConfigRecord<string, unknown> | BaseDisplay | |
isMinimizedboolean | Returns true if the parent track is minimized. Used to skip expensive operations like autoruns when track is not visible. | BaseDisplay |
hoveredFeatureunknown | Overridable hook (default undefined): what the pointer is currently over, for readers outside the display. LinearGenomeViewContainer publishes it to session.hovered, the view-wide "what is the user pointing at" channel a plugin can subscribe to.Declared here because a cross-display consumer can only read a name the base declares — the same reason FetchMixin.fetchInert is a hook rather than a getter each display invents. The container used to read featureUnderMouse, which only the wiggle, alignments and Manhattan families spelled that way — canvas said hoveredFeature, variants hoveredGenotype — so the channel carried a hover from a third of the display types and nothing said which. It also asked only displays[0] of each track.unknown because the payload genuinely differs — a read, a wiggle bin, a SNP, a genotype cell — and session.hovered is typed to match ("can be anything; code that wants to deal with this should examine it"). Narrow it in the override. | BaseDisplay |
plotKeysstring[] | The grammar settings this display's config declares, by slot name (PLOT_VOCABULARY): what "Edit plot..." edits. Empty on a display with none, which then offers no editor. | BaseDisplay |
plotPlot | Those settings as declared, defaults left off and a shorthand written as a config file writes it. An agent edits a structuredClone of it, checks it with plotProblems and hands it to applyPlot. | BaseDisplay |
plotExamplesreadonly PlotExample[] | The worked examples this display type declares, which "Edit plot..." offers as buttons. | BaseDisplay |
configDocsUrlstring | This display type's page in the config reference, which lists every setting it takes. | BaseDisplay |
Methods
| Member | Description | Defined by |
|---|---|---|
firstGenomeEnds(feature: Feature) => readonly [string, string] | an alignment's two refNames with the circle's first genome's end first, the order the view's query and target modes read them in | ChordSyntenyDisplay |
shapeAt(i: number) => RibbonShape | lane i as the SVG side draws it, on the unrotated figure | ChordSyntenyDisplay |
shapeFor(featureId: string) => RibbonShape | undefined | the ribbon a drawn alignment's id names, as the SVG side draws it; undefined for an id the canvas draws no ribbon for | ChordSyntenyDisplay |
shapeLabel(feature: Feature) => string | ChordSyntenyDisplay | |
shapePathFor(feature: Feature) => string | undefined | a drawn feature's outline as an SVG path on the unrotated figure, for anything that has to find a ribbon on screen without a DOM node to find | ChordSyntenyDisplay |
| alignmentsBetween | the held alignments joining two assemblies on the circle, in canonical refNames and oriented reference side first, which is what the view's reorder reads instead of fetching the file again | ChordSyntenyDisplay |
partnerSpans(index: number) => PartnerSpan[] | each drawn alignment's stretch on slice index, named by the chromosome at its other end, with that chromosome's genome where the track joins two | ChordSyntenyDisplay |
hitAt(dx: number, dy: number) => Feature | undefined | the alignment whose ribbon covers a point CSS px from the circle's centre in the screen frame, the topmost where several do | ChordSyntenyDisplay |
| renderSvg | ChordSyntenyDisplay | |
assemblyOf(assemblyName: string | undefined) => string | undefined | the assembly on the circle a feature names, in whatever spelling the adapter wrote. A feature that names none, as a VCF record does not, is on the track's first assembly. | BaseChordDisplay |
canonicalRefName(assemblyName: string, refName: string) => string | a refName as the adapter wrote it, in the assembly's canonical spelling | BaseChordDisplay |
| sliceFor | the slice one end of a feature lands on | BaseChordDisplay |
| axisSlice | the slice of the unrolled axis one end of a feature lands on | BaseChordDisplay |
| renderingProps | props passed to the renderer's React "Rendering" component. these are client-side only and never sent to the worker. includes displayModel and callbacks | BaseDisplay |
() => MenuItem[] | BaseDisplay | |
liftPlot(draft: Plot) => AnyConfigurationModel | A draft as the config would hold it, merged over plot, throwing what a config file would be refused for. Nothing on the display changes. | BaseDisplay |
plotProblems(draft: Plot) => string[] | What a draft would report once applied, throwing a refusal as liftPlot does: what its colour objects and scales.y say together that cannot be drawn as written. A display with a rule list over its settings overrides it; the draft still applies, and draws what it can. | BaseDisplay |
plotWrites(draft: Plot) => Record<string, unknown> | What applying a draft would write, by setting: the lifted value where it differs from plot, null where it resets one. Throws a refusal. | BaseDisplay |
Actions
| Member | Description | Defined by |
|---|---|---|
clickFeature(feature: Feature) => void | what a click on the canvas reaches: the alignment's details | ChordSyntenyDisplay |
reload() => void | refetch, and run a reorder this launch still owes, which is how the error ring's Retry reaches a reorder that failed | ChordSyntenyDisplay |
openErrorDialog() => void | BaseChordDisplay | |
setFeatures(features: Feature[] | undefined) => void | BaseChordDisplay | |
setStatusMessage(status?: RpcStatus | undefined) => void | BaseDisplay | |
setError(error?: unknown) => void | BaseDisplay | |
clearHoveredFeature() => void | Overridable hook (default no-op): drop whatever hoveredFeature reports. The writing twin of that getter, and what installClearHoverOnViewportChange calls.A display that STORES its hover owes an override; one that derives it from the live pointer (Hi-C, LD) owes nothing, and the default costs it nothing. Declared here so the clear can be installed for every display rather than remembered per display — forgetting it is the failure ARCHITECTURE.md's stored-hover section is about, and it used to be six closures at six call sites, which is six chances to omit one. | BaseDisplay |
| applyDisplaySettings | Apply a set of display settings to the live display, and report which were applied. Each key runs through the display config schema's preProcessSnapshot (shorthand expansions and legacy-key migrations, as showTrackGeneric applies to a session spec's inline track keys), then writes the matching config slot. A key naming a sub-schema (facet, color) replaces the whole object, its string shorthand lifted by that schema, and null clears it. Keys that are not slots come back in unapplied as { key, reason }, so a caller can tell a misspelling from a key that has an action instead of a slot.allowSetters also routes a non-slot key to a single-argument action named set<Key>. It is off by default because session specs, share links and embeds pass untyped JSON here, and a default fallback would let them call internal setters (setError, setScrollTop, ...) and call multi-argument setters with one argument. A caller that wants a specific action can call it directly.A key whose write threw is reported in failed. Only failed means the caller passed a bad value. unapplied needs the caller's own context to read: showTrackGeneric spreads the same settings into the display's snapshot, so a declared prop (resolution) has already landed by the time it reports here, while the restyle path spreads nothing and every entry there did nothing.A per-key error does not abort the remaining keys. A caller mid- showTrack has already pushed the track, and one rejected value should not leave it half-configured. | BaseDisplay |
applyPlot(draft: Plot) => void | Write a draft over plot: each setting it changes is replaced whole, so a member left out of an object goes back to its default, and null resets the setting. A draft the schema refuses, or naming a setting outside the plot, throws before anything is written. | BaseDisplay |