# ChordSyntenyDisplay

Auto-generated from the @jbrowse/mobx-state-tree model in the source. See the [developer guide](https://jbrowse.org/jb2/docs/developer_guide/) for concepts. Provided by the `circular-view` plugin. [View source](https://github.com/GMOD/jbrowse-components/blob/main/plugins/circular-view/src/ChordSyntenyDisplay/models/stateModelFactory.ts).

Draws a `SyntenyTrack` in a `CircularView`, with a ribbon joining the two
spans of each alignment.

## 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](https://jbrowse.org/jb2/docs/config/chordsyntenydisplay):

```js
{
  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](https://jbrowse.org/jb2/docs/config_guides/synteny_track).

The configuration slots for this model are documented on its [config schema page](../../config/chordsyntenydisplay).

Each section ends with the members a composed model contributes, linked to the page that documents them.

## Properties

| Member | Description |
| --- | --- |
| **type**<br><code>types.literal('ChordSyntenyDisplay')</code> |  |
| **configuration**<br><code>ConfigurationReference(configSchema)</code> |  |

1 inherited property from one model:

From [BaseDisplay](../basedisplay): [`id`](../basedisplay#property-id)


## Volatiles

5 inherited volatiles from 2 models:

From [BaseChordDisplay](../basechorddisplay): [`features`](../basechorddisplay#volatile-features), [`reloadCounter`](../basechorddisplay#volatile-reloadcounter)

From [BaseDisplay](../basedisplay): [`error`](../basedisplay#volatile-error), [`statusMessage`](../basedisplay#volatile-statusmessage), [`statusProgress`](../basedisplay#volatile-statusprogress)


## Getters

| Member | Description |
| --- | --- |
| **ready**<br><code>boolean</code> | `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 |
| **displayError**<br><code>unknown</code> | the fetch's error, or else the owed reorder's |
| **featureNoun**<br><code>string</code> |  |
| **attributeRanges**<br><code>Record&lt;string, AttributeRange&gt;</code> | the span or label list each color channel covers over the held alignments, which the view's ramps and key scale to |
| **channelNames**<br><code>string[]</code> | the color channels the view's modes can paint: the preset measurements and the columns the adapter declares |
| **alignmentEnds**<br><code>AlignmentEnds[]</code> | each held alignment's two ends by its place in `features`, on the circle's assemblies and in their canonical refNames: resolved once per fetch, which everything placing, coloring or reordering the alignments reads |
| **ribbonColors**<br><code>Uint32Array&lt;ArrayBufferLike&gt;</code> | each alignment's packed color under the view's `encoding.color`, by its place in `features`. A chromosome mode paints the ideogram color of the chromosome it joins, so a ribbon matches the arc it leaves; a label the view hides paints at zero alpha |
| **shapeAlpha**<br><code>number</code> | the fill opacity every resting ribbon draws at, the view's `opacityLevel`; a ribbon's own color alpha (an `encoding.color.value`'s, an `encoding.opacity` field's fade) rides its lane |
| **ribbonFeet**<br><code>{ x1: Float32Array&lt;ArrayBuffer&gt;; x2: Float32Array&lt;ArrayBuffer&gt;; y1: Float32Array&lt;ArrayBuffer&gt;; y2: Float32Array&lt;ArrayBuffer&gt;; xGaps: Uint32Array&lt;ArrayBuffer&gt;; yGaps: Uint32Array&lt;ArrayBuffer&gt;; xSlice: Int32Array&lt;ArrayBuffer&gt;; ySlice: Int32Array&lt;ArrayBuffer&gt;; strand: Float32Array&lt;ArrayBuffer&gt;; }</code> | every held alignment's feet on the circle's unrolled axis and the slice index of each end, -1 off the circle, by its place in `features`: rebuilt by a fetch or a change to the regions, never by a recolor, a zoom or a rotation |
| **ribbonPicks**<br><code>Uint32Array&lt;ArrayBufferLike&gt;</code> | the alignments the canvas draws, by their place in `features`, the widest first so every narrower ribbon draws over them: both ends on the circle, and not hidden by the view's color or its `filter`, which `ribbonColors` paints at zero alpha |
| **ribbonLanes**<br><code>RibbonLanes</code> | the drawn alignments as the ribbon mark's lanes, each in its color at that color's own alpha |
| **paintedAssemblyName**<br><code>string &#124; undefined</code> | the genome whose ideogram this track paints: the second of the two it joins on the circle, none for a genome aligned to itself |
| **paintSpans**<br><code>ReadonlyMap&lt;number, PaintRun[]&gt;</code> | the stretches of each painted-genome slice covered by the drawn ribbons, by slice index, each in the ideogram color of the first genome's chromosome it comes from; what `ideogramPaint` bins, and unchanged by a zoom |
| **ideogramPaint**<br><code>ReadonlyMap&lt;string, PaintRun[]&gt;</code> | the painted genome's ideogram, by slice key: each stretch in the color of the first genome's chromosome that the drawn ribbons over it mostly come from, one bin per CSS px |
| **drawnLanes**<br><code>RibbonLanes</code> | the ribbon lanes |
| **cappedMeanSpanPx**<br><code>number</code> | 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 |
| **legendColor**<br><code>string &#124; undefined</code> | the ribbon fill the circle's key shows: the one color every ribbon paints when the view's mode has no key of its own |
| **featureWidgetType**<br><code>{ type: string; id: string; }</code> | 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 |
| **partnerSpansBySlice**<br><code>ReadonlyMap&lt;number, PartnerSpan[]&gt;</code> | each drawn alignment's stretch on each slice it touches, by slice index, named by the chromosome at its other end, with that chromosome's genome where the track joins two |
| **chordCell**<br><code>ChordCell &#124; undefined</code> | 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 |
| **shapesTestId**<br><code>string</code> | the test id on the ribbon paths' group, on screen and in the export |

29 inherited getters from 2 models:

From [BaseChordDisplay](../basechorddisplay): [`view`](../basechorddisplay#getter-view), [`trackAssemblyNames`](../basechorddisplay#getter-trackassemblynames), [`fetchInert`](../basechorddisplay#getter-fetchinert), [`loaded`](../basechorddisplay#getter-loaded), [`svgReady`](../basechorddisplay#getter-svgready), [`displayPhase`](../basechorddisplay#getter-displayphase), [`radiusPx`](../basechorddisplay#getter-radiuspx), [`curveDepth`](../basechorddisplay#getter-curvedepth), [`bezierRadius`](../basechorddisplay#getter-bezierradius), [`hoveredFeatureId`](../basechorddisplay#getter-hoveredfeatureid), [`figureStage`](../basechorddisplay#getter-figurestage), [`laneIndexById`](../basechorddisplay#getter-laneindexbyid), [`drawnCount`](../basechorddisplay#getter-drawncount), [`shapes`](../basechorddisplay#getter-shapes)

From [BaseDisplay](../basedisplay): [`parentTrack`](../basedisplay#getter-parenttrack), [`selectedFeatureId`](../basedisplay#getter-selectedfeatureid), [`RenderingComponent`](../basedisplay#getter-renderingcomponent), [`DisplayBlurb`](../basedisplay#getter-displayblurb), [`adapterConfig`](../basedisplay#getter-adapterconfig), [`isMinimized`](../basedisplay#getter-isminimized), [`hoveredFeature`](../basedisplay#getter-hoveredfeature), [`liveNotices`](../basedisplay#getter-livenotices), [`plotKeys`](../basedisplay#getter-plotkeys), [`plot`](../basedisplay#getter-plot), [`configNotices`](../basedisplay#getter-confignotices), [`notices`](../basedisplay#getter-notices), [`cornerNotices`](../basedisplay#getter-cornernotices), [`plotExamples`](../basedisplay#getter-plotexamples), [`configDocsUrl`](../basedisplay#getter-configdocsurl)


## Methods

| Member | Description |
| --- | --- |
| **shapeAt**<br><code>(i: number) =&gt; RibbonShape</code> | lane `i` as the SVG side draws it, on the unrotated figure |
| **shapeLabel**<br><code>(feature: Feature) =&gt; string</code> |  |
| **alignmentsBetween**<br><code>(referenceAssembly: string, currentAssembly: string) =&gt; AlignmentData[]</code> | 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 |
| **partnerSpans**<br><code>(index: number) =&gt; PartnerSpan[]</code> | each drawn alignment's stretch on slice `index`, named by the chromosome at its other end |
| **laneAt**<br><code>(x: number, y: number) =&gt; number &#124; undefined</code> | the topmost ribbon covering a figure point, measured on the unrotated figure so a rotation keeps the held geometry |
| **renderSvg**<br><code>() =&gt; Promise&lt;Element &#124; null&gt;</code> |  |
| **trackMenuItems**<br><code>() =&gt; MenuItem[]</code> |  |

13 inherited methods from 2 models:

From [BaseChordDisplay](../basechorddisplay): [`shapeFor`](../basechorddisplay#method-shapefor), [`shapePathFor`](../basechorddisplay#method-shapepathfor), [`hitAt`](../basechorddisplay#method-hitat), [`assemblyOf`](../basechorddisplay#method-assemblyof), [`canonicalRefName`](../basechorddisplay#method-canonicalrefname), [`placeEnd`](../basechorddisplay#method-placeend), [`axisSlice`](../basechorddisplay#method-axisslice)

From [BaseDisplay](../basedisplay): [`renderingProps`](../basedisplay#method-renderingprops), [`exportedFeatures`](../basedisplay#method-exportedfeatures), [`configProblemsOf`](../basedisplay#method-configproblemsof), [`liftPlot`](../basedisplay#method-liftplot), [`plotProblems`](../basedisplay#method-plotproblems), [`plotWrites`](../basedisplay#method-plotwrites)


## Actions

| Member | Description |
| --- | --- |
| **reload**<br><code>() =&gt; void</code> | refetch, and run a reorder this launch still owes, which is how the error ring's Retry reaches a reorder that failed |

8 inherited actions from 2 models:

From [BaseChordDisplay](../basechorddisplay): [`openErrorDialog`](../basechorddisplay#action-openerrordialog), [`clickFeature`](../basechorddisplay#action-clickfeature), [`setFeatures`](../basechorddisplay#action-setfeatures)

From [BaseDisplay](../basedisplay): [`setStatusMessage`](../basedisplay#action-setstatusmessage), [`setError`](../basedisplay#action-seterror), [`clearHoveredFeature`](../basedisplay#action-clearhoveredfeature), [`applyDisplaySettings`](../basedisplay#action-applydisplaysettings), [`applyPlot`](../basedisplay#action-applyplot)


