LinearMultiSampleVariantDisplay
Auto-generated from the config schema in the source — see the config guide for concepts. Provided by the variants plugin. View source.
Draws the genotypes in a multi-sample VariantTrack, one row per sample or
per phased haplotype.
Example usage
Minimal VariantTrack config selecting this display type. The displays
array form is required here (rather than the object shorthand) because
this is a non-default display type — see
configuring displays:
{
type: 'VariantTrack',
trackId: 'cohort',
name: 'Cohort variants',
assemblyNames: ['hg38'],
adapter: {
type: 'VcfTabixAdapter',
uri: 'https://example.com/cohort.vcf.gz',
},
displays: [
{
type: 'LinearMultiSampleVariantDisplay',
},
],
}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 rowColor one of those attributes to
color the sidebar rows on load. referenceDrawingMode: 'skip' (the default)
paints the background solid grey and draws only ALT alleles on top, which
makes overlapping structural variants easier to see; 'draw' paints the
reference alleles too. 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: 'LinearMultiSampleVariantDisplay',
height: 800,
rowColor: 'population',
referenceDrawingMode: 'skip',
},
],
}Phased haplotype rows, one per haplotype of each sample. rows arranges
them by sample name, 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: 'LinearMultiSampleVariantDisplay',
height: 400,
unit: 'haplotype',
rows: { 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: 'LinearMultiSampleVariantDisplay',
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: Multi-sample variant display
- Config guide: Grouping and lane order
- Config guide: Tracks
- Config guide: Variant track
- Developer guide: Custom track and display types
Config slots
Display slots go on a display entry: "displays": [{ "type": "LinearMultiSampleVariantDisplay", ... }], 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 |
|---|---|
heightnumber = 200 | Starting height in pixels for the whole display, including any band above the rows; drag-resizable, and the rows divide what is left while row height is on auto-fit |
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. The LD display takes the same slot for the same choice. |
lineZoneHeightnumber = 20 | Height of the band of connector lines above the columns, spent only in the 'columns' layout.advanced |
| filter FieldPredicate | 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 with no called allele draws nothing whatever the list says. |
| axis RowAxisWithGrid | The guide down the left of the sample rows: the clustering tree, each sample's name and the lines between rows. |
| rows SampleRows | The rows are the file's samples, and the object is the arrangement a reader gives them, each member by row name: a sample in allele-count mode, a haplotype ("<sample> HP<n>") in phased mode, where a sample name stands for all of its haplotypes. The samples sort lists come first and the rest keep the file's order; a facet groups within it. Written whole, as every display's rows is. |
| tooltip SampleTooltip sub-schema | The hover tooltip naming the genotype, the sample and the record under the pointer. Off, the crosshairs, the highlighted cell and the cross-display session.hovered channel stay. |
tooltip.showboolean = true | show the hover tooltip over the genotype rows; the crosshairs and the hover highlight stay either way |
unitstringEnum (sample, haplotype) = 'sample' | The unit one row draws: 'sample' colors each row by allele dosage, 'haplotype' draws one row per phased haplotype |
| encoding VariantCellEncoding | The genotype cells' channels: encoding.color, the hue of every cell with an alt allele. |
shadeByDosageboolean = true | Compose the cell hue with the genotype's alt dosage — the fraction of its called alleles that are non-reference — so a homozygote paints the hue itself and a heterozygote a lighter version of it. Off paints each alt cell its flat hue. |
| 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. |
| rowColor RowColor | The bar beside each row's label: a sample-metadata attribute whose palette colors every row, or under name the colors a reader set row by row. |
| 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. |
referenceDrawingModestringEnum (draw, skip) = 'skip' | Whether to paint reference alleles: 'skip' (the default) fills the row background solid grey and paints only ALT alleles, which makes overlapping variants easier to pick out; 'draw' paints reference alleles like any other genotype. |
| variants VariantsBand | The band of the variants themselves above the genotype rows, at their genomic positions: show (default off), height and showLabels. |
rowHeightnumber = 0 | per-row height in px, scrolling the rows that do not fit; 0 (the default) fits the rows to the display height instead, dividing it between them |
| Inherited from BaseLinearDisplay | 2 slots |
fetchSizeLimitnumber = 1000000 | bytes a region may fetch before the display asks first; an adapter that sets its own limit overrides 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 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 |
|---|---|
maxFeatureScreenDensity | ignored |
maxDisplayedBpPerPx | ignored |
mouseover | ignored |
jexlFilters | moved into a current slot |
showTooltips | moved into a current slot |
showInsertionGlyphs | ignored |
renderingMode | moved into a current slot |
showSidebarLabels | moved into a current slot |
showTree | moved into a current slot |
showBranchLength | moved into a current slot |
showRowLabels | moved into a current slot |
treeAreaWidth | moved into a current slot |
showRowSeparators | moved into a current slot |
showReferenceAlleles | moved into a current slot |
colorBy | ignored |
autoscale | ignored |
minScore | ignored |
maxScore | ignored |
scaleType | ignored |
inverted | ignored |
numStdDev | ignored |
minimalTicks | ignored |
color | moved into a current slot |