# RecordsBand

Auto-generated from the config schema in the source — see the [config guide](https://jbrowse.org/jb2/docs/config_guide) for concepts. Provided by the `variants` plugin. [View source](https://github.com/GMOD/jbrowse-components/blob/main/plugins/variants/src/LinearVariantDisplay/recordsBandConfigSchema.ts).

The variant display's `records` band: the VCF's records, stacked as a
feature track stacks them, so a nested SV sits under the one holding it.

Over genotype rows the band holds every record the filter admits, added
to the track above the rows. A record is colored by its SV type, keyed, or
by `encoding.color` when that is set, and lettered on one line with its ID,
description and the share of the samples shown as rows, no-calls included,
that carry it. The band is `height` tall, which its seam drag writes; unset,
it opens at its stack up to that default and keeps the height it opened
at, so a pan never resizes the track. Records that do not fit thin their
names, then shrink, then hide behind a count beside the band. Past 0.2
records per pixel names go, past 0.1 descriptions, as on a feature track.
Hovering a record reports it and its carriers, and clicking opens its
details. At genomic positions only. On by default: a file with no record
in view when it opens spends 0 px on it.

With no genotype rows by default (a VCF with no samples, or one sample and
`genotypes.show` unset) the band is the whole display whatever `show` says: every record, an SV in its
SV type's color and the rest in the feature track's default, lettered as a
feature track letters it (the description under the name, no carrier
share) and sized by the display's `heightMode`. Past
`maxFeatureScreenDensity` records per pixel it refuses the window with the
region-too-large banner and its Force load, as a feature track does; over
genotype rows, which cannot be refused, the records past it collapse into
one row. Right-clicking a record offers the
feature track's rows on it: zoom to, get sequence, copy.

The record settings are a feature track's, spelt as `LinearBasicDisplay`
spells them: `displayMode` and `mark.height` size each record, `facet`
stacks the records in labelled sections, one per value of a record field,
and `tooltip.field` names the record's line in the hover tooltip.

## Example usage

```js
{ type: 'LinearVariantDisplay', records: { show: false } }
```

```js
{
  type: 'LinearVariantDisplay',
  records: { displayMode: 'collapsed', facet: 'INFO.CLNSIG' },
}
```

## Config slots

A setting written to it names members one by one: a member left out stays as it is, and `null` resets one. 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 |
| --- | --- |
| **show**<br>[`boolean`](https://jbrowse.org/jb2/docs/config_guides/slot_types#boolean) = <code>true</code> | draw the records themselves above the genotype rows, at their genomic positions |
| **height**<br>[`maybeNumber`](https://jbrowse.org/jb2/docs/config_guides/slot_types#the-maybe-types) = <code>undefined</code> | height in pixels of the band over genotype rows, added to the track above them; the band's seam drag writes it. Unset, the band opens at its stack of records, up to 170 px, and keeps that height from then on |
| **displayMode**<br>[`maybeStringEnum`](https://jbrowse.org/jb2/docs/config_guides/slot_types#the-maybe-types) (normal, compact, superCompact, collapsed) | Unset, `compact` over genotype rows, keeping the band over them tight, and `normal` with no rows, as on a feature track. |
| **mark**<br>[FeatureMark](../featuremark) | The box each record draws as, a [FeatureMark](https://jbrowse.org/jb2/docs/config/featuremark) object: `{ height: 6 }`. |
| **facet**<br>[SectionFacet](../sectionfacet) | One labelled section of the band per value of a record field: `"INFO.CLNSIG"`, or `{ field, sort }` with the order its sections stack in. Not the display's own `facet`, which bands the sample rows. |
| **tooltip**<br>[RecordsTooltip sub-schema](#slot-tooltipfield) | The record's line in the hover tooltip, a [FeatureTooltip](https://jbrowse.org/jb2/docs/config/featuretooltip) `field`; whether the tooltip shows is the display's `tooltip.show`. A bare string is the field. |
| **tooltip.field**<br><code>featureTooltipFieldSlot</code> | The record's line in the hover tooltip: a field, or a `jexl:` expression over `feature`. The default reads the record's name. |
| **labels**<br>[RecordsBandLabels sub-schema](#slot-labelsname) | `labels.name`, each record's ID, and `labels.description`, drawn after it on the same line, each a [FeatureNameLabel](https://jbrowse.org/jb2/docs/config/featurenamelabel) and [FeatureDescriptionLabel](https://jbrowse.org/jb2/docs/config/featuredescriptionlabel) object. |
| **labels.name**<br>[FeatureNameLabel](../featurenamelabel) | Each record's ID. |
| **labels.description**<br>[FeatureDescriptionLabel](../featuredescriptionlabel) | The text after each ID. |
| **maxFeatureScreenDensity**<br>[`number`](https://jbrowse.org/jb2/docs/config_guides/slot_types#number) = <code>1</code> | maximum features per pixel before showing a "too many features" message<br>_advanced_ |

