ChordVariantDisplay
Auto-generated from the @jbrowse/mobx-state-tree model in the source. See the developer guide for concepts. Provided by the circular-view plugin. View source.
Draws the structural variants of a VariantTrack in a CircularView, each
translocation as a chord across the circle.
Example usage
The circular-view display for a VariantTrack of structural variants;
translocations are drawn as chords across the circle. The track config below
is what creates it; its colors are the config slots on
ChordVariantDisplay:
{
type: 'VariantTrack',
trackId: 'sv',
name: 'Structural variants',
assemblyNames: ['hg38'],
adapter: {
type: 'VcfTabixAdapter',
uri: 'https://example.com/sv.vcf.gz',
},
displays: [
{
type: 'ChordVariantDisplay',
displayId: 'sv-ChordVariantDisplay',
},
],
}The configuration slots for this model are documented on its config schema page.
Each section ends with the members a composed model contributes, linked to the page that documents them.
Properties
| Member | Description |
|---|---|
type"ChordVariantDisplay" |
Always "ChordVariantDisplay", the name a snapshot selects this model by. |
configurationChordVariantDisplayConfig |
The config node this model reads its settings from, through getConf. Its slots are documented on its config schema page. |
Volatiles
| Member | Description |
|---|---|
highlightedFeatureIdsstring[] | undefined |
ids of the records to keep at full strength while the rest dim; undefined dims nothing. The SV inspector writes the selected record's event here |
visibleFeatureIdsstring[] | undefined |
ids of the records to draw; undefined draws them all. The SV inspector writes the rows its sheet's filters leave here, so a filter change is a redraw and no refetch |
8 inherited volatiles from 3 models
From BaseChordDisplay: features, reloadCounter
From RegionTooLargeMixin: forceLoadTrack, byteEstimate, gateMeasuredViewportKey
From BaseDisplay: error, statusMessage, statusProgress
Getters
| Member | Description |
|---|---|
visibleIdSetSet<string> | undefined |
|
gateEnabledboolean |
the linear displays' region-too-large gate, over the whole fetch |
tooLargeReleasestring |
the too-large banner's advice in place of zooming in, which on the circle shrinks no fetch since every displayed region is fetched at once; a file too large for chords, which are for structural variants, draws as a ring through Display types |
| chordFeet |
every held record's two ends on the circle's unrolled axis, by the record's place in features: its start, and its mate's position where it has one, else its end. junction is the two ends unordered, which a breakend pair's two records share. |
colorSettingColorSetting |
encoding.color as written |
paintedColorFieldCategoricalField | undefined |
the field the chords paint by, undefined for a constant or callback |
chordStrokesMap<Feature, string> |
each chord's record's color: its field's value through the scale, or the value the color channel answers for it |
chordColorKeysstring[] |
each drawn record's value of the painted field, by lane; empty while the chords paint no field |
| chordPicks |
the drawn records a chord stands for, one per junction: the first record of a breakend pair draws it, and laneOfId sends both records' ids to that lane |
dimmedFeatureIdsReadonlySet<string> | undefined |
the drawn records whose chords dim while the SV inspector highlights some: every lane but those a highlighted record, or its breakend twin, draws |
chordLanesChordLanes |
the drawn records as the chord mark's lanes, each in its color with the alpha the SV inspector's dimming leaves it |
drawnLanesChordLanes |
the chord lanes, the ones whose ends are under a pixel apart included |
laneIndexByIdReadonlyMap<string, number> |
each drawn record's lane by id, a breakend pair's twin included |
shapeAlphanumber |
encoding.opacity, over each chord's color's own alpha |
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 |
legendColorstring | undefined |
the chord color the circle's key shows, when every chord shares one |
paintedColorValuesMap<string, number> |
each value of the painted field a drawn chord paints, with its color; empty while the chords paint no field. A chord whose ends are under a pixel apart draws nothing, so a zoom that opens it adds its value |
colorScalesColorScale[] |
the key of paintedColorValues |
legendSpecLegendSpec |
|
shapesTestIdstring |
the test id on the chord paths' group, on screen and in the export |
solidColorstring | undefined |
the constant color.value holds as written, undefined for none or a jexl: one |
57 inherited getters from 5 models
From ColorWritesMixin: writtenColor
From ParkedColorMixin: parkedColor, parkedIdentity
From BaseChordDisplay: view, trackAssemblyNames, trackRegions, fetchInert, loaded, ready, displayError, settingsFetchInputs, svgReady, displayPhase, radiusPx, curveDepth, bezierRadius, hoveredFeatureId, figureStage, drawnCount, shapes
From RegionTooLargeMixin: byteGateAdapterConfig, densityTooLarge, byteGateAdapterPath, adapterFetchSizeLimit, gateViewportSpanBp, gateViewport, configuredFetchSizeLimit, configForceLoad, aboveForceLoadFloor, gateExempt, estimatedFetchBytes, gateByteLimit, gateActive, gateMeasurementStale, densityGateActive, tooLargeStatus, regionTooLarge, regionTooLargeReason, zoomCanReleaseGate, gateSkipsMeasuredViewport
From BaseDisplay: parentTrack, selectedFeatureId, RenderingComponent, DisplayBlurb, adapterConfig, isMinimized, hoveredFeature, featureNoun, featureWidgetType, liveNotices, plotKeys, plot, configNotices, notices, cornerNotices, plotExamples, configDocsUrl
Methods
| Member | Description |
|---|---|
isVisible(feature: Feature) => boolean |
whether visibleFeatureIds leaves a record drawn |
shapeAt(i: number) => ChordShape | undefined |
lane i as the SVG side draws it, on the unrotated figure; undefined for a chord whose ends are under a pixel apart |
laneAt(x: number, y: number) => number | undefined |
the chord passing nearest a figure point, within CHORD_HIT_PX |
shapeLabel(feature: Feature) => string |
|
swatchColor(color: string) => string |
a key swatch for encoding.color, faded as the chords draw it |
renderSvg() => Promise<Element | null> |
|
() => MenuItem[] |
Color by and Advanced → Edit plot..., which the circular view shows under its Tracks menu |
16 inherited methods from 4 models
From ParkedColorMixin: parkedColorOf
From BaseChordDisplay: shapeFor, shapePathFor, hitAt, assemblyOf, canonicalRefName, placeEnd, axisSlice
From RegionTooLargeMixin: gateFetchState, resolvedByteLimit
From BaseDisplay: renderingProps, exportedFeatures, configProblemsOf, liftPlot, plotProblems, plotWrites
Actions
| Member | Description |
|---|---|
clickFeature(feature: Feature) => void |
what a click on the canvas reaches: the onChordClick callback when the config sets one, else the record's details |
setHighlightedFeatureIds(ids: string[] | undefined) => void |
|
setVisibleFeatureIds(ids: string[] | undefined) => void |
|
openSolidColorDialog() => void |
the picker Color by's Solid color... opens |
20 inherited actions from 5 models
From ColorWritesMixin: colorByField, setColorValue, colorByIdentity, colorByScheme, pickDefaultColor, pickSolidColor
From ParkedColorMixin: parkColor
From BaseChordDisplay: openErrorDialog, setFeatures, reload
From RegionTooLargeMixin: clearByteEstimate, clearGateMeasurements, setForceLoadTrack, commitFetchBytes, forceLoad
From BaseDisplay: setStatusMessage, setError, clearHoveredFeature, applyDisplaySettings, applyPlot