LinearBasicDisplay
Auto-generated from the config schema in the source — see the config guide for concepts. Provided by the canvas plugin. View source.
Draws the genes and other features of a FeatureTrack, from a BED, GFF or
similar file. The display adds the gene-glyph slots (isoforms, subparts,
UTRs, chevrons) to the shared canvas base. The color slots color,
connectorColor and utrColor are display-level, set inside a track's
displays array, each a CSS color or a jexl: expression for per-feature
coloring.
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:
{
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',
},
],
}Related links
- Adapter: BedAdapter
- Adapter: BedTabixAdapter
- Adapter: BigBedAdapter
- Adapter: CrisprGuideAdapter
- Adapter: FromConfigAdapter
- Adapter: Gff3Adapter
- Adapter: Gff3TabixAdapter
- Adapter: GtfAdapter
- Adapter: GtfTabixAdapter
- Adapter: NCListAdapter
- Adapter: SequenceSearchAdapter
- Adapter: SPARQLAdapter
- State model: runtime API
- Base config: LinearCanvasBaseDisplay
- Tutorial: Protein domains on gene models
- User guide: Gene track
- Config guide: Tracks
- Developer guide: Custom track and display types
Config slots
Display slots go on a display entry: "displays": [{ "type": "LinearBasicDisplay", ... }], or in the track's displayDefaults when this is its default display. Slot types (fileLocation, frozen, ...) are explained in the config slot types reference. Slots a base configuration contributes are listed here too, so this table is the whole surface.
| Slot | Description |
|---|---|
fetchSizeLimitnumber = 5000000 | 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. advanced |
connectorColormaybeColor | color of the connecting/intron lines between feature segments (defaults to the theme text color) callback args: feature |
utrColormaybeColor | 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 callback args: feature |
geneGlyphModestringEnum (auto, all, longestCoding) = 'auto' | Gene glyph display mode: "auto" collapses each gene to one transcript when zoomed out and trims the rest to what the track height holds, "all" draws every transcript and scrolls the surplus instead of trimming, "longestCoding" shows one transcript per gene — the one canonicalTranscriptTags names, else the longest coding |
subfeatureLabelsstringEnum (auto, none, below, overlay) = 'auto' | subfeature label display mode: auto (the default) names a polyprotein's cleavage products on their rows and nothing else; none, below or overlay apply to every part |
| chevrons FeatureChevrons sub-schema | The arrows on a feature's intron lines. |
chevrons.showboolean = true | draw chevrons on intron lines pointing the way the feature reads |
transcriptTypesstringArray = | feature types the geneLike filter field counts beside every gene, transcript and RNA type, plus the fallback for recognizing a CHILDLESS transcript as one of a gene's isoforms. |
canonicalTranscriptFieldstring = 'tag' | feature attribute holding an isoform's curated "this one represents the gene" tag. |
stringArray = | 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. |
containerTypesstringArray = ['proteoform_orf'] | top-level feature types that always stack their children on separate rows. |
subPartsstring = 'CDS,UTR,five_prime_UTR,three_prime_UTR' | subparts for a glyph |
| proteinFeatures ProteinFeatures sub-schema | The display draws this track's domains over each transcript's CDS, in a color of their own. A bare string names the track. |
proteinFeatures.trackstring = '' | The trackId of a BED with a column naming each domain's transcript (join), as jbrowse make-protein-features writes. |
| proteinFeatures.color FeatureColor | The domains' color, an encoding.color object over the BED rows, by name while it names no field or value. The track's own encoding.color never reaches the domains, nor this one the exons. A dealt family skips the colors that read as the CDS fill, so it can paint differently here than on its own track. |
| proteinFeatures.join ProteinFeaturesJoin sub-schema | Which fields pair a domain with its transcript: the domain row's domain field equals the transcript's gene field. gene: 'name' suits a gene track keyed by transcript name, such as a UCSC bigBed. |
proteinFeatures.join.domainstring = 'transcript' | domain row field naming the domain's transcript |
proteinFeatures.join.genestring = 'id' | transcript field the domain field equals |
| Inherited from LinearCanvasBaseDisplay | 18 slots |
| filter FieldPredicate | The features the display draws, a list of FieldPredicate entries a feature must all pass: a field of the feature's own ({ field: "score", gte: 100 }), a jexl: expression that must hold ("jexl:feature.type == 'gene'"), or geneLike, true for every gene, transcript and RNA type, the transcriptTypes and containerTypes, and a top-level CDS. |
mouseoverstring = | text to display when the cursor hovers over a feature; left at the default, the tooltip adds the description line (labels.description) as a second rowcallback args: feature |
maxFeatureScreenDensitynumber = 1 | maximum features per pixel before showing a "too many features" message advanced |
| legend Legend | The display's color key, when it has one: the key an encoding.color field derives, or a variant track's consequence-impact / SV-type presets. |
showLabelsstringEnum (auto, nameAndDescription, name, description, none) = 'auto' | Label text 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. Defaults to auto. Replaces the former showLabels on/off enum + showDescriptions boolean pair |
maxLabelFeatureDensitynumber = 0.2 | In "auto" showLabels mode, hide labels when visible feature density (features/pixel) exceeds this value advanced |
maxDescriptionFeatureDensitynumber = 0.1 | In "auto" showLabels mode, hide descriptions when visible feature density (features/pixel) exceeds this value. Lower than maxLabelFeatureDensity so descriptions drop before names advanced |
| encoding FeatureEncoding | The channels the features paint through: encoding.color, each feature's main fill. |
showOutlineboolean = false | draw an outline around each feature |
outlineColormaybeColor | the outline's color while showOutline draws one; unset takes the theme's |
featureHeightnumber = 10 | height in pixels of the main body of each feature in the normal display mode; compact draws it at 0.6 of this and superCompact at 0.3 callback args: feature |
displayModestringEnum (normal, compact, superCompact, collapsed) = 'normal' | Feature height preset, normal by default; compact and superCompact shrink the rows, and collapsed packs every feature onto a single row with all labels hidden |
| facet SectionFacet | One labelled section of the track per value of a field: "strand", or { field, sort } with the order its sections stack in. |
| labels CanvasFeatureLabels sub-schema | The fields a feature's name label and description line read. |
labels.namefeatureField = 'jexl:get(feature,'name') || get(feature,'id')' | the field each feature's name label reads, such as gene_name, or a jexl: expression over feature; the default reads the name, else the ID, and an empty value draws no name |
labels.descriptionfeatureField = | the field each feature's description line reads, such as note, or a jexl: expression over feature; the default reads note, else description, else function, and an empty value draws no description |
heightModestringEnum (fixed, grow, fit) = 'fit' | 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). fit (the default) keeps the track height and gives up descriptions, then isoforms, then names, then squeezes boxes down to 2px, and scrolls only what still overflows; fixed keeps a scrollable fixed height; grow expands the track to show all features. Orthogonal to the per-feature size set by displayMode, which fit never enlarges. |
growMaxHeightnumber = 800 | 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 advanced |
| Inherited from BaseLinearDisplay | 2 slots |
heightnumber = 100 | default height for the track |
forceLoadboolean = false | 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. advanced |
Retired keys
An older config may still write these. Each loads without an error, and jbrowse validate reports it as stale.
| Key | On load |
|---|---|
maxDisplayedBpPerPx | ignored |
jexlFilters | moved into a current slot |
color1 | moved into a current slot |
color2 | moved into a current slot |
color3 | moved into a current slot |
outline | moved into a current slot |
maxHeight | ignored |
hideSourceFeatures | ignored |
impliedUTRs | ignored |
renderer | moved into a current slot |
color | moved into a current slot |
showChevrons | moved into a current slot |
showDescriptions | moved into a current slot |