The Config File

A JBrowse config file exists to tell the JBrowse tools about a database and the tracks within the database. You don't need a config file if all of your data is in flat files, and your feature flat files (BED, GFF) are separated so that there's only one file per track. However, a config file is a convenient way to specify the details of how JBrowse should treat a track, so you may want to use a config file anyway, especially if you expect to process new versions of your data on an ongoing basis.

The syntax of the config file is JSON. It originally used the GBrowse config file syntax, but JBrowse really needed multiple levels of nesting and an array syntax, so it's JSON. However, it does contain some of the same settings as the GBrowse config file, especially at the beginning. A JBrowse config file starts out just like a GBrowse config file, with a slightly different syntax.

The root level of the config file:

keyvaluetype
descriptionBrief description of the data sourcestring
db_adaptorPerl class that implements Bio::DasI.
Common ones include
  • Bio::DB::SeqFeature::Store
  • Bio::DB::GFF
  • Bio::DB::Das::Chado
string
db_argsarguments to the constructor for the specified db_adaptordictionary of key-value pairs
TRACK DEFAULTSdefault track settingstrack settings dictionary
trackssettings for all the tracksarray of track settings dictionaries

The meat of the configuration file consists of the per-track settings:

keyvaluetype
tracktrack identifier used by the software.
It's more convenient if this doesn't have any weird characters or spaces in it
string
keyHuman-readable label for the trackstring
featureList of feature types to put into the trackarray of strings
autocompleteIf you want to be able to search for the features in this track, set this to one of the following strings:
  • label
    to search on the feature label
  • alias
    to search on the feature aliases
  • all
    to search on both labels and aliases
string
classThe CSS class for the feature. Look in the feature glyph list for the available options.string
categoryThe category this track is in, for grouping the tracks togetherstring
urlTemplateTemplate for a URL to visit if the user clicks on a feature in this trackstring
extraDataExtra per-feature information to send to the client; useful in the urlTemplatedictionary of header -> perl sub
subfeatureClassesSpecifies what CSS class to apply to what type of subfeaturedictionary of type -> CSS class
arrowheadClassCSS class for arrowheadsstring
clientConfigsettings to control the behavior of the client for this track, mainly zoom thresholds for when to display more informationdictionary