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.
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',
},
],
}Draws the structural variants of a VariantTrack in a CircularView, each
translocation as a chord across the circle.
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) |
1 inherited property from one model
From BaseDisplay: id
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 |
|---|---|
drawnFeaturesFeature[] | undefined | the held records visibleFeatureIds leaves |
highlightedFeatureIdSetSet<string> | undefined | |
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 own start, and its mate's position where it names one, else its own end. junction is the two ends unordered, which a breakend pair's two records share. |
colorSettingColorSetting | the color object as written |
paintedColorFieldCategoricalField | undefined | the field the chords paint by, undefined for a constant or callback |
chordStrokesMap<Feature, string> | each drawn record's color: its field's value through the scale, or the value the color object 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 |
chordLanesChordLanes | the drawn records as the chord mark's lanes, each in its color with the alpha the SV inspector's dimming leaves it |
drawnCountnumber | how many records the chord lanes hold, the ones whose ends are under a pixel apart included |
laneIndexByIdMap<string, number> | each drawn record's place in the lanes, by id |
shapesChordShape[] | every drawn chord as the export draws it |
shapeAlphanumber | 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 |
27 inherited getters from 2 models
From BaseChordDisplay: view, trackAssemblyNames, fetchInert, loaded, ready, displayError, svgReady, displayPhase, radiusPx, bezierRadiusRatio, bezierRadius, sliceIndex, selectedFeatureId, hoveredFeatureId, chordStage, figureStage
From BaseDisplay: parentTrack, RenderingComponent, DisplayBlurb, adapterConfig, isMinimized, hoveredFeature, featureNoun, plotKeys, plot, plotExamples, configDocsUrl
Methods
| Member | Description |
|---|---|
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 |
shapeFor(featureId: string) => ChordShape | undefined | the chord a drawn record's id names, as the SVG side draws it; undefined for an id the lanes do not hold, and for a chord whose ends are under a pixel apart |
hitAt(dx: number, dy: number) => Feature | undefined | the record whose chord passes nearest a point CSS px from the circle's centre in the screen frame, within CHORD_HIT_PX |
shapeLabel(feature: Feature) => string | |
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 chord on screen without a DOM node to find |
| renderSvg |
9 inherited methods from 2 models
From BaseChordDisplay: assemblyOf, canonicalRefName, sliceFor, axisSlice
From BaseDisplay: renderingProps, , 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 |
8 inherited actions from 2 models
From BaseChordDisplay: openErrorDialog, setFeatures, reload
From BaseDisplay: setStatusMessage, setError, clearHoveredFeature, applyDisplaySettings, applyPlot