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 |
|---|---|
typetype: types.literal('ChordVariantDisplay') | |
configurationconfiguration: ConfigurationReference(configSchema) |
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 |
5 inherited volatiles from 2 models
From BaseChordDisplay: features, reloadCounter
From BaseDisplay: error, statusMessage, statusProgress
Getters
| Member | Description |
|---|---|
visibleIdSetSet<string> | undefined | |
drawnFeaturesFeature[] | undefined | the held records visibleFeatureIds leaves |
featureWidgetType{ type: string; id: string; } | the panel the linear variant displays open for the same record |
| 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 |
| 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 |
colorScalesColorScale[] | the key of the values the drawn chords paint, while they paint a field |
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 |
33 inherited getters from 4 models
From ColorWritesMixin: writtenColor
From ParkedColorMixin: parkedColor
From BaseChordDisplay: view, trackAssemblyNames, fetchInert, loaded, ready, displayError, svgReady, displayPhase, radiusPx, curveDepth, bezierRadius, selectedFeatureId, hoveredFeatureId, figureStage, drawnCount, shapes
From BaseDisplay: parentTrack, RenderingComponent, DisplayBlurb, adapterConfig, isMinimized, hoveredFeature, featureNoun, 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 |
13 inherited methods from 3 models
From ParkedColorMixin: parkedColorOf
From BaseChordDisplay: shapeFor, shapePathFor, hitAt, assemblyOf, canonicalRefName, placeEnd, axisSlice
From BaseDisplay: renderingProps, configProblemsOf, liftPlot, plotProblems, plotWrites
Actions
| Member | Description |
|---|---|
onChordClick(feature: Feature) => void | the onChordClick callback when the config sets one, else the record's details |
clickFeature(feature: Feature) => void | what a click on the canvas reaches |
setHighlightedFeatureIds(ids: string[] | undefined) => void | |
setVisibleFeatureIds(ids: string[] | undefined) => void | |
openSolidColorDialog() => void | the picker Color by's Solid color... opens |
13 inherited actions from 4 models
From ColorWritesMixin: colorByField, setColorValue, pickDefaultColor, pickSolidColor
From ParkedColorMixin: parkColor
From BaseChordDisplay: openErrorDialog, setFeatures, reload
From BaseDisplay: setStatusMessage, setError, clearHoveredFeature, applyDisplaySettings, applyPlot