SyntenyOpacity
Auto-generated from the config schema in the source. See the config guide for concepts. Built into JBrowse core. View source.
The synteny views' encoding.opacity, as encoding.color is their color:
one opacity for every alignment, or a field of each alignment read into
opacities. A number is the constant and is written to value; a string is
the field and is written to field. Under a field, scale.range holds the
opacities themselves, so a field that fades a dense view keeps it dim by
writing a low range.
Example usage
{ type: 'LinearSyntenyView', encoding: { opacity: 0.3 } }{
type: 'LinearSyntenyView',
encoding: { opacity: { field: 'identity', scale: { range: [0.1, 0.6] } } },
}{
type: 'LinearSyntenyView',
encoding: {
opacity: {
field: 'break_FET',
scale: { type: 'threshold', domain: [0.05], range: [0.8, 0.15] },
},
},
}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 |
|---|---|
valuemaybeNumber |
The opacity of every alignment, 0 to 1, while no field fades them. Unset is the view's own default. Writing opacity: 0.3 lands here. |
fieldstring = '' |
The field that fades each alignment: a measurement (identity, mapq, dnds) or a column the tracks declare in attributeColumns. Empty draws every alignment at value. Writing opacity: "identity" sets it. |
| scale SyntenyOpacityScale sub-schema |
How the field's values map to opacities. |
scale.typemaybeStringEnum (threshold) |
threshold reads domain as cut points, a value on a cut taking the interval above it. Unset, a number column fades linearly from domainMin to domainMax and a text column takes one opacity per label. |
scale.domainstringArray = [] |
A text column's labels, which take range in order; under threshold, the cut points. |
scale.rangestringArray = [] |
The opacities, 0 to 1: a number column's at domainMin and domainMax, a text column's per domain label, a threshold's per interval, one more than the cuts. Empty fades a number column from 0.3 to 1; a label or interval past the list draws opaque. |
scale.domainMinmaybeNumber |
The value a number column is faintest at; unset, the measurement's own floor or the least value seen. |
scale.domainMaxmaybeNumber |
The value a number column is most opaque at; unset, the measurement's own ceiling or the greatest value seen. |
Related links
- Docs: URL query parameter API