ChordColor
Auto-generated from the config schema in the source — see the config guide for concepts. Provided by the circular-view plugin. View source.
A variant chord's encoding.color: a CSS color or jexl: callback in
value for every chord, or a field of the record whose values each take
a range color, with a key on the circle. svType paints the
structural-variant classes the variant displays paint. A string is the
field.
Example usage
{ type: 'ChordVariantDisplay', encoding: { color: 'svType', opacity: 0.45 } }Preset fields
A field named here paints through its own scale while scale.type is unset, and range and names index its levels in order while domain is unwritten. Any other field is ordinal.
| Field | Scale | Levels | Names | Other defaults |
|---|---|---|---|---|
strand | ordinal | 1, -1, 0 | Forward strand, Reverse strand, No strand | range: tomato, cornflowerblue, goldenrod |
svType | ordinal | DEL, DUP, INS, INV, CNV, TR, BND, CPX, OTHER | Deletion, Duplication, Insertion, Inversion, Copy-number variable, Tandem repeat, Breakend / translocation, Complex, Other / mixed | range: #e41a1c, #377eb8, #800080, #ff7f00, #7e6148, #e7298a, #17becf, #66a61e, #000000; key "SV type" |
impact | ordinal | HIGH, MODERATE, LOW, MODIFIER, Unannotated | range: #d32f2f, #f57c00, #fbc02d, #9e9e9e, #607d8b; key "Consequence impact" |
Config slots
A setting written to it replaces it whole: a member left out returns to its default. Slot types (fileLocation, frozen, ...) are explained in the config slot types reference. Slots a base configuration contributes are listed here too, so this table is the whole surface.
| Slot | Description |
|---|---|
valuecolor = 'rgb(255,133,0)' | A CSS color, or a jexl callback over feature returning one, for every chord.callback args: feature |
| scale ChordColorScale sub-schema | How the field's values map to colors, Vega-Lite's scale object. |
| legend ChordColorLegend sub-schema | The key this channel draws. |
fieldfeatureField = '' | a record field, svType say, or a jexl expression over feature, whose values each paint one range color with a key |
scale.typemaybeStringEnum | ordinal a range color per value of field; threshold a range color per interval between the cut points in domain; unset follows field |
scale.domainstringArray = [] | the values that take the range first, in order; under threshold, the ascending cut points, a value on a cut taking the interval above it |
scale.rangecolorArray = [] | CSS colors the domain takes, in order, continuing into the default palette past its end; under threshold one per interval, one more than the cuts |
scale.schememaybeStringEnum (viridis, magma, inferno, cividis, juicebox, fall, reds, blues, redblue, purpleorange, redgreyblue, redyellowblue) | a named ramp sampled end to end: an ordinal scale that lists a domain takes one color per value, and a threshold that writes cuts one per interval; range's colors, where it lists any, win over it |
scale.reversemaybeBoolean | turns the ramp round, so its last color paints the bottom of a ramp's domain or a threshold's lowest interval; unset follows the field's preset, else runs as written |
scale.unknownmaybeColor | color for a value missing from domain. Unset: the next palette color where the display deals one, and the levels a preset field names, such as strand's, keep their own colors. A color: that color. "": no color dealt, so a feature paints the no-value grey, a variant cell the alt hue, and a row keeps the color it already has |
scale.invalidmaybeColor | color for a feature with no value under an ordinal scale's field; unset, the display's no-value color |
scale.namesstringArray = [] | key name for each domain value, one each in order, or under threshold for each interval from the lowest; a value past the end of the list shows its own |
legend.titlemaybeString | key title; unset keeps the display's own heading, "" draws none |
legend.descendingmaybeBoolean | threshold key lists the highest interval first; unset follows the field's preset, else the lowest first |