AlignmentsColor
Auto-generated from the config schema in the source — see the config guide for concepts. Provided by the alignments plugin. View source.
Example usage
{ type: 'LinearAlignmentsDisplay', color: { field: 'strand' } }{
type: 'LinearAlignmentsDisplay',
color: { field: 'tags.HP', domain: ['1', '2'], range: ['#d95f02', '#1b9e77'] },
}{
type: 'LinearAlignmentsDisplay',
color: { field: 'tags.NM', scale: 'linear', scheme: 'viridis' },
}{
type: 'LinearAlignmentsDisplay',
color: { field: 'insertSize', domain: ['150', '600'] },
}{
type: 'LinearAlignmentsDisplay',
color: { field: 'pairOrientation', domain: ['RR'], range: ['#d95f02'] },
}The alignments displays' color setting: one color for every read, or a
field each read carries. A read dimension paints its own vocabulary
(strand, firstOfPairStrand, pairOrientation, insertSize,
insertSizeAndOrientation, mateRefName) or bins (mapq, the four a
facet over it stacks), tags.XX reads a SAM tag, and any other name reads
the read as a facet over it does: the facet's own split, spliced,
pairing and mateAssembly, a feature attribute, a dotted path into one
or a jexl: expression. A string is the constant.
The per-base layer over the reads is
AlignmentsBaseColor.
Related links
- Extended by: LGVSyntenyColor
Config slots
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 |
|---|---|
valuemaybeColor | The fill of every read while no field paints, and of a read carrying no value under a tag or attribute, or no mate under mateRefName. Arcs and pair orientations keep the theme's colors. Writing color: "steelblue" lands here. Unset, the theme's read color. |
labelsstringArray = [] | Names for each level or value range colors, in the same order, in the key, the hovers and the arc key: labels: ["Maternal", "Paternal"] beside domain: ["1", "2"] on tags.HP. |
fieldstring = '' | field to color each read by: strand, firstOfPairStrand, pairOrientation, insertSize, insertSizeAndOrientation and mateRefName paint their own vocabulary and mapq its four bins; tags.XX reads a SAM tag; any other name reads as a facet over it does: split, spliced, pairing, mateAssembly, a feature attribute, a dotted path or a jexl: expression |
scalemaybeStringEnum (none, categorical, linear, threshold) | none paints value and keeps the field for a switch back; categorical a range color per value; linear a ramp over mapq or a numeric tag or attribute between domainMin and domainMax; threshold the bins domain cuts; unset, threshold over insertSize, insertSizeAndOrientation and mapq, and categorical over any other field |
domainstringArray = [] | for a categorical scale, the values that take the range first, in order: a preset field's own levels (strand 1 and -1; pairOrientation LR, RL, RR and LL; insertSize short, normal and long; under the insert-size and orientation fields, unmappedMate and interchrom, and in a chain under the orientation ones splitInverted, splitSameStrand, segmentInverted and segmentSameStrand; '' a read with no value), a MAPQ, 255 for unavailable, or a tag's values; for a threshold scale, the cut points, which over insertSize are the two between short, normal and long, where the sampled distribution otherwise sets them, and over mapq 1, 10 and 30 |
domainMinmaybeNumber | the bottom of a linear or log scale's domain; unset follows the loaded values |
domainMaxmaybeNumber | the top of a linear or log scale's domain; unset follows the loaded values |
domainQuantilenumber = 1 | the quantile an open end of a linear or log scale follows over the loaded values: 1 their extremes, 0.99 clips the outermost 1% at each end, each sign measured on its own advanced |
rangecolorArray = [] | CSS colors a categorical scale hands its domain in order, or with no domain a preset field's levels in their own order, a threshold scale its bins, or a linear scale's stops, evenly spaced; a level left out keeps its default; empty is the field's own colors, cividis over mapq's bins, the tag palette or viridis |
schememaybeStringEnum (viridis, magma, inferno, cividis, juicebox, fall, reds, blues, redblue, purpleorange, redgreyblue, blueyellowred) | a named ramp: a linear or log scale runs along it, and a threshold that writes cuts takes one color per interval from end to end; range's colors, where it lists any, win over it |
reverseboolean = false | turns the ramp round, so its last color paints the bottom of a linear or log domain or a threshold's lowest interval |
domainMidmaybeNumber | the value the ramp's middle stop sits at, so a diverging ramp centres somewhere other than the middle of the domain, both sides on one scale: the farther end of the domain reaches its end color and equal distances from the middle take equal colors; unset, the stops are evenly spaced across it |
titlemaybeString | key title; unset keeps the display's own heading, "" draws none |
descendingmaybeBoolean | threshold key lists the highest interval first; unset follows the field's preset, else the lowest first |