Basic usage
2 videos in this tutorial
Navigate with the location search box (a gene name or chr:start-end) plus
drag-to-pan and scroll-to-zoom. Add your own data through the open-track form,
or preconfigure it in config.json. JBrowse Web and Desktop share the controls
below.
Linear genome view
Open a linear genome view (LGV) from the menu bar: Add → Linear genome view
Scrolling
The view scrolls on the mouse wheel, on a click-and-drag, and from the pan buttons in the LGV header.
Zooming
Zoom with the buttons and slider in the LGV header, or with:
Ctrl+ mousewheel (on Mac, trackpad pinch-to-zoom also works)Shift+ click-and-drag for a rubberband selectionShiftalone shows a red vertical guide bar
Keyboard shortcuts, with the view focused:
Ctrl/Cmd+↑: zoom inCtrl/Cmd+↓: zoom outCtrl/Cmd+←/→: pan left/right
The Zoom on scroll checkbox in the LGV header makes the bare mouse wheel
zoom wherever the pointer is over the tracks. To scroll the page while it is on,
put the pointer on the view header or use the scrollbar. Shift+wheel stays
horizontal scrolling.
Reordering tracks
Drag the six-dot handle on a track label up or down.
Resizing tracks
- One track: drag the thin handle under it. Double-clicking the handle grows a track that scrolls its content to show all of it.
- Every track at once: drag the grey bar under the last track. Each track gives or takes in proportion to its height, so tall tracks move the most. While the view is taller than the window, the bar stays at the bottom of the window.
- Fit to the window: double-click that bar, or pick Fit tracks to window in the view's hamburger menu, to size the tracks so the view fills the window.
Reordering views
To reorder views, use "Move up"/"Move down" in the view menu (hamburger icon).
Using the location search box
The search box at the top of the LGV accepts:
- a region, e.g.
chr1:1..100orchr1:1-100orchr1 1 100 - unit suffixes, e.g.
chr1:34M-35Morchr1:1.5Mb-2Mborchr1 500kb 600kb, expanded to whole base pairs on navigation - an assembly prefix, e.g.
{hg19}chr1:1-100 - several regions, space-delimited and opened side by side, e.g.
chr1:1..100 chr2:1..100 [rev]appended to flip the region, e.g.chr1:1-100[rev]- a gene name or feature keyword, e.g.
BRCA1, when a text index is configured
Name searching needs a text index; see text searching.
Picking a gene or feature from the results navigates to it and highlights it, pinned toward the top of its track. The highlight follows the feature as you pan and zoom. Search again to move it, or click the "Clear feature highlights" button in the header bar.
When several indexed annotation tracks match the same gene at one place, JBrowse navigates straight there, through an open track where there is one. The picker appears only when the hits point at different places.
Opening tracks
Open a track from File → Open track... in the menu bar. For a whole track hub (UCSC track hub or JBrowse 1 data directory), use File → Open connection...; see User guide: Connections.
The circular plus (+) button in the "Available tracks" widget opens the same form.
The form takes a URL or a local file. The index each format needs:
- BAM - BAI or CSI
- CRAM - CRAI
- Tabix-indexed VCF/GFF/BED - TBI or CSI
- BigWig/BigBed - no index
For remote files the index is inferred from conventional names (file.bam →
file.bam.bai). Local files and non-standard names need it supplied by hand.
Opening local files
The File toggle in the "Add a track" form opens a file from your own machine. The browser reads the bytes and uploads nothing.
- Chrome and Edge: JBrowse Web remembers which file you picked, so a reopened session can get the track back. After a reload, the "local files need permission to be restored" banner's Restore access button re-grants read permission.
- Firefox: a local file lasts for the life of the tab, and after a refresh the track shows "(need to reload)".
- Share links leave out local files, and you pick a local file's index by hand.
- JBrowse Desktop stores the path, so it has none of these limits.
Adding many tracks at once
Add multiple tracks at once in the "Add a track" form takes file URLs, one per line, or a set of local files dropped on it.
- Types: each row is typed from its extension.
- Indexes: an index (
.bai,.csi,.tbi,.crai) is paired with the data file it indexes, in any order. - Preview table: rename or remove a row here.
- Assembly: one assembly serves the batch.
- Drop on the session: files dropped anywhere on an open session open this form with them already added, aimed at the view they were dropped on. Genome files open the add-genome form instead.
File format support
Core JBrowse 2 reads BAM/CRAM, tabix-indexed VCF/GFF3/GTF/BED, BigWig/BigBed,
BedGraph, BEDPE, .hic, MAF/BigMaf/TAF, PLINK LD, and the whole-genome
alignment formats (PAF, MUMmer .delta, UCSC .chain, MCScan .anchors,
MashMap, BLAST tabular), on assemblies stored as indexed FASTA, bgzip-indexed
FASTA, or 2bit. The supported file types table
is the full list, generated from the adapters themselves.
Plugins add further formats; see the plugin store.
Administrators can add tracks with the command line or the admin server.
Undo and redo
Use Tools → Undo and Tools → Redo, or ctrl+z/cmd+z (undo) and
ctrl+shift+z/ctrl+y/cmd+shift+z (redo).
Undo is app-wide, so it reaches things like reopening a view you just closed. The embedded components have no undo.
Sharing sessions
On JBrowse Web, the "Share" button in the main menu bar generates a URL to send to other users. The address-bar URL does not capture full session state, so always use the Share button.
JBrowse Desktop has no Share button, since its sessions are files. It opens a shared link via File → Session → Open JBrowse Web link....
On JBrowse Web, a session file from File → Export session dropped onto the app opens as a copy, after the open session is saved.
The session URL contains:
- the open views and their settings (e.g. track label positioning)
- the tracks in each view, including any you added yourself
- per-track display state, such as an alignments track's soft-clipping and sort settings
A shared link can therefore contain custom tracks the recipient opens directly, with no admin needed to publish them first.
Track menu
The track menu (vertical "..." on the track selector or track label) holds the track-specific functions. Some options need the track open (from the track label); basics like "About track" are always available from the track selector.
Display types, on a track that has more than one display, switches how the track draws its data. Each track type's guide describes its displays.
Filtering tracks
The filter box at the top of Available tracks keeps the tracks that contain
every word you type, in any order, in the name, category, description or a
metadata value, plus the table's other columns. thp1 also finds "THP-1". A
tree row kept for a word it does not show names where the word was in grey after
the track name, such as "biosample: K562", or shows the part of its description
that holds the word. The box shows how many tracks are kept, of how many, such
as "6 of 800".
"quoted words"must appear together, as typed.-worddrops the tracks that contain it:liftover -mm10. A minus before a plain number is part of it:-2.3finds that negative value.
Under the filter box, a chip for each of the first few fields that group tracks (and "More filters" for the rest) lists that field's values with their track counts. Check values to keep only the tracks with one of them, in the tree and the table alike. An active chip names what it keeps, and its × clears it. The tree's category headings already sort tracks by category, so its category chip shows only in the table.
While a search or chip narrows the table, the checkbox in its header turns on
every track that matched, or turns them all off again. To gather tracks into a
selection instead, for example to combine them into a multi-row track,
Ctrl/Cmd+click their names, or choose "Add matching tracks to selection"
from the ☰ menu.
Favorite and recently used tracks
Mark favorites from the Track menu. The All | Favorites | Recent toggle at the top of Available tracks narrows the tree, or the table, to your favorites or to the tracks you opened recently; the menu at the left of the filter box clears either list.
Feature details
Clicking a feature opens its details panel in the drawer. The Attributes section lists the fields as they came out of the file: a GFF3 attribute, a BED extra column, or a VCF INFO key appears under its name in the file.
JBrowse changes two kinds of value as it loads them, with no configuration:
- A value that is just a URL becomes a link, so a GFF3 attribute like
url=https://www.uniprot.org/uniprotkb/P12345is clickable - HTML renders after JBrowse passes it through a sanitizer. Text that only
looks like a tag stays as typed, so a VCF
<TRA>allele still reads as<TRA>
A table in the panel, such as a VCF's samples, has a search box that reads words
as the track filter box does, "quoted words" and -word
included.
To add, rename or hide fields, see customizing feature details. Gene and transcript features also have a sequence panel, covered in Feature sequence panel.
About track dialog
The track menu opens this dialog.
On a reference sequence track the dialog also has an "Assembly" section: the assembly's config (name, aliases, and the alias, cytoband and genetic-code files it loads), a "Copy assembly config" button, and "Show ref name aliases", which lists every reference name next to its aliases. That listing has a filter box for looking up what one contig is called elsewhere.
Editing track configs
Track actions → Settings in the track menu edits any track's settings. The session stores each edit as an override of the track's config:
- In the session: edits persist, share and undo with the session, and the config file everyone else is served stays as it was.
- Into the config: an admin writes them into that file with Admin → Save track settings to config.
The form shows the track's name, description, category and data files, and the settings of the display this view draws. What the display draws (color, grouping, filters) is under the track menu's Advanced → Edit plot....
- Reset button: returns a field to the track's config.
- Edit as JSON... edits every setting as
config.jsonwrites it. A key the track does not take is refused under the text. - Reset track settings in the track menu reverts to the underlying config.
The display settings tutorial covers the
same settings as persistent defaults in config.json, and as overrides in a URL
or an embedded session.
Rubberband selection
Click and drag on either the main (lower) or overview (upper) scale bar.
The main scale bar's menu holds Zoom to region, Get sequence..., Copy range, Highlight region (Highlights), then a Launch submenu of what can open from the selection:
- Linear genome view: a new view of the span with this view's tracks and their settings, which scrolls and zooms independently
- Linear synteny view: when a synteny dataset in the session covers this assembly, one panel per assembly aligning to the selection, whether or not the synteny track is turned on
- Consensus sequence: when an alignments track is open
Get sequence..., the consensus sequence and the synteny launch also have a track-menu entry that takes the visible window instead of a selection: Get sequence (visible region)... on the reference sequence track, Consensus sequence (visible region)... on an alignments track, and the synteny launch's visible-region entry.
Clicking the scale bar without dragging names a single base. Its menu holds Center view here, Zoom to base level and Copy coordinate.
The synteny and breakpoint split views have one scale bar for the whole stack. A drag there leads with Zoom to region(s), which zooms every row at once; below it, one entry per genome opens the selection menu for that genome.
Scalebar chromosome name menu
The chromosome names along the scale bar are clickable. The menu holds:
- Focus on
<name>- navigate to that entire region - Actions submenu:
- Reverse region - reverse-complement just that region, in place
- Horizontally flip view - reverse-complement the whole view
- Move left / Move right and Move to far left / Move to far right - reorder the region relative to the others when several are displayed
- Remove this region from view
View and layout controls
The controls below sit in the view's hamburger menu and the header bar.
Ideogram
When the assembly has cytobands, the overview bar draws the chromosome as a banded ideogram with the centromere marked. Show → Show ideogram toggles it, on by default and remembered for later sessions.
The entry appears only when the view shows a whole chromosome, since a sub-region gives an arbitrary slice of bands.
Track label positioning
Track labels sit on a separate row, overlap the data, or hide entirely, from the Track labels submenu in the view's hamburger menu.
Horizontally flip
Horizontally flip in the view's hamburger menu reverse-complements the view. Triangles in the overview bar show the current orientation.
Drawer widget position
The header bar dropdown moves the drawer widget, which starts on the right, to the left or right side.
Track table
The Tree | Table toggle at the top of "Available tracks" shows all tracks as a
filterable table. The rows follow the tree's order, with each track's category
in the column beside its name, until you click a column header to sort; a search
lists the tracks whose name matches first. The filter chips stay set when you
switch between the tree and the table. In table mode, the track selector's ☰
menu shows or hides any column through Manage columns. Tracks with metadata
fields get extra columns:
{
"trackId": "my_track",
"name": "My Track",
"metadata": { "origin": "public", "date_added": "2024-02-20" }
}See the configuration guide.
See also
- User guide: Connections
- User guide: Highlights
- User guide: Installing plugins
- Config guide: Track selector configuration
- Config guide: Avoiding stale config
- Config guide: Supported file types