FieldPredicate
Auto-generated from the config schema in the source. See the config guide for concepts. Built into JBrowse core. View source.
One entry of a filter list, Vega-Lite's field predicate: the field of
each record and the tests its value must pass, every one given. A filter
list admits a record that passes every entry. A value is missing when it is
absent, empty, or a VCF's .; valid: false selects exactly those. A
comparison reads the value as a number, so a missing value and text that
is no number both fail it.
An entry whose every written test is null or one this release does not
know loads as no entry at all, with a warning: R's NA and Python's None
write null, and a bare { field } would remove that field's defaults.
A field written jexl: is computed per feature, where the display reads
jexl, and a bare string entry is one that must hold:
"jexl:feature.score > 100" is { field: "jexl:feature.score > 100", equal: true }.
Example usage
filter: [{ field: 'length', gte: 10000 }, { field: 'identity', gte: 0.9 }]filter: [{ field: 'query', oneOf: ['chr1', 'chr2'] }]filter: [{ field: 'score', range: [100, 500] }]filter: [{ field: 'gene_group', valid: true }]filter: ['jexl:feature.end - feature.start > 1000']Related links
- Extended by: RowPredicate
- User guide: Variant sample rows
- Config guide: Variant track
- Docs: URL query parameter API
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 |
|---|---|
fieldfeatureField = '' |
the field tested, as the display names its fields, or a jexl: expression computed per feature |
equalmaybeFrozen |
the value must equal this |
ltmaybeNumber |
the value must be below this |
ltemaybeNumber |
the value must be at most this |
gtmaybeNumber |
the value must be above this |
gtemaybeNumber |
the value must be at least this |
oneOfmaybeFrozen |
the value must be one of these |
rangemaybeFrozen |
Vega-Lite's [min, max], both ends included and a null end open; it loads as gte and lte, the tighter bound winning where either is also written |
validmaybeBoolean |
true admits only records with a value for the field, false only those without |