# RowPredicate

Auto-generated from the config schema in the source. See the [config guide](https://jbrowse.org/jb2/docs/config_guide) for concepts. Built into JBrowse core. [View source](https://github.com/GMOD/jbrowse-components/blob/main/packages/display-kit/src/rowPredicateConfigSchema.ts).

One entry of `rows.filter`: a [FieldPredicate](../fieldpredicate) over a
row attribute, a samplesTsv column on the variant display, a subtrack field
on wiggle, `group` on the mark displays. A row's name, its sample, its
source, its haplotype, its label and its colors are refused, since they
name a row rather than describe it: a row's name goes in `rows.kept`. So is
a `jexl:` field, which a row has no record to compute over. A row missing
the attribute (absent or empty) fails every test but `valid: false`, which
selects exactly those rows.

## Example usage

```js
{ type: 'LinearVariantDisplay', rows: { filter: [{ field: 'population', oneOf: ['EUR', 'AFR'] }] } }
```

## Related links

- **Base config:** [FieldPredicate](../fieldpredicate)

## Config slots

Slot types (`fileLocation`, `frozen`, ...) are explained in the [config slot types reference](https://jbrowse.org/jb2/docs/config_guides/slot_types). Slots a base configuration contributes are listed here too, so this table is the whole surface.

| Slot | Description |
| --- | --- |
| <span class="slot-group">Inherited from [FieldPredicate](../fieldpredicate) | <span class="slot-group-count">9 slots |
| **field**<br>[`featureField`](https://jbrowse.org/jb2/docs/config_guides/slot_types#featurefield) = <code>''</code> | the field tested, as the display names its fields, or a jexl: expression computed per feature |
| **equal**<br>[`maybeFrozen`](https://jbrowse.org/jb2/docs/config_guides/slot_types#the-maybe-types) | the value must equal this |
| **lt**<br>[`maybeNumber`](https://jbrowse.org/jb2/docs/config_guides/slot_types#the-maybe-types) | the value must be below this |
| **lte**<br>[`maybeNumber`](https://jbrowse.org/jb2/docs/config_guides/slot_types#the-maybe-types) | the value must be at most this |
| **gt**<br>[`maybeNumber`](https://jbrowse.org/jb2/docs/config_guides/slot_types#the-maybe-types) | the value must be above this |
| **gte**<br>[`maybeNumber`](https://jbrowse.org/jb2/docs/config_guides/slot_types#the-maybe-types) | the value must be at least this |
| **oneOf**<br>[`maybeFrozen`](https://jbrowse.org/jb2/docs/config_guides/slot_types#the-maybe-types) | the value must be one of these |
| **range**<br>[`maybeFrozen`](https://jbrowse.org/jb2/docs/config_guides/slot_types#the-maybe-types) | 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 |
| **valid**<br>[`maybeBoolean`](https://jbrowse.org/jb2/docs/config_guides/slot_types#the-maybe-types) | true admits only records with a value for the field, false only those without |

