# FieldPredicate

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/fieldPredicateConfigSchema.ts).

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 comparison on a missing
value is false, and `valid: false` selects the missing values.

## Example usage

```js
filter: [{ field: 'length', gte: 10000 }, { field: 'identity', gte: 0.9 }]
```

```js
filter: [{ field: 'query', oneOf: ['chr1', 'chr2'] }]
```

```js
filter: [{ field: 'gene_group', valid: true }]
```

## 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 |
| --- | --- |
| **field**<br>[`string`](https://jbrowse.org/jb2/docs/config_guides/slot_types#string) = <code>''</code> | the field tested, as the display names its fields |
| **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 |
| **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 |

