MafColor
Auto-generated from the config schema in the source — see the config guide for concepts. Provided by the maf plugin. View source.
Example usage
{ type: 'LinearMafDisplay', color: 'identity' }{ type: 'LinearMafDisplay', color: 'identity', y: 'identity' }{
type: 'LinearMafDisplay',
color: { field: 'identity', domainMin: 0.7, scheme: 'viridis' },
}The MAF display's color setting colors each species row's aligned cells
by one field.
mismatch paints a base only where it differs from the reference,
base every base, identity the mean identity to the reference along a
ramp, chromosome each block by the rank of its source chromosome within
the row, and codon each codon by its amino-acid change, given an
annotationAdapter. A string is the field. Each field has one scale:
identity runs from domainMin 0 to domainMax 1 along the
redgreyblue scheme, as every display's identity does, and the others are
categorical. The bases and the
codons paint the theme's colors. The slots are the shared color object's,
so jbrowse validate and "Edit plot..." judge them as they judge any other
display's.
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 |
|---|---|
fieldstringEnum (mismatch, base, identity, chromosome, codon) = 'mismatch' | field to color each cell by: mismatch, base, identity, chromosome or codon |
domainstringArray = [] | the values the key lists, in order: under chromosome each rank from 0, the main source chromosome; under codon nonsyn, syn and stop |
rangecolorArray = [] | CSS colors: under chromosome one per rank from the main source chromosome, the last painting every rank past it; under identity the ramp's stops, winning over scheme; the bases and the codons paint the theme's colors |
labelsstringArray = [] | key label for each domain value, one each in order; one past the list keeps its own name |
titlemaybeString | key title; unset is the field's own heading, "" draws none |
schememaybeStringEnum (viridis, magma, inferno, cividis, juicebox, fall, reds, blues, redblue, purpleorange, redgreyblue, blueyellowred) | the named ramp identity runs along; unset is redgreyblue, and range's colors, where it lists any, win over it |
reverseboolean = false | turns the identity ramp round, so its last color paints the low end |
domainMinmaybeNumber | the identity the ramp's low end paints, 0 to 1; unset is 0, and 0.7 spreads the ramp over close relatives |
domainMaxmaybeNumber | the identity the ramp's high end paints; unset is 1 |
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 |
Related links
- User guide: MAF track