SyntenyColor
Auto-generated from the config schema in the source — see the config guide for concepts. Built into JBrowse core. View source.
Example usage
{ type: 'LinearSyntenyView', color: { field: 'strand' } }{ type: 'DotplotView', color: { field: 'query' } }{ type: 'LinearSyntenyView', color: { field: 'identity', scheme: 'magma', domainMin: 0.9 } }{ type: 'LinearSyntenyView', color: { field: 'identity', scale: 'threshold', domain: ['0.95', '0.99'] } }{
type: 'LinearSyntenyView',
color: {
field: 'gene_group',
domain: ['A1a', 'B1'],
range: ['#1b9e77', '#d95f02'],
labels: ['Subgenome A', 'Subgenome B'],
title: 'Gene group',
},
}The linear synteny and dotplot views' color setting, which every track
in the view paints with: one color for every alignment, or a field each
alignment carries — its strand, the sequence at either end, the anchor
assembly's, the track it came from, a measurement through its preset
(identity and dnds on a ramp, mapq in the alignments display's bins,
syntenicDepth grey for a one-to-one ortholog and orange where genes share
one),
or a column the tracks declare in attributeColumns. A string is the
constant.
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 color of every alignment under the none scale, in place of the view's default scheme: the match block of a synteny ribbon, whose insertions and deletions keep their colors, or a dotplot point. Writing color: "grey" lands here. Unset, the default scheme paints. |
fieldstring = '' | field to color each alignment by: strand paints forward and reverse; query and target one color per sequence on that side, reference one per chromosome of the anchor assembly across a stack, track one per overlaid track (pinned under Track colors); identity and dnds paint their preset ramps, mapq its bins and syntenicDepth grey for a one-to-one MCScan .anchors or .blocks link and orange where genes share an ortholog; any other name is a column the tracks declare in attributeColumns, a ramp over the values seen for numbers and one color per label for text (or the color a color column put beside it) |
scalemaybeStringEnum (none, linear, threshold) | none paints value and keeps the field for a switch back; linear runs a number along a ramp and threshold bins it at the cuts domain lists; unset, a measurement paints its own scale and a column one read off its values |
domainstringArray = [] | a text column's labels that take the palette first, in order, and lead the key, the rest following sorted, strand's values (1, -1) in the order range colors them, or a threshold's cuts; a label left out takes a color no listed label or label met before it paints, the first time the view meets it, and keeps it |
rangecolorArray = [] | CSS colors a text column's labels or strand's values take, in domain order, continuing into the default palette past its end; with no domain, each label takes one of them by its name; on a ramp (identity, dnds or a numeric column), its stops, evenly spaced, in place of the field's own; under threshold, one per interval |
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 |
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 |
labelsstringArray = [] | key label for each domain value, one each in order, or under threshold for each interval from the lowest; one past the list keeps its own name |
descendingmaybeBoolean | threshold key lists the highest interval first; unset follows the field's preset, else the lowest first |
titlemaybeString | key title; unset keeps the display's own heading, "" draws none |
Related links
- Docs: URL query parameter API