FAQ
Each answer is short and links the page that covers the topic in full. If something is broken rather than unclear, start at Troubleshooting.
General
What is the difference between JBrowse Web and JBrowse Desktop
JBrowse Web is a static web app you deploy to a server, so anyone with the URL can use it. JBrowse Desktop is an Electron app that runs locally, opens local files directly, and needs no server.
What browsers does JBrowse 2 support
Recent versions of Chrome, Firefox, Safari and Edge. Most development and testing happens in Chrome.
What file formats can JBrowse 2 read
BAM, CRAM, VCF, GFF3, BED, bigWig, bigBed, PAF, MAF, .hic, and many others.
Supported file types
Does JBrowse 2 collect usage data
jbrowse-web and jbrowse-desktop send a
usage report on load, which
disableAnalytics: true turns off. Your data files are separate: the browser
reads them directly from wherever they are hosted, so reads, variants and
annotations never pass through a JBrowse server, and JBrowse Desktop works
entirely offline. The Share button
encrypts the session in your browser first.
Can I open files from my own computer
Yes, with the File toggle in the "Add a track" form, in both apps. JBrowse Web can remember the file for a later session in browsers with the File System Access API, which is why a reopened session may ask you to restore access, and a local file never travels in a share link. See opening local files.
How do I make an image for a publication
Every genome view has an "Export image..." option that writes what is on screen, ready for Illustrator or Inkscape. In the linear genome, linear synteny and breakpoint split views, setting Size to "Page width" lays the tracks out for a width such as 183 mm, with labels at a point size you choose. To regenerate figures as the data changes, @jbrowse/img renders from the command line, and Capturing a JBrowse view from a script drives the running app for a screenshot of a menu or an interaction.
How do I cite JBrowse 2
Diesh, C., Stevens, G.J., Xie, P. et al. JBrowse 2: a modular genome browser with views of synteny and structural variation. Genome Biology 24, 74 (2023). https://doi.org/10.1186/s13059-023-02914-z
What license is JBrowse 2 released under
Apache License 2.0, free for both academic and commercial use.
Setup
How can I setup JBrowse 2 on my web server
JBrowse web quick start has the walkthrough. With the CLI installed it is one command to install and one to update later:
jbrowse create /var/www/html/jb2 # download the app into that folder
jbrowse upgrade /var/www/html/jb2 # replace the app files with the latest releaseThe release contains no config.json, so upgrade leaves yours in place.
How do I install or update the @jbrowse/cli tool
npm install -g @jbrowse/cli, and the same command updates it. The CLI prepares
your config.json and runs no server-side code. CLI reference
What does my web server need to do
Serve static files, honor byte-range requests, set no Content-Encoding on BGZF
files, and answer CORS if the data is on another host.
Serving data files
How do I put my data behind a login
JBrowse has no server and no accounts, so whatever serves the files decides who may read them. Leaving a track out of config.json protects nothing, and a password in config.json is public. Put the app and its data on one site behind a login: HTTP Basic auth, single sign-on, AWS Cognito or Google Cloud. Putting JBrowse Web behind a login
Can I give logins to particular people, with Duo or two-factor
Yes. OAuth2 Proxy in front of nginx sends sign-in through Duo or your institution's login and lets in only the email addresses on a list you keep: Login with single sign-on (Duo, institutional, Google, GitHub). An AWS Cognito pool where only you create accounts does the same without a server: Login with AWS Cognito.
How do I add an assembly, or load a track
jbrowse add-assembly hg19.fa.gz -n hg19 and
jbrowse add-track myfile.bw -a hg19 write the config entries for you, working
out the file type and index. See Assemblies and
Tracks.
Can I load a UCSC track hub
Yes, as a connection. To hand someone a link
that opens a hub with no setup at all, use
&hubURL=.
How do I convert my JBrowse 1 configuration to JBrowse 2
This gist
is a best-effort script: it reads a JBrowse 1 trackList.json and writes the
resulting tracks into a JBrowse 2 config.json once; the data files stay where
they are. See Config guide: Connections
for what it covers. If your setup needs more than the script handles, we're
happy to help migrate it, so contact us.
How can I make a header on a jbrowse-web instance
Edit the index.html that ships with jbrowse-web to add content outside the div
the app renders into. To make the header part of a larger app instead, use
@jbrowse/react-app2, since jbrowse-web itself is
not published as an npm package.
How do I add a plugin
List its name and bundle url in the top-level plugins array of
config.json, see Plugins. The
plugin store has the snippet for every published plugin, and
the in-app store installs one into the current
session without editing config.json.
Configuration
How do I change the color of a track
The track menu's Color entry picks one and saves it with your session. In
config, set encoding.color in the track's displayDefaults; in a URL, in its
displaySnapshot. Cookbook
How do I color features by an attribute (color callback)
Set encoding.color to the attribute's name, "encoding": { "color": "type" },
which paints each value a different color and draws a key saying which is which.
Cookbook has the chosen-color, binned and gradient forms. For a
rule no single field holds, use a Jexl
expression as the value,
"color": { "value": "jexl:feature.score > 500 && feature.type == 'exon' ? 'red' : 'grey'" };
see Using jexl callbacks, and
Customizing feature colors for adding a function of
your own when an expression gets unwieldy.
How do I get (more) fields to filter tracks on
The track selector's filter chips cover kind (the track type, or
metadata.kind), category, and every top-level metadata key whose values
group tracks. Hierarchical track selector
How do I open JBrowse at a particular location with certain tracks turned on
For everyone who visits, set a Default session. For a
one-off link, URL query parameter API covers &assembly=, &loc= and &tracks=
through to a whole multi-view session spec, and Config and session JSON compares
every way to preset a view.
Why can't I copy and paste my URL bar to share it with another user
Sessions can outgrow a URL, so JBrowse keeps only the session ID in the bar and the session itself in sessionStorage/IndexedDB, which another user's browser does not have. Use the Share button, or build a self-contained link with URL query parameter API.
When does JBrowse show "Zoom in to see more features"
JBrowse shows it when the region would exceed one of two limits: the bytes the fetch would download, or the features that would be drawn on screen. The banner's Force load button loads the region anyway, and Tracks covers raising each.
Developers
How can I start the JBrowse 2 app as a developer
Clone, pnpm install, then pnpm start in the product you want. Prerequisites
and per-product commands are in
CONTRIBUTING.md.
How do I write a plugin
Writing a plugin starts you from an official template with a working build. For a jexl function or a small config callback, Writing a no-build plugin skips the toolchain entirely, and Developer guide covers the element types a plugin can register.
Why doesn't JBrowse 2 render through deck.gl, Pixi or wgpu
Why not deck.gl, Pixi, Rust or wgpu