Installing plugins
Plugins add track types, view types, data adapters and menu items, and some bring their own data. How you install one, and how long it stays, depends on where you run JBrowse.
The full catalog, each plugin with its config snippet, is on the plugin store page. To write your own plugin, see the developer guide.
Where are you running JBrowse?
- A page someone else hosts, such as genomes.jbrowse.org or a tutorial's link: check whether it is already loaded.
- JBrowse Web in your browser, for yourself: the plugin store.
- A JBrowse Web site you run, for every visitor: config.json.
- JBrowse Desktop: Global plugins or the plugin store.
- A JBrowse component inside your own page: embedded components.
Is it already loaded?
A hosted config often loads the plugins its tutorials need. Open Tools → Plugin store; Installed plugins at the top lists what this session loaded.
If the plugin is listed there, there is nothing to install; if not, install it.
The plugin store
Open Tools → Plugin store, type the plugin's name into Filter plugins and click Install. JBrowse reloads with the plugin and keeps your views.
Some plugins (e.g. CIVIC) add their data when installed. Others register a new track type or adapter, which needs a matching track config before it draws anything.
How long it lasts: this session. A share link includes the plugin, but a new session starts without it. For every visit, keep it.
Not in the store? Load it by URL.
Keeping a plugin for every visit
Click the pin beside a plugin in Installed plugins, and JBrowse loads it every time you open this config in this browser.
- The list is per configuration, not per site. A plugin kept on
jbrowse.org/code/jb2/main/?config=demos/hg002/config.jsondoes not load on another demo, or on another version of the app. - JBrowse stores the list in this browser, so a session you share, or the same JBrowse opened on another machine, starts without these plugins.
- A kept plugin that did not load this visit (switched off, or skipped after a crash) is still a row in Installed plugins, with a switch beside it.
- On the admin server the store writes to
config.jsonfor every visitor instead, so the pin does not appear there.
JBrowse loads kept plugins before it draws anything, so a plugin that crashes on load would crash the app on every visit. To recover:
- The fatal error dialog offers Reload without permanent plugins.
- If a load never finishes, JBrowse turns the stuck plugins off before the next visit. The plugin store then shows a banner naming them, with a switch per plugin and a Turn back on and reload button once the culprit is switched off.
Adding ?safeMode to the URL skips every kept plugin for one load.
JBrowse Desktop
Desktop has two routes:
- Tools → Plugin store inside a session works as in JBrowse Web. How long it lasts: as long as that session file; other sessions don't load it.
- Global plugins..., in the start screen's menu, installs a plugin for every session on this machine, from the next session you open.
The dialog lists the store's plugins under Available plugins, each with an Install button. If a plugin crashes on load, switch it off there to keep it installed, or remove it. Reload without global plugins, in the same start-screen menu, skips the whole list for one launch.
Not in the store? Load it by URL.
A plugin that isn't in the store
Beta plugins often load by URL before they reach the store, and their tutorials give the URL. Where you enter it depends on where you run JBrowse:
- JBrowse Desktop: Add custom plugin, in the Global plugins dialog for every session, or in a session's plugin store for that session.
- The admin server: Add custom plugin in the plugin store, which writes
it to
config.json. - JBrowse Web, as a visitor: there is no button. Ask the site's admin to add
it to
config.json, or open a session link whosesessionPluginsnames it.
The Add custom plugin form asks for different fields for each build:
- a UMD build (a
.umd.jsfile): Plugin name and Plugin URL - an ESM build: open Advanced options, paste the URL into ESM build URL, and leave the rest empty
In config.json
The top-level plugins array in config.json loads a plugin for everyone who
opens that config. A store plugin goes in by its store name (storePlugin) and
any other by its URL; Plugins has the fields. The
jbrowse CLI has no plugin command, so edit the file by hand, or install from
the plugin store on the admin server, which
writes the entry for you.
How long it lasts: until someone removes the entry.
Embedded components
An embedded component takes its plugins as a prop; see Embedded components and the inline plugins example.
How long each install lasts
| Where you install it | Lasts |
|---|---|
| Web plugin store | this session, and is included in its share link |
| Web plugin store, kept | every visit to this config, in this browser only |
| Web plugin store on the admin server | written to config.json, for every visitor |
| Desktop plugin store | the open session file |
| Desktop Global plugins... | every session on this machine |
config.json | every visitor to that config |
See also
- Config guide: Plugins
- Docs: Developer guide
- Plugin store page
- PLUGIN_LISTS.md