JBrowse 2: Working with lists, bookmarks and sessions

Spreadsheet view

JBrowse 2 has a “spreadsheet view” that looks much like you might expect: a simple spreadsheet. The primary way a WormBase user might interact with the spreadsheet view is if you have a file that has a list of genomic locations that are of interest and you’d like to step through.  For example, consider this list of locations that have comments separated by a tab (so that this is a tsv file–JBrowse supports tsv, csv, VCF, BED and BEDPE files in the spreadsheet view:

  I:16,632..17,470     site 1
  I:314,852..315,768   site 2
  I:382,162..383,013   site 3--this is the good one
  I:397,470..398,755   site 4 

You can put this in the spreadsheet view by selecting “Spreadsheet view” from the Add menu:

After selecting the file with the “Choose file” button, unchecking the “has column names” if it’s selected and choosing the N2 assembly, you are greeted with a simple spreadsheet:

This spreadsheet isn’t very useful as it is, but each column has a context menu to let you tell it what type of data this is. Mousing over column A and clicking the down arrow reveals a menu with options related to sorting and filter the data, as well as declaring what type of data is in the column. Selecting that submenu reveals options of “number”, “text” and “location…”, which is another submenu. In our case, we want to select “Full location.” If this were a VCF or BED file, we would want to make use of the other options like reference sequence and start.

Once “full location” is selected, the entries in the column turn into links that will open a linear genome view at that location. The initial entry will not have any tracks open, but after a set of tracks are chosen, all subsequent clicks on any entry in that column will open a linear genome view of that location with the same set of tracks.

Bookmarks

Bookmarks work in a similar fashion to how the spreadsheet view works. You can add bookmarks in a few ways: either by manually selecting a region and selecting “add bookmark” from the popup menu. You can also load a BED file to create a bookmark list.

When you click and drag your mouse on “chromosome number line” at the top of the linear genome view, a menu pops up. To create a bookmark, select “Bookmark region.”

You can also manually create a bookmark by selecting “Bookmark current region” from the view’s menu that you access by clicking the “hamburger menu” in the upper left corner of the view.

To access the list of bookmarks you’ve created, you can select “Open bookmark widget” from that same menu.  This opens a frame where the track list and detail views are displayed.

In addition to clicking on the bookmarks themselves to go to the region, you can also perform other useful actions, including giving the bookmarks labels to help you remember what they are, download the bookmarks as a BED or TSV file and import a BED or TSV file to create a list.

Sessions

Both of the items covered in this document as well as some other features of JBrowse 2, like user created tracks, only survive for the duration of a session, which is to say, until the JBrowse 2 window is closed or reloaded. That makes the ability to save and restore sessions important if you want to use these functions on a regular basis. Sessions are controlled in the File menu in the upper left corner of the page. When you look at the contents of the File menu, you’ll see that the majority of the operations there are related to managing sessions.  You can:

  • Start a new session (throwing away changes to the current session)
  • Import/export sessions (save sessions files that can be reopened in other browsers)
  • Save/open sessions (set a web cookie that will remember the session)
  • Duplicate a session (making a “fork” of the current session)

There are two big differences between import/export and open/save sessions. One obvious difference is portability: with save/open, you are tied to the current browser. This is convenient in more than just the obvious way of not having to remember where you saved session files: it also allows the browser to “reopen” data files that we opened as session tracks (ie, user loaded data). Import/export gives you portability to not only open a session for yourself on another computer but to send a session to a collaborator so they can look at exactly what you’re looking at. The downside of this portability is that, to use a user-loaded track, the user in the newly imported session will have to open the settings of any user-loaded track to “reload” the data.

Leave a Reply

Your email address will not be published. Required fields are marked *