LinearVariantDisplay
Auto-generated from the config schema in the source. See the config guide for concepts. Provided by the variants plugin. View source.
Draws a VariantTrack: its records, stacked as a feature track stacks
them (records), over one genotype row per sample or per phased haplotype
(genotypes). A VCF with no samples draws its records alone. The
default display of a VariantTrack.
Example usage
Minimal VariantTrack config. See the
variant track guide for all options:
{
type: 'VariantTrack',
trackId: 'cohort',
name: 'Cohort variants',
assemblyNames: ['hg38'],
adapter: {
type: 'VcfTabixAdapter',
uri: 'https://example.com/cohort.vcf.gz',
},
}Preloading sample metadata: point the adapter's samplesTsvLocation at a TSV
whose first column is the sample name and whose other columns are per-sample
attributes (e.g. population), then rows.color one of those attributes to
color the sidebar rows on load. This is the 1000 Genomes "colored by
population" demo config:
{
type: 'VariantTrack',
trackId: 'cohort',
name: 'Cohort variants',
assemblyNames: ['hg38'],
adapter: {
type: 'VcfTabixAdapter',
uri: 'https://example.com/cohort.vcf.gz',
samplesTsvLocation: { uri: 'https://example.com/samples.tsv' },
},
displays: [
{
type: 'LinearVariantDisplay',
height: 800,
rows: { color: 'population' },
},
],
}Phased haplotype rows, one per haplotype of each sample, named
HG002 HP1, HG002 HP2. A sample's name stands for its haplotype rows,
so the order below puts both of HG002's rows first:
{
type: 'VariantTrack',
trackId: 'cohort',
name: 'Cohort variants',
assemblyNames: ['hg38'],
adapter: {
type: 'VcfTabixAdapter',
uri: 'https://example.com/cohort.vcf.gz',
},
displays: [
{
type: 'LinearVariantDisplay',
height: 400,
rows: { field: 'haplotype', sort: ['HG002'] },
},
],
}One equal-width column per variant, tied to the genome by connector lines, for reading a genotype pattern across variants too close together to separate at their positions:
{
type: 'LinearVariantDisplay',
variantLayout: 'columns',
}Related links
- Adapter: BedpeAdapter
- Adapter: SplitVcfTabixAdapter
- Adapter: StarFusionAdapter
- Adapter: VcfAdapter
- Adapter: VcfTabixAdapter
- State model: runtime API
- Base config: BaseLinearDisplay
- Tutorial: LD across an inversion (mosquitoes)
- Tutorial: Mutation cohort (TCGA)
- User guide: Variant sample rows
- Config guide: Grouping and lane order
- Config guide: Tracks
- Config guide: Variant track
- Developer guide: Custom track and display types
Color channels
| Setting | Page | scale.type |
Preset fields |
|---|---|---|---|
encoding.color |
VariantCellColor | ordinal, threshold, linear, log, symlog, identity | strand, svType, impact, score |
Config slots
Display slots go on a display entry: "displays": [{ "type": "LinearVariantDisplay", ... }], or in the track's displayDefaults, which routes each setting to every display of the track whose slot takes it. 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 |
|---|---|
heightmaybeNumber |
Height in pixels of the whole track, drag-resizable. While genotype rows draw, the bands above them come out of it (the records band and its 20 px chip strip, or in columns the connectors) and the rows take the rest, dividing it while row height is on auto-fit. With genotypes.show off the track is the records band and its chip strip, and height waits for the rows' return. With no rows to draw (no samples, or one with genotypes.show unset) it is the height of the records. Unset, a VCF with genotype rows takes 390, and one with none opens once at its records' stack, up to 200. A circular view's ring sets its own height |
variantLayoutstringEnum ('genomic', 'columns') = 'genomic' |
'genomic' draws each variant across the bases it covers; 'columns' draws one equal-width column per variant in view, with a line tying each column to its position. Columns keep variants a few bases apart readable at any zoom, at the cost of their lengths. Columns lay out genotype rows: with none drawing (a VCF with no samples, or genotypes.show off) the records draw at their genomic positions. The LD display takes the same slot for the same choice. |
| connectors VariantConnectors sub-schema |
The band of connector lines tying each column to its genomic position, above the columns: show and height, taken from the genotype rows' height. Drawn in the 'columns' layout only. |
connectors.showboolean = true |
draw the connector lines above the columns |
connectors.heightnumber = 20 |
height of the connector band in pixels, taken from the genotype rows'; its seam drag writes it |
| filter list of FieldPredicate entries |
The variants the display draws, a list of FieldPredicate entries a site must all pass: a field of the record's own, a jexl: expression that must hold, minorAlleleFrequency, the share of its called alleles the second most frequent one makes up, and missingness, the share of its alleles uncalled. [{ field: "minorAlleleFrequency", gte: 0.05 }] drops the rare variants. A site no sample calls draws its record, and a no-call cell where a sample writes ./.; a minorAlleleFrequency or missingness entry drops it from a VCF with samples, and the columns layout always does. |
| rows VariantRows |
What one row is, rows.field: a sample, or with 'haplotype' one phased haplotype of one, named "<sample> HP1", "HP2". The rest of the object is the arrangement a reader gives the rows, each member by row name, where a sample's name stands for its haplotype rows. The samples sort lists come first and the rest keep the file's order; a facet groups within it. rows.step is the row height. |
| tooltip SampleTooltip sub-schema |
The hover tooltip naming the record under the pointer, and over a genotype cell its genotype and sample too. Off, the crosshairs, the highlighted cell or record and the cross-display session.hovered channel stay. The record's line in it is records.tooltip.field. |
tooltip.showboolean = true |
show the hover tooltip over the records and the genotype rows; the crosshairs and the hover highlight stay either way |
| encoding VariantCellEncoding |
The channels the records and the genotype cells share: encoding.color, the hue of every record and of every cell with an alt allele. |
| legend Legend |
The floating key over the display. It is clipped to the display's own bounds, so turn it off to size a short display to its rows rather than to its key. |
| facet Facet |
A sample-metadata attribute (a column in the adapter's samplesTsvLocation, e.g. "population") whose values each take a band of rows; or { field, sort }, the listed values banding first and the rest sorted. Unset, the rows keep their existing order.The band is applied when the rows are read, over whatever order the reader has arranged, so a drag that moves a sample into another band snaps back while this is set. Each band is labelled beside the tree and draws the clade of the cluster tree whose leaves are exactly its rows; a clustering run under bands clusters each band apart. |
| records RecordsBand |
The records, stacked as a feature track stacks them, an SV colored by its type. show (default on), height, the band's height over the rows, labels, and a feature track's record settings: displayMode, mark, facet, maxFeatureScreenDensity and tooltip.field. |
| genotypes Genotypes sub-schema |
The genotype rows: show and reference.show. A cell with an alt allele paints its hue lightened by its dosage, the share of its called alleles that are non-reference, so a homozygote paints the hue itself and a heterozygote a lighter version of it. Unset, a VCF with two or more samples draws its rows, and a one-sample VCF, a call set, draws as one with no samples does: the records alone, every one the filter admits, sized by heightMode. Off, the display reads no genotypes and the track is the records band, every record the filter admits, at the band's records.height, with a chip that brings the rows back. |
genotypes.showmaybeBoolean |
draw a row per sample. Unset, a VCF with two or more samples draws its rows and a one-sample VCF draws its records alone, as one with no samples does; off, the track is the records band alone |
| genotypes.reference GenotypeReference sub-schema |
The cells of reference calls. Off, the default, the rows are filled grey and only alt and no-call cells draw over them, so an alt allele under a long reference call stays visible; on, each reference call draws as a cell of its own. At genomic positions only: columns draw every reference cell. |
genotypes.reference.showboolean = false |
draw each reference call as a cell; off, the rows are filled grey and only alt and no-call cells draw over them |
heightModestringEnum ('fixed', 'grow', 'fit') = 'fit' |
Track-sizing strategy while the records are the display (no samples, or one with genotypes.show unset), as on a feature track: fit keeps the track height and gives up labels, then squeezes the records; fixed keeps the track height at full record size; grow sizes the track to its records up to growMaxHeight. Otherwise it changes nothing: while genotype rows draw the track is height, and with them hidden it is the records band and its chip strip |
growMaxHeightnumber = 800 |
Ceiling in pixels for heightMode: 'grow'advanced |
| Inherited from BaseLinearDisplay | 2 slots |
fetchSizeLimitnumber = 1000000 |
bytes a region may fetch before the display asks first; an adapter that sets its own limit takes precedence over this advanced |
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 with no user interaction, such as an embedded or notebook view or a screenshot, where the region is known and should draw 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 |
|---|---|
maxFeatureScreenDensity |
moved into a current slot |
maxDisplayedBpPerPx |
ignored |
mouseover |
moved into a current slot |
jexlFilters |
moved into a current slot |
renderer |
moved into a current slot |
featureHeight |
moved into a current slot |
showLabels |
moved into a current slot |
showDescriptions |
moved into a current slot |
color1 |
moved into a current slot |
maxHeight |
ignored |
renderingMode |
moved into a current slot |
showSidebarLabels |
moved into a current slot |
showTree |
moved into a current slot |
showReferenceAlleles |
moved into a current slot |
colorBy |
moved into a current slot |
autoscale |
ignored |
minScore |
ignored |
maxScore |
ignored |
scaleType |
ignored |
inverted |
ignored |
numStdDev |
ignored |
minimalTicks |
ignored |
minorAlleleFrequencyFilter |
moved into a current slot |