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:
key | value | type |
---|---|---|
description | Brief description of the data source | string |
db_adaptor | Perl class that implements Bio::DasI. Common ones include
| string |
db_args | arguments to the constructor for the specified db_adaptor | dictionary of key-value pairs |
TRACK DEFAULTS | default track settings | track settings dictionary |
tracks | settings for all the tracks | array of track settings dictionaries |
The meat of the configuration file consists of the per-track settings:
key | value | type |
---|---|---|
track | track identifier used by the software. It's more convenient if this doesn't have any weird characters or spaces in it | string |
key | Human-readable label for the track | string |
feature | List of feature types to put into the track | array of strings |
autocomplete | If you want to be able to search for the features in this track, set this to one of the following strings:
| string |
class | The CSS class for the feature. Look in the feature glyph list for the available options. | string |
category | The category this track is in, for grouping the tracks together | string |
urlTemplate | Template for a URL to visit if the user clicks on a feature in this track | string |
extraData | Extra per-feature information to send to the client; useful in the urlTemplate | dictionary of header -> perl sub |
subfeatureClasses | Specifies what CSS class to apply to what type of subfeature | dictionary of type -> CSS class |
arrowheadClass | CSS class for arrowheads | string |
clientConfig | settings to control the behavior of the client for this track, mainly zoom thresholds for when to display more information | dictionary |