Alignments track
An alignments track shows BAM/CRAM reads as a coverage histogram on top (read depth at each position) and a pileup below (one box per read). The track menu's options change how reads are sorted, colored, grouped, sized, or filtered.
A coverage bar that is part red means that fraction of reads have a mismatch there. The track menu's Show → Show coverage and Show → Show pileup toggles turn either panel off independently:
- Pileup only gives the reads the vertical space.
- Coverage only fills the track's height with the coverage band, split evenly between the sections when the reads are grouped, so it never scrolls.
- Height: a track configured with its pileup hidden opens at 100 px rather than 250; the toggles keep whatever height the track has. Drag the track's bottom edge to resize it.
- Strips: a read-connections or junctions strip drawn above or below the coverage keeps a fixed height, and the coverage takes the rest; drag the edge the strip shares with the coverage to resize it.
Sorting reads
Right-click a base in the pileup and choose Sort by base at position. Reads group by the nucleotide they have there, so haplotype-correlated SNPs line up.
The track menu's Sort by groups reads the same way against the center line (a 1bp indicator at the middle of the view), and also sorts by strand, mapping quality, or any BAM tag. These order the whole layout instead:
- Sort by → Longest reads first puts the widest reads at the top.
- Sort by → Spliced reads first puts the reads with a reference skip (
N) in the CIGAR there. - Sort by → Split reads first puts the reads aligned in pieces there, the
ones with an
SAtag. - Sort by → SV evidence first puts the split reads on top, then the reads with an insertion or deletion of 50 bp or more, then the pairs the aligner did not call concordant: at a breakpoint those are the reads crossing it.1
Color by
The track menu's Color by offers several schemes.
Strand
| Color | Name | Value | Description |
|---|---|---|---|
| Forward strand | #EC8B8B |
Read maps to the forward strand | |
| Reverse strand | #8F8FD8 |
Read maps to the reverse strand |
Read quality and bases
- Mapping quality colors each read by its MAPQ bin, the same four bins
Group by → Mapping quality stacks: dark blue at 0, through 1-9 and 10-29,
to yellow at 30 and above, so reads in repeats come out dark. A MAPQ of 255,
which means the aligner reported none, is grey and passes the Mapping
quality filter. A MAPQ 0 read is one the aligner could not place uniquely,
as when its best score ties across positions. A secondary alignment (FLAG
0x100) is a competing placement recorded as a separate record; the defaultfilterdrops duplicate, QC-failed and unmapped reads, and keeps those. The mappability QC tutorial works a locus where MAPQ 0 covers a whole gene. - Base quality colors every base by Phred score on the same cividis ramp, dark blue at 0 to yellow at 40 and above, the quickest way to tell a variant from a run of low-confidence calls. A CRAM read stored without quality scores draws its bases in the plain read color.
- Base letters draws every aligned base in its nucleotide color, matching bases included.
A read tag
Color by → Tag... asks for a tag name and how to color it: A color per
value for a tag like HP (haplotype) or RG (read group), or A gradient
over numbers for a numeric tag like NM (edit distance). A tag also sorts,
filters and groups reads; for the HP haplotype tag of
phased reads, grouping usually reads more clearly than coloring alone. See the
phased trio tutorial.
Modifications and methylation
For a BAM/CRAM with MM/ML modification calls (nanopore, PacBio), Color by → Modifications paints them in two modes:
- Modifications marks only where the MM tag reports a modified base, so an unmethylated region looks empty. In Filter by → More filters..., the Modifications section raises the probability cutoff and restricts to one type such as 5mC
- Color by → Show unmethylated in blue (IGV's "2-color") paints unmethylated cytosines blue: every CpG in context, including ones the basecaller left implicit. Other modification types, such as 6mA, draw as they do by type. Color by → Cytosine context picks CpG, CHG or CHH
See the methylation tutorial for an end-to-end modified-base workflow.
JBrowse paints any modification type in the MM tag, so fiber-seq's
N6-methyladenine (A+a) draws like any other modification. The assay adds 6mA
to accessible DNA, so the call density is a chromatin-accessibility readout.
Bisulfite and EM-seq
Bisulfite (WGBS) and EM-seq reads have no MM/ML tags; methylation is in the C→T conversion itself. Color by → Bisulfite / EM-seq reads it off the aligned bases against the reference, so a plain BAM from a bisulfite-aware aligner colors without a methylation caller. Methylated cytosines paint red, Color by → Show unmethylated in blue paints the converted sites too, and Color by → Cytosine context picks which cytosines it scores: CpG, CHG, CHH or all of them, since plant genomes methylate in all three. The bisulfite tutorial runs it on Arabidopsis data.
Pair orientation and insert size
For paired-end data, Color by → Insert size and orientation highlights discordant pairs, the main way to scan short reads for structural variants: unexpectedly large inserts turn red, small ones pink, and an abnormal orientation is colored by its orientation whatever the insert. The SV visualization guide has the color tables, the expected-insert threshold, and what each pattern means at a breakpoint.
Grouping reads
The track menu's Group by splits the pileup into one coverage+pileup section per value of one dimension at a time:
- Dimensions: Strand, First-of-pair strand, Pair orientation,
Pair status, Split reads (reads crossing a breakpoint apart from those
spanning it intact), Spliced reads, SV kind (one section per kind of
SV the read's evidence points at, as
SV channels draws it),
Mapping quality, and Tag..., which opens a dialog for the tag name
(
HPfor haplotype,RGfor read group, or any other). - Shared scale: sections share one coverage scale, and reads missing the tag collect in a trailing "none" section.
- Cap: 40 sections; past that the tail merges into one "N merged values" section. The tag dialog reports how many distinct values it found in view and refuses a tag that would reach the cap.
- Order: drag a section's chip onto another section to move it there; Reset section order in the track menu returns them to the sorted order.
The facet setting pre-groups a track, spelled as on the feature tracks: a
dimension ("strand", "pairOrientation", ...), a tag as "tags.HP", or any
other read field. The object form adds sort, the section order: the values
listed stack first, in that order, and the rest follow sorted. A chip drag
writes the same object:
Goes in the tracks array of config.json. See Tracks.
{
"type": "AlignmentsTrack",
"trackId": "hg002_ont_phased",
"name": "HG002 ONT, phased",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BamAdapter",
"bamLocation": { "uri": "https://example.com/HG002.phased.bam" },
"index": {
"location": { "uri": "https://example.com/HG002.phased.bam.bai" }
}
},
"displayDefaults": {
"facet": { "field": "tags.HP", "sort": ["2", "1"] }
}
}Edits config.json in the current folder. See JBrowse CLI with Desktop.
jbrowse add-track-json '{
"type": "AlignmentsTrack",
"trackId": "hg002_ont_phased",
"name": "HG002 ONT, phased",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BamAdapter",
"bamLocation": { "uri": "https://example.com/HG002.phased.bam" },
"index": {
"location": { "uri": "https://example.com/HG002.phased.bam.bai" }
}
},
"displayDefaults": {
"facet": { "field": "tags.HP", "sort": ["2", "1"] }
}
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "AlignmentsTrack",
"trackId": "hg002_ont_phased",
"name": "HG002 ONT, phased",
"assemblyNames": ["hg38"],
"adapter": {
"type": "BamAdapter",
"bamLocation": { "uri": "https://example.com/HG002.phased.bam" },
"index": {
"location": { "uri": "https://example.com/HG002.phased.bam.bai" }
}
},
"displayDefaults": {
"facet": { "field": "tags.HP", "sort": ["2", "1"] }
}
}Each section has a label chip that controls the section's height:
- Chevron: collapses that section to its coverage band, and expands it again.
- Show all reads: appears when the section's reads were clipped to fit the shared height budget; it gives that one section the track's full row cap, and turns into Fit to view to hand it back.
- Hide: right-click a chip to hide that section. Its reads leave the shared coverage scale, the legend and the arcs, so the rest of the stack reads without the section that dominates it. Show → Show N hidden groups puts them back.
- Pick: Sections... in the track menu lists every section the track knows, with a box each; untick the ones to hide, then Apply
- Resize: dragging the boundary below a section resizes that section alone.
These chip choices are not saved to a session or a shared link, and changing the grouping dimension clears them.
Show → Show groups as one row draws every section as a single row with overlap depth as darker shading, the compact reading for a track with many groups; expanding one section from its chip opts that one back out to a true stack.
Each section's coverage band counts only the reads grouped into that section, which makes grouping a check on the reads:
- Haplotype: grouping by
HPshows whether a heterozygous variant's supporting reads sit on one haplotype; see phasing heterozygous SVs. - Strand: group by Strand and turn off Show → Show pileup for a forward and a reverse histogram on a shared scale, each colored by the mismatches in that strand's reads. A position colored in one band and not the other comes from one strand alone, the signature of a basecalling error; a position that disagrees in both bands is a real variant.
- Mapping quality: group by Mapping quality and turn off Show → Show pileup for one histogram per MAPQ bin on a shared scale, which shows how much of a region's depth is reads the aligner could not place uniquely; the mappability tutorial does this at SMN1.
- Transcript strand: long-read cDNA reads are oriented to the transcript, so Strand splits them by transcript strand. On a strand-specific paired-end library group by First-of-pair strand instead, since there the transcript strand is which mate the read is; the RNA-seq tutorial shows that.
Presets → SV channels in the track menu groups by SV kind, draws only the evidence reads, and swaps the junction arcs for read arcs, so each kind of SV evidence gets a separate coverage band, reads and arcs. See SV channels for how to read it.
Read height and track sizing
The track menu's Read height submenu sets how tall each read is drawn: Normal, Compact, Super-compact, or Custom... for an exact pixel height.
A pileup taller than the track scrolls, unless one of these is on:
- Read height → Fit to track height derives the read height from the track height so the whole pileup fits, shrinking as coverage deepens and re-fitting as you drag the track taller or shorter. Reads stay between 1px and the Normal preset's height, so a deep enough pileup still overflows. With grouping, the expanded sections share what the coverage rows leave, so collapsing one gives the rest more height. Fit mode turns off when you pick a preset.
- Advanced → Track height → Grow the track grows the track to hold the reads, up to growMaxHeight, past which it scrolls again. Real sequencing depth passes that ceiling quickly, so raise the slot to keep growing.
Insertion and clipping indicators
The coverage row shows an upside-down histogram of insertions and clips, with a
colored triangle where they are a large enough share of a deep enough column
(filter).
| Color | Name | Value | Description |
|---|---|---|---|
| Insertion | #800080 |
Reads with an insertion relative to the reference | |
| Soft clip | #00f |
Reads are soft-clipped (clipped bases retained in the read) | |
| Hard clip | #f00 |
Reads are hard-clipped (clipped bases removed from the read) | |
| Split segments overlap | #555555 |
Two segments of one molecule, at least one of them a split or supplementary alignment, both align here — so the breakpoint between them is this span rather than a point | |
| Mates overlap | #b4b4b4 |
The two reads of a pair both align here: the fragment is shorter than two reads, and these bases are read twice from one molecule |
JBrowse also draws a purple rectangle in the pileup for insertions larger than
10bp. A long read spanning the insertion shows the mark. A short read ends at
the insertion's edge, and Show → Show soft clipping draws
its unaligned bases past that edge, as on the Illumina track below (GIAB HG002
reads at 1:55,705,770-55,706,090 on hg19).
Soft clipping
Bases at a read's end that don't align are soft-clipped (kept in the read) or hard-clipped (dropped). Soft-clipped bases are hidden by default; Show → Show soft clipping in the track menu reveals them. Clusters of them often mark a structural-variant breakpoint.
A read with no SEQ field (secondary reads among them) has no clipped bases to
draw. It keeps the blue bar at its clipped end and, zoomed in to the bases, the
clip's length as (S30).
Filtering reads
The track menu's Filter by has two kinds of filter.
- Which reads count: SAM flags (drop duplicates and secondaries, or keep
only properly-paired reads), a tag value (
HP:1for one haplotype,HP:*for any read with the tag), and Mapping quality, which hides reads under a minimum MAPQ assamtools view -qdoes. The coverage histogram, the junction arcs and the insert-size colors count only the reads these keep. - Which reads are drawn: the read name, the splicing radios (only spliced
reads, with a reference skip
Nin the CIGAR, or only unspliced ones), split reads, SV evidence, and reads with no mate in view. These hide rows and leave the coverage counting every read. To see one category's depth, group by it.
Filter by → More filters... lists them under those two headings.
Right-click a read for the Filter submenu: Filter for this read, Filter for this haplotype (HP:n) and Filter for this read group (RG:x) read their value off that read. They combine, and Clear read/tag filters appears once any is active.
Junctions
Junction arcs draw automatically over spliced alignments (N in the CIGAR), so
RNA-seq and Iso-Seq junctions appear with no setup; on RNA-seq this layer is the
sashimi plot. The RNA-seq tutorial works them on real
data. Each arc has a strand and a splice motif:
- Strand: from the aligner's strand tag.
XSorTSgive the transcript strand, and minimap2'stsis relative to the read and combined with the read's strand. A junction with no strand-tagged reads (default STAR output without--outSAMstrandField) takes the strand its splice motif implies. - Motif: JBrowse reads the two bases at each end of every intron off the reference and classifies the splice motif as GT-AG, GC-AG or AT-AC on either strand, or non-canonical, shown in the arc's tooltip. This needs a sequence adapter on the assembly.
Show → Show junctions turns them on and off, and Show → Show junction read counts prints each junction's supporting-read count on its arc. While the arcs draw:
-
Filter by → Non-canonical junctions → Hide non-canonical junctions drops junctions whose motif is none of the three canonical pairs. On deep RNA-seq the thin arcs are mostly these, so it is the filter to reach for first. Only non-canonical junctions keeps just those, for checking an aligner's output.
-
The Junctions section of Filter by → More filters... shows, hides or keeps only the Split-read junctions that split alignments (SA tag) imply beside the N-gap splices, and Min reads at a junction drops the junctions with fewer reads.
-
Advanced → Junction placement sets where the arcs sit (
junctions.placement):- Over coverage (
overlay, the default) draws them on the coverage histogram. - Above coverage (
above) and Below coverage (below) give them a separate strip,junctions.heightpx tall, so the histogram stays clear. - Auto (minimize overlap) (
auto) keeps the arcs over coverage and sends a junction below where it would cross another.
With coverage hidden, the arcs always take a separate strip.
- Over coverage (
-
Advanced → Coverage axis... → Scale → Log keeps the shallower junctions visible when one junction peak dominates the coverage histogram.
Read connections
The track menu's Read connections submenu connects paired or split reads, the long-range relationships behind structural variants.
Read arcs
Read connections → Read arcs draws a bezier curve between the ends of each pair, so long-range and discordant pairs stand out from the short local arcs. The arcs and the read cloud paint insert size and orientation, in the colors Color by → Insert size and orientation gives the reads. See Read arcs on the SV page for what each pattern means.
- Mate not loaded: a large semicircle reaching toward it.
- Mate on another chromosome: an arc when that chromosome is on screen, and a vertical line at the breakpoint when it is not, in one color.
- Filtering: the Read connections section of Filter by → More filters... hides off-screen partner or inter-chromosomal connections.
- Across regions: an arc whose ends are in different displayed regions spans them, so a second region either side of a breakpoint shows the connection as one curve.
- Thickness: reads describing the same connection draw as one arc, thickened
on a log scale by how many there are, so a thicker arc has more supporting
reads. A single-read connection draws at
readConnections.encoding.strokeWidth. - Placement: Advanced → Read connections placement puts the band Below
coverage (the default) or Above coverage, in a separate strip, or Over
coverage, on the histogram
(
readConnections.placement:below,above,overlay). The read cloud follows the same setting. - Hover: the location, the distance between the ends, the supporting read count and the color bucket; in read-cloud mode also the insert size. An insertion split arc leaves out the distance, since its ends mark where the read's two pieces overlap or miss on the reference.
Dragging the track taller re-fits the arcs.
Read cloud
Read connections → Read cloud lays pairs out on the Y axis by the log distance between mates, so the insert-size distribution is visible directly. Two grey lines across the cloud mark the normal insert range, so a bar above the upper line is a long pair and one below the lower line a short pair.
Going to a read's mate
Right-click a read and open the View mate submenu, present when the mate is mapped:
- Split current view to show mate replaces the displayed regions with the read's locus and its mate's side by side, each padded by a read length, and turns on View as pairs/link supplementary alignments so the pair is drawn joined. A snackbar offers Undo, which restores both
- Open breakpoint split view puts the two loci in separate stacked panels, which draws the connecting splines. It is offered for a pair the aligner did not call concordant, or one whose mate is on another chromosome
For a split read, the View split alignments submenu offers the same two:
Split current view to show split alignments lays out one region per segment
of its SA tag, in read order, and Open breakpoint split view stacks a
panel per locus the read aligns to, each centred on its junction.
One read against the reference
A long read crossing a structural variant aligns in pieces: a primary alignment
plus one supplementary per additional locus, the whole set recorded in each
record's SA tag, drawn as separate rows in the pileup.
Right-click any of them and choose Launch → Linear read vs ref... to put them back together. The read becomes a separate assembly along one row, every reference locus it touches lies along the other, and each alignment segment is a ribbon between them in read order. An insertion shows as a gap in the diagonal. Dragging over the read row extracts that sequence.
Dotplot of read vs ref... plots the same alignment as a dotplot, clearer when
a read aligns to one locus several times. The
COLO829 tutorial
follows a read across a three-chromosome chain this way.
See also
- User guide: Consensus sequence
- User guide: Structural variant visualization
- User guide: SV inspector
- User guide: Variant track
- Config guide: Alignments track configuration
- Reference: LinearAlignmentsDisplay config schema
Notes
-
A read counts only when both ends are placed at mapping quality above 0: a split read whose other pieces all sit at mapping quality 0, such as the clipped tail of an Alu, stays put. ↩