# 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 have 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 shows it and the samples that have it, 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 shows the region-too-large
banner and its Force load in place of the window, 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) | height in pixels of the band beside genotype rows; the band's seam drag writes it, and `+N hidden` writes it to the whole stack and raises the track `height` by as much. Over drawn rows it comes out of the track `height`: a drag stops at 8 px, and the band takes at most what leaves the rows 20 px. With the rows hidden it is the track above the chip strip. Unset, the band opens at its stack of records, up to 170 px, and holds that; over drawn rows it also takes at most 170 of every 370 px the track has under the chip strip, so a short track shortens it. Not read while the records are the display |
| **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>[`featureField`](https://jbrowse.org/jb2/docs/config_guides/slot_types#featurefield) = <code>"jexl:get(feature,'_mouseOver')&#124;&#124;get(feature,'name')&#124;&#124;get(feature,'function')&#124;&#124;get(feature,'id')"</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_ |

