Getting Started With JBrowse

This page should be enough to get you started. If you run into trouble, please join the mailing list and ask us about it.

Contents:

Prerequisites

Alternatively, you can skip installing JBrowse and its prerequisites by launching a machine image using Amazon.com's EC2 service. We've prepared an image for use with EC2. For more information, see our wiki page.

From CPAN:

Download/install

Get JBrowse from GitHub (click on the "download" button)

Then unzip/untar JBrowse in a directory that's served by apache (e.g., /var/www/html/)

Reference Sequences

Tell JBrowse about your reference sequences with bin/prepare-refseqs.pl

(JBrowse generates files with links that are relative to the directory where index.html is located, so you should run the JBrowse scripts from that directory)

$ bin/prepare-refseqs.pl --fasta docs/tutorial/data_files/volvox.fa

Features

There are two options for telling JBrowse about your feature data: if you have a genomic annotation database such as chado, Bio::DB::SeqFeature::Store, or Bio::DB::GFF, then you can use JBrowse's biodb-to-json.pl. On the other hand, if you mainly deal with flat files like GFF or BED, it may be more convenient to use JBrowse's flatfile-to-json.pl.

biodb-to-json.pl -

You use bin/biodb-to-json.pl with a configuration file (documented here).

$ bin/biodb-to-json.pl --conf docs/tutorial/conf_files/volvox.json

bin/flatfile-to-json.pl -

bin/flatfile-to-json.pl doesn't use a configuration file; instead, per-track settings are given as command-line arguments. Run bin/flatfile-to-json.pl without any arguments to see a description of the available settings. Most of them correspond to track settings in the config file, so see the track settings section in the config file documentation for more details.

Next-gen reads

If you have data in the BAM format, you can import it into a JBrowse instance using the flatfile-to-json.pl program. Here is one example of a command that does that, using the included data:

bin/flatfile-to-json.pl --bam docs/tutorial/data_files/volvox-sorted.bam --tracklabel bam_simulated --key "Simulated next-gen reads" --cssClass basic --clientConfig '{"featureCss": "background-color: #66F; height: 8px", "histCss": "background-color: #88F"}'

Names

To enable users to search using feature names or IDs, you have to do two things:

  1. specify autocomplete for the tracks whose features you want to be searchable (see the track settings section in the config file documentation for details about the autocomplete setting). When you do this, a file with a list of names and locations will be generated for each track that has the autocomplete setting.
  2. run bin/generate-names.pl to collect those per-track files together into the structure that JBrowse uses to search

$ bin/generate-names.pl -v

You need to run bin/generate-names.pl again every time you add new features to JBrowse.

And that's all, for basic usage.

visit the main page to view the results.

Quantitative tracks

If you want to browse quantitative ("wiggle") tracks in JBrowse, you need to do a bit more work.

Prerequisites:

Compile the wiggle-processing program by running configure and then make in the JBrowse root directory

$ ./configure
$ make

System-specific:

Once wig2png is compiled, you run it via a wrapper script:

$ bin/wig-to-json.pl --wig docs/tutorial/data_files/volvox_microarray.wig