# LinearBasicDisplay

Auto-generated config schema for the current JBrowse release — see the
[config guide](https://jbrowse.org/jb2-staging/docs/config_guide) for concepts. Provided by the `canvas`
plugin.
[View source](https://github.com/GMOD/jbrowse-components/blob/main/plugins/canvas/src/LinearBasicDisplay/configSchema.ts).

## Example usage

A complete `FeatureTrack` config (e.g. genes from a GFF3) to paste into
`tracks`. `displayMode` sets the feature height preset (`normal`, `compact`, or
`superCompact`), or `collapsed` for a single-row overview:

```js
{
  type: 'FeatureTrack',
  trackId: 'genes',
  name: 'Genes',
  assemblyNames: ['hg38'],
  adapter: {
    type: 'Gff3TabixAdapter',
    uri: 'https://example.com/genes.gff3.gz',
  },
  displays: [
    {
      type: 'LinearBasicDisplay',
      displayId: 'genes-LinearBasicDisplay',
      height: 200,
      displayMode: 'compact',
    },
  ],
}
```

_See the **Config slots** section below for all available configuration fields._

configuration for the basic linear feature display (genes, BED, GFF, etc.)

Color slots are display-level: set them inside a track's `displays` array.
`color` is the main feature fill; use a plain CSS color, or a `jexl:` expression
to color per-feature. (`connectorColor` and `utrColor` set the intron lines and
UTR fill. The legacy `color1`/`color2`/`color3` names still work and map onto
these.)

```json
{
  "type": "FeatureTrack",
  "trackId": "my_genes",
  "name": "Genes",
  "assemblyNames": ["hg19"],
  "adapter": { "type": "Gff3TabixAdapter", "uri": "genes.gff.gz" },
  "displays": [
    {
      "type": "LinearBasicDisplay",
      "color": "blue",
      "utrColor": "lightblue"
    }
  ]
}
```

Color by an attribute with a jexl expression:

```json
{
  "type": "LinearBasicDisplay",
  "color": "jexl:feature.type=='gene'?'blue':'gray'"
}
```

## Related links

- **Adapter:** [BedAdapter](../bedadapter)
- **Adapter:** [BedTabixAdapter](../bedtabixadapter)
- **Adapter:** [BigBedAdapter](../bigbedadapter)
- **Adapter:** [CrisprGuideAdapter](../crisprguideadapter)
- **Adapter:** [FromConfigAdapter](../fromconfigadapter)
- **Adapter:** [Gff3Adapter](../gff3adapter)
- **Adapter:** [Gff3TabixAdapter](../gff3tabixadapter)
- **Adapter:** [GtfAdapter](../gtfadapter)
- **Adapter:** [GtfTabixAdapter](../gtftabixadapter)
- **Adapter:** [NCListAdapter](../nclistadapter)
- **Adapter:** [SequenceSearchAdapter](../sequencesearchadapter)
- **Adapter:** [SPARQLAdapter](../sparqladapter)
- **State model:** [runtime API](../../models/linearbasicdisplay)
- **Base config:** [LinearCanvasBaseDisplay](../linearcanvasbasedisplay)

## Config slots

These slots go on a display entry:
`"displays": [{ "type": "LinearBasicDisplay", ... }]`, or in the track's
[`displayDefaults`](https://jbrowse.org/jb2-staging/docs/config_guides/tracks#configuring-displays) when this
is its default display. Slot types (`fileLocation`, `frozen`, ...) are explained
in the [config slot types reference](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types). Slots a
base configuration contributes are listed here too, so this table is the whole
surface.

<!-- prettier-ignore -->
| Slot | Description |
| --- | --- |
| <span id="slot-fetchsizelimit">**fetchSizeLimit**</span><br>[`number`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#number) = <code>5_000_000</code> | Feature (GFF/BED) tracks are light text, and the tabix byte estimate is block-granular (a small region still pulls whole BGZF blocks), so a single gene can trip a tighter gate. A few Mb of feature text downloads fast; the feature-density gate remains the backstop for genuinely over-dense views. An adapter declaring its own `fetchSizeLimit` outranks this — the generated table in agent-docs/reference/REGION_TOO_LARGE.md § Shared primitives is which ones do, rather than a number restated here that goes stale when theirs moves (CRAM's did).<br>_advanced_ |
| <span id="slot-showonlygenes">**showOnlyGenes**</span><br>[`boolean`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#boolean) = <code>false</code> | Draw only gene-like top-level features, dropping everything else the file carries — the config form of the track menu's "Show only genes". Useful on an NCBI/Ensembl annotation whose non-gene records (regions, match features, biological regions) would otherwise crowd the genes out. ANDed with `jexlFilters` when both are set. |
| <span id="slot-legend">**legend**</span><br>[`frozen`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#frozen) = <code>[]</code> | Explicit color key drawn over the track: an array of `{ label, color }`. A `jexl:` `color` expression is a lookup table only its author can read — the drawn feature carries the color but nothing carries what the color MEANS — so the config declares the vocabulary beside the expression that paints it. `color` is any CSS color and should be the same string the expression returns.<br><br>Empty (the default) draws nothing. Dismissable on screen, like every other floating key.<br><span class="cell-more"><button type="button" class="cell-more-trigger">example</button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>{&#10;&#160;&#160;type: 'LinearBasicDisplay',&#10;&#160;&#160;color:&#10;&#160;&#160;&#160;&#160;"jexl:{SINE:'#e41a1c',LINE:'#377eb8'}[feature.repClass] &#124;&#124; 'gray'",&#10;&#160;&#160;legend: [&#10;&#160;&#160;&#160;&#160;{ label: 'SINE', color: '#e41a1c' },&#10;&#160;&#160;&#160;&#160;{ label: 'LINE', color: '#377eb8' },&#10;&#160;&#160;],&#10;}</code></pre></dialog></span> |
| <span class="slot-group">Inherited from [LinearCanvasBaseDisplay](../linearcanvasbasedisplay)</span> | <span class="slot-group-count">25 slots</span> |
| <span id="slot-maxheight">**maxHeight**</span><br>[`number`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#number) = <code>1200</code> | Outer clamp in pixels on the content height the "autogrow track height" mode sizes to. Applies to no other mode — fixed and fit keep their configured height and scroll taller content. The autogrow ceiling proper is growMaxHeight, which is lower by default, so this only binds when set below it<br>_advanced_ |
| <span id="slot-showlegend">**showLegend**</span><br>[`maybeBoolean`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#the-maybe-types) = <code>true</code> _promotable_ | show the display's color key when it has one (the `legend` slot, or a variant track's consequence-impact / SV-type presets). Unset (the default) follows the session-wide default for this display type, falling back to on; an explicit true/false customizes the track |
| <span id="slot-showlabels">**showLabels**</span><br>[`maybeStringEnum`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#the-maybe-types) (auto, nameAndDescription, name, description, none) = <code>'auto'</code> _promotable_ | Which label text is drawn beside each feature: "auto" adapts to zoom, dropping descriptions at maxDescriptionFeatureDensity and names at maxLabelFeatureDensity; "nameAndDescription", "name", "description", and "none" pin a choice at every zoom. Unset (the default) follows the session-wide default for this display type, falling back to `auto`. Replaces the former showLabels on/off enum + showDescriptions boolean pair |
| <span id="slot-maxlabelfeaturedensity">**maxLabelFeatureDensity**</span><br>[`number`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#number) = <code>0.2</code> | In "auto" showLabels mode, hide labels when visible feature density (features/pixel) exceeds this value<br>_advanced_ |
| <span id="slot-maxdescriptionfeaturedensity">**maxDescriptionFeatureDensity**</span><br>[`number`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#number) = <code>0.1</code> | In "auto" showLabels mode, hide descriptions when visible feature density (features/pixel) exceeds this value. Lower than maxLabelFeatureDensity so descriptions drop before names<br>_advanced_ |
| <span id="slot-color">**color**</span><br>`maybeColor` | the main fill color of each feature (a CSS color, or a jexl expression for per-feature coloring). Unset, a feature's own BED itemRgb paints it if it has one, else goldenrod<br>_callback args:_ `feature` |
| <span id="slot-connectorcolor">**connectorColor**</span><br>`maybeColor` | color of the connecting/intron lines between feature segments (defaults to the theme text color)<br>_callback args:_ `feature` |
| <span id="slot-utrcolor">**utrColor**</span><br>`maybeColor` | fill color for UTRs on gene/transcript glyphs. Unset, a feature's own BED itemRgb paints them too (matching UCSC's whole-item coloring), else a contrasting blue<br>_callback args:_ `feature` |
| <span id="slot-outlinecolor">**outlineColor**</span><br>[`color`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#color) = <code>''</code> | outline color for features (empty string = no outline) |
| <span id="slot-featureheight">**featureHeight**</span><br>[`number`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#number) = <code>10</code> | height in pixels of the main body of each feature<br>_callback args:_ `feature` |
| <span id="slot-displaymode">**displayMode**</span><br>[`maybeStringEnum`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#the-maybe-types) (normal, compact, superCompact, collapsed) = <code>'normal'</code> _promotable_ | Feature height preset. Unset (the default) follows the session-wide default for this display type, falling back to `normal`; `normal`/`compact`/`superCompact` customize the track explicitly (including customizing `normal` back over a `compact` session default); `collapsed` packs every feature onto a single row with all labels hidden |
| <span id="slot-geneglyphmode">**geneGlyphMode**</span><br>[`stringEnum`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#stringenum) (auto, all, longestCoding) = <code>'auto'</code> | Gene glyph display mode: "auto" switches based on zoom level, "all" shows all transcripts, "longestCoding" shows one transcript per gene — the one canonicalTranscriptTags names, else the longest coding |
| <span id="slot-subfeaturelabels">**subfeatureLabels**</span><br>[`maybeStringEnum`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#the-maybe-types) (none, below, overlay) = <code>'none'</code> _promotable_ | subfeature label display mode. Unset (the default) follows the session-wide default for this display type, falling back to `none`; `none`/`below`/`overlay` customize the track explicitly |
| <span id="slot-displaydirectionalchevrons">**displayDirectionalChevrons**</span><br>[`maybeBoolean`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#the-maybe-types) = <code>true</code> _promotable_ | Display directional chevrons on intron lines to indicate strand direction. Unset (the default) follows the session-wide default for this display type, falling back to on; an explicit true/false customizes the track (including customizing on over an off session default) |
| <span id="slot-transcripttypes">**transcriptTypes**</span><br>`stringArray` = <span class="cell-more"><button type="button" class="cell-more-trigger"><code>[ 'mRNA', 'transcript', 'primary_transcript', 'V_gene_segment',…</code></button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>[&#10;&#160;&#160;&#160;&#160;'mRNA',&#10;&#160;&#160;&#160;&#160;'transcript',&#10;&#160;&#160;&#160;&#160;'primary_transcript',&#10;&#160;&#160;&#160;&#160;'V_gene_segment',&#10;&#160;&#160;&#160;&#160;'C_gene_segment',&#10;&#160;&#160;&#160;&#160;'D_gene_segment',&#10;&#160;&#160;&#160;&#160;'J_gene_segment',&#10;&#160;&#160;]</code></pre></dialog></span> | feature types admitted by the gene-only view (`showOnlyGenes`), plus the fallback for recognizing a CHILDLESS transcript as one of a gene's isoforms. It does not decide which glyph is drawn, whether UTRs are implied, whether a feature can be translated, or — for a transcript with subfeatures, which is nearly all of them — whether it is an isoform or gets a label row. Those are all structural (anything with a direct CDS child is a coding transcript; anything with children of its own takes a row), so org-specific and prokaryotic types render correctly without being listed here. |
| <span id="slot-canonicaltranscriptfield">**canonicalTranscriptField**</span><br>[`string`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#string) = <code>'tag'</code> | feature attribute carrying an isoform's curated "this one represents the gene" tag. NCBI's GFF3 puts `RefSeq Select` / `MANE Select` in `tag`, and so do Ensembl and GENCODE (`Ensembl_canonical`, `MANE_Select`) — an annotation that names it somewhere else says so here. GFF3 attribute names reach a feature lowercased. |
| <span id="slot-canonicaltranscripttags">**canonicalTranscriptTags**</span><br>`stringArray` = <span class="cell-more"><button type="button" class="cell-more-trigger"><code>[ 'MANE Select', 'MANE_Select', 'RefSeq Select', 'Ensembl_canon…</code></button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>[&#10;&#160;&#160;&#160;&#160;'MANE Select',&#10;&#160;&#160;&#160;&#160;'MANE_Select',&#10;&#160;&#160;&#160;&#160;'RefSeq Select',&#10;&#160;&#160;&#160;&#160;'Ensembl_canonical',&#10;&#160;&#160;&#160;&#160;'MANE Plus Clinical',&#10;&#160;&#160;&#160;&#160;'MANE_Plus_Clinical',&#10;&#160;&#160;]</code></pre></dialog></span> | values of that attribute that mark an isoform as the gene's representative one, which is then ranked ahead of every other isoform: it is the transcript shown by `longestCoding`, and the first kept when `auto` caps a gene at the rows the track has. Matched case-insensitively, against a multi-valued attribute member-wise (`tag=MANE Select,RefSeq Select`). Ordered best-first, because a gene can carry two of these at once: `MANE Plus Clinical` marks an ADDITIONAL transcript beside the `MANE Select` one and is often the longer, so it sorts last and the coding-length ranking below never gets to break that tie the wrong way. NCBI and Ensembl/GENCODE both emit the MANE tags and spell them differently — spaces in NCBI's GFF3, underscores in GENCODE's — so `MANE Select` and `MANE Plus Clinical` are each listed twice. `RefSeq Select` comes from NCBI alone and `Ensembl_canonical` from Ensembl/GENCODE alone, so one spelling serves each. Empty turns the whole rule off. |
| <span id="slot-containertypes">**containerTypes**</span><br>`stringArray` = <code>['proteoform_orf']</code> | top-level feature types that always stack their children on separate rows. Container detection is otherwise structural — a feature whose children have children of their own stacks anyway — so this is only needed for a type whose children look like leaves but should still each get a row. |
| <span id="slot-subparts">**subParts**</span><br>[`string`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#string) = <code>'CDS,UTR,five_prime_UTR,three_prime_UTR'</code> | subparts for a glyph |
| <span id="slot-impliedutrs">**impliedUTRs**</span><br>[`boolean`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#boolean) = <code>true</code> | imply UTRs from exon/CDS differences on transcript glyphs that carry no explicit UTR subfeatures |
| <span id="slot-hidesourcefeatures">**hideSourceFeatures**</span><br>[`boolean`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#boolean) = <code>true</code> | hide the GFF3 source record, the whole-molecule type=region feature NCBI RefSeq emits per sequence (gbkey=Src). It spans the entire chromosome and carries only taxon/strain metadata, so it draws as a bar across every window. Set false to draw it. No effect on files that carry no gbkey attribute |
| <span id="slot-labelsname">**labels.name**</span><br>[`string`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#string) = <code>'jexl:get(feature,'name') &#124;&#124; get(feature,'id')'</code> | the primary name of the feature to show<br>_callback args:_ `feature` |
| <span id="slot-labelsdescription">**labels.description**</span><br>[`string`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#string) = <span class="cell-more"><button type="button" class="cell-more-trigger"><code>'jexl:get(feature,'note') &#124;&#124; get(feature,'description') &#124;&#124; get(…</code></button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>'jexl:get(feature,'note') &#124;&#124; get(feature,'description') &#124;&#124; get(feature,'function')'</code></pre></dialog></span> | the text description to show<br>_callback args:_ `feature` |
| <span id="slot-heightmode">**heightMode**</span><br>[`maybeStringEnum`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#the-maybe-types) (fixed, grow, fit) = <code>'fixed'</code> _promotable_ | Track-sizing strategy — how the track responds when there are more features than fit (shared vocabulary with the alignments display, exposed in the "Track sizing" menu). Unset (the default) follows the session-wide default for this display type, falling back to `fixed`; `fixed` keeps a scrollable fixed height, `grow` expands the track to show all features, `fit` squeezes features to fill the current height. Orthogonal to the per-feature size set by `displayMode`. Unifies the former `autoHeight` (grow) + `squeezeToDisplayHeight` (fit) settings. |
| <span id="slot-growmaxheight">**growMaxHeight**</span><br>[`number`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#number) = <code>800</code> | Ceiling in pixels for the "autogrow track height" sizing mode; a track with more content than this grows to the ceiling and scrolls the rest. Does not apply to the fixed or fit modes. Raising it past maxHeight has no effect, since that clamps the content height first<br>_advanced_ |
| <span class="slot-group">Inherited from [BaseLinearDisplay](../baselineardisplay)</span> | <span class="slot-group-count">5 slots</span> |
| <span id="slot-maxfeaturescreendensity">**maxFeatureScreenDensity**</span><br>[`number`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#number) = <code>1</code> | maximum features per pixel before showing a "too many features" message<br>_advanced_ |
| <span id="slot-height">**height**</span><br>[`number`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#number) = <code>100</code> | default height for the track |
| <span id="slot-mouseover">**mouseover**</span><br>[`string`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#string) = <span class="cell-more"><button type="button" class="cell-more-trigger"><code>'jexl:get(feature,'_mouseOver')&#124;&#124;get(feature,'name')&#124;&#124;get(featu…</code></button><dialog class="cell-dialog"><form method="dialog"><button class="cell-dialog-close" aria-label="Close">✕</button></form><pre><code>'jexl:get(feature,'_mouseOver')&#124;&#124;get(feature,'name')&#124;&#124;get(feature,'function')&#124;&#124;get(feature,'id')'</code></pre></dialog></span> | text to display when the cursor hovers over a feature<br>_callback args:_ `feature` |
| <span id="slot-jexlfilters">**jexlFilters**</span><br>`stringArray` = <code>[]</code> | config jexlFilters are deferred evaluated so they are prepended with jexl at runtime rather than being stored with jexl in the config |
| <span id="slot-forceload">**forceLoad**</span><br>[`boolean`](https://jbrowse.org/jb2-staging/docs/config_guides/slot_types#boolean) = <code>false</code> | Declarative equivalent of the "Force load" button on the "too much data" banner: when true the display always renders, however large the region or dense the features. Off by default (the gate guards against huge downloads). Set it on a view no one can interact with — an embedded / notebook view, or a screenshot — where the region is known and you want it drawn without a click.<br>_advanced_ |

