JBrowse genome browser

JBrowse is a genome browser written in Javascript by GMOD . It’s ultra-light and fast and a lot easier to install than the UCSC genome browser.
However, the documentation is still lacking and it is tricky to configure tracks.

Here are some notes that may help others configuring the browser, assuming you were able to get it running and added some data.

As JBrowse gets updated, the topics here that are bugs will probably be ironed out. I wrote these notes using JBrowse-1.11.6 on May 12, 2015.

1. Collapsing features in a track so they all appear in the same line:

  1. After generating your track, edit the file data/trackList.json, changing “FeatureTrack” by “JBrowse/View/Track/CanvasFeatures”. Only CanvasFeatures allows you to collapse tracks.
  2. Add “displayMode” : “collapsed”
    Your track should look like this:

       "key" : "left ventricle H3K27ac",
       "type" : "JBrowse/View/Track/CanvasFeatures",
       "trackType" : null,
       "compress" : 0,
       "urlTemplate" : "tracks/lvH3K27ac/{refseq}/trackData.json",
       "style" : {
          "color" : "blue",
          "className" : "feature",
          "strandArrow" : false
       "storeClass" : "JBrowse/Store/SeqFeature/NCList",
       "label" : "lvH3K27ac",
       "displayMode" : "collapsed"

2. Putting your track under a category:

While you can edit data/trackList.json and add the category key, this is useful when creating multiple tracks:
bin/flatfile-to-json.pl --tracklabel my_track --key "My track" --bed myfile.bed --config '{"category":"My category"}'

Notice that you must use single quotes, then double quotes in the JSON array.
You can use any valid JSON code in –config.

3. Hiding arrow heads:
JBrowser expects JSON in the configuration. JSON boolean values must not be quoted.
Only this will work in a style to hide arrows:
"strandArrow" : false

4. True/false and numbers must not be in quotes:

Only this will work in a style:
"strandArrow" : false

"connectorThickness" : 2

5. Loading GFF files:

This error:

Unsuccessful stat on filename containing newline at /mnt/home/varwww/JBrowse-1.11.6/bin/../src/perl5/JsonFileStorage.pm line 64.

Is caused by using space as separator in a GFF file. The separator must be TAB!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s