Variant sample rows
A VCF can hold genotypes for many samples. The variant display draws one row per sample under its records, and Layout → Genotype matrix in the track menu chooses how the variants run across it:
- At genomic positions, the default: each variant drawn across the bases it covers
- Equal-width columns with it checked, one column per variant in view, like a heatmap
A VCF with one sample, such as a call set, opens as its records alone; Show → Show genotype rows in the track menu draws its row. With genotype rows off, the display reads no genotypes.
At genomic positions, Show → Show records draws the records above the genotype rows, stacked as on a variant track, colored by SV type and labelled with the share of samples that have each one.
- Height: the band opens as tall as its records need, up to a share of the track, and keeps that height as you pan. Drag its lower edge to trade height with the rows.
- Hidden records: records that do not fit are hidden and counted beside the band. Clicking the count grows the band and the track to show them.
At genomic positions: structural variants at their real span
Each variant is drawn at its real position and scale, and overlapping calls are slightly transparent so they stay apart. Where overlaps crowd the view, Filter by → Edit filters... in the track menu hides variants by size, name or any jexl expression. The 1000 Genomes SV tutorial sorts this layout by genotype at a deletion.
Equal-width columns: SNP and indel patterns
Each visible variant gets one column and each sample one row, however far apart the variants are, and a thin black line ties each column to its genomic position. Small variants that would be 1–2px wide at their true positions get a full column, so shared haplotypes, runs of homozygosity and population structure become visible. The phased trio tutorial works this layout with per-haplotype rows.
Filtering by allele frequency and missingness
Two sliders under Filter by in the track menu thin a dense callset. MAF hides variants whose minor allele frequency is below it, and Max missingness hides variants whose fraction of uncalled alleles is above it, which matters most in equal-width columns.
To load the track already filtered, add
{ "field": "minorAlleleFrequency", "gte": … } and
{ "field": "missingness", "lte": … } entries to the display's
filter list, each a
field predicate. See
configuring default display settings.
Rows: per sample or per haplotype
The track menu's Rows item sets the display's
rows.field: what one row stands for
and how each genotype cell is colored.
- Rows → Per sample (
rows.field: 'sample'): one cell per sample, shaded by allele dosage. Homozygous reference (0/0) is light grey, heterozygous (0/1) a medium shade and homozygous alternate (1/1) the darkest. Every non-reference allele counts, so1/2draws as dark as1/1, and an uncalled genotype (./.) takes the no-call color. - Rows → Per haplotype (
rows.field: 'haplotype'): one row per haplotype, each cell colored reference or alt with no dosage shading, so inherited haplotype blocks line up as the vertical bands in the trio matrix above. The site's most frequent alt takes the blue of a homozygous-alt cell in per-sample rows, and any other alt draws red.
Per-haplotype rows draw what the VCF phases:
- Phased and haploid calls:
|-separated genotypes and haploid calls draw per haplotype. The menu item stays disabled until the view holds one. - Unphased calls: a genotype written with
/fills every haplotype row of its sample black, homozygous ones included. Read-backed phasers such as WhatsHap leave homozygous calls unphased, so on their output black marks those too. - Row names:
<sample> HP1,<sample> HP2, and so on number the sample's alleles from 1; they are not the VCF'sHPtag. - Sample settings: an order, label, color, tree or kept row written against
a sample applies to its haplotype rows (
Mother HP1,Mother HP2), and a tree clustered per sample forks over each sample's haplotype rows. - Haplotype settings: settings written against a haplotype row are kept but hidden in per-sample rows. Each sample sits where its first haplotype was, and a tree clustered per haplotype is hidden, with the sidebar saying why, until you switch back to Per haplotype.
Coloring by consequence impact (SnpEff/VEP annotations)
When the VCF's INFO field has SnpEff ANN or VEP CSQ annotations, Color
by → Consequence impact (under Cells) colors each variant's alt-allele
cells by its most severe predicted consequence. Where no variant in view is
annotated, the entry is greyed out with the reason beside it.
Each annotation falls in one of four impact tiers with a fixed color, so the legend is the same across tracks:
- HIGH (red): e.g.
stop_gained,frameshift_variant,exon_loss_variant - MODERATE (orange): e.g.
missense_variant,inframe_deletion - LOW (yellow): e.g.
synonymous_variant,splice_region_variant - MODIFIER (grey): e.g.
intron_variant,intergenic_region
SnpEff's SV consequence terms (exon_loss_variant, transcript_ablation,
gene_fusion, ...) map onto the same tiers, so a deletion that removes an exon
reads as HIGH, as a stop-gained SNV does.
To have the track load already colored this way, set the display's
encoding.color to "impact": see
coloring cells by the variant.
Coloring by SV type
Color by → SV type (under Cells) colors each alt-allele cell by its variant's structural class, and is greyed out where the view holds no structural variants. Each class has one color on every display that paints SV type, including the single-variant display, a mark display and the SV inspector's chords: deletion (red), duplication (blue), insertion (purple), inversion (orange), copy-number variable (dark brown), tandem repeat (pink), breakend (cyan), complex (green), and other / mixed (black) for a type token outside these classes or a record whose alleles disagree.
- Het cells draw the class color paler, as in the default coloring, and the legend shows both shades.
- The legend lists only the classes present in the loaded region.
- No class: a record with no structural class keeps the default alt color.
- Where the class comes from: the ALT allele first (
<DEL>,<DUP:TANDEM>, breakend notation, and 1000 Genomes'<CN0>as a deletion,<CN1>as copy-number variable and<CN2>and up as a duplication), thenINFO/EVENTTYPEorINFO/SVTYPE, then a sequence allele 50 bp or more longer or shorter than REF. JBrowse stores the result as each VCF record'ssvTypefield.
A track loads already colored by SV type with encoding.color set to
"svType": see
coloring cells by the variant.
Coloring by any field
Color by → Field... colors each alt-allele cell by a field of its record.
The dialog lists the file's columns (QUAL, FILTER, ID, ALT), every INFO field
its header declares, with the header's description, and the computed values such
as maf and missingness; any other field name or a jexl: expression can be
typed in.
- Left as it is, each value of the field takes a separate color, as
INFO.CLNSIGgives Pathogenic, Benign and Uncertain_significance one each. - Cut points turn a number into ranges:
0.001, 0.01overINFO.AFmakes ultra-rare, rare and common bands.
The legend names the field and lists each value or range, and a variant with no value for the field keeps the default alt color. A het cell draws paler than a hom, as in every other coloring.
Coloring and grouping by sample metadata
Samples can be grouped and colored by metadata: population, phenotype, sex, or any attribute you supply. These slots configure it:
samplesTsvLocationon the adapter takes a samples TSV whose first column is the sample name (matching the VCF header) and whose other columns are metadata attributes.rows.coloron the display takes one of those column names and tints the per-sample rows by that attribute, over any color the TSV gives a row. A sample's swatch in the arrangement editor pins that row's color (rows.colors) over both. Color rows by → None clears the attribute and restores the TSV's colors, keeping pinned colors; Reset row order clears the pins.facetbands the rows so each value of a column is contiguous: the column's name, or{ "field": …, "sort": [...] }with the band order. Each band's name runs up a strip beside the dendrogram. The bands override your arranged order, so a sample dragged into another band snaps back, and clustering clusters each band separately, with a dendrogram per band.rows.sortnames the samples that lead the rows; the rest keep the file's order, and a grouping attribute bands within that order.
The JBrowse demo configures the 1000 Genomes phase 3 chr1 callset (2,504 samples across 26 population codes) this way. For the TSV layout and the adapter and display slots, see auto-coloring samples by metadata. The TCGA mutation cohort tutorial facets a cohort's rows by clinical annotation.
Group by and the Samples entries under Color by in the track menu change the grouping and colors after the track is open.
Clustering samples by genotype
Clustering → Cluster rows by genotype... in the track menu reorders samples by genotype similarity. See Clustering rows for the modes, the dendrogram, and how to share a result in a session URL.
With per-haplotype rows, clustering treats each haplotype as a separate row, so the dendrogram shows haplotype-level relationships. The LD tutorial clusters haplotypes across the LCT block.
See also
- Tutorial: Phased trio analysis (1000 Genomes)
- Tutorial: Multi-sample SVs (1000 Genomes)
- Tutorial: Selection scans (Drosophila DGRP)
- Tutorial: LD at a selective sweep (human)
- User guide: Variant track
- Config guide: Variant track configuration
- Config guide: Customizing feature colors