UNPKG

@gmod/jbrowse

Version:

JBrowse - client-side genome browser

394 lines (383 loc) 54.9 kB
<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><title>biodb-to-json.pl · JBrowse</title><meta name="viewport" content="width=device-width"/><meta name="generator" content="Docusaurus"/><meta name="description" content="### biodb-to-json.pl"/><meta name="docsearch:language" content="en"/><meta property="og:title" content="biodb-to-json.pl · JBrowse"/><meta property="og:type" content="website"/><meta property="og:url" content="https://jbrowse.org/index.html"/><meta property="og:description" content="### biodb-to-json.pl"/><meta name="twitter:card" content="summary"/><link rel="shortcut icon" href="/img/favicon.ico"/><link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><link rel="alternate" type="application/atom+xml" href="https://jbrowse.org/blog/atom.xml" title="JBrowse Blog ATOM Feed"/><link rel="alternate" type="application/rss+xml" href="https://jbrowse.org/blog/feed.xml" title="JBrowse Blog RSS Feed"/><script type="text/javascript" src="https://buttons.github.io/buttons.js"></script><link rel="stylesheet" href="/css/main.css"/></head><body class="sideNavVisible separateOnPageNav"><div class="fixedHeaderContainer"><div class="headerWrapper wrapper"><header><a href="/"><h2 class="headerTitle">JBrowse</h2></a><div class="navigationWrapper navigationSlider"><nav class="slidingNav"><ul class="nav-site nav-site-internal"><li class=""><a href="/blog" target="_self">Blog</a></li><li class="siteNavGroupActive"><a href="/docs/installation.html" target="_self">Documentation</a></li><li class=""><a href="/en/demos.html" target="_self">Demos</a></li><li class=""><a href="/en/developers.html" target="_self">Developers</a></li><li class=""><a href="/en/contact.html" target="_self">Contact</a></li><li class=""><a href="/en/references.html" target="_self">References</a></li><li class=""><a href="/en/help.html" target="_self">Help</a></li></ul></nav></div></header></div></div><div class="navPusher"><div class="docMainWrapper wrapper"><div class="container docsNavContainer" id="docsNav"><nav class="toc"><div class="toggleNav"><section class="navWrapper wrapper"><div class="navBreadcrumb wrapper"><div class="navToggle" id="navToggler"><i></i></div><h2><i>›</i><span>Command line</span></h2><div class="tocToggler" id="tocToggler"><i class="icon-toc"></i></div></div><div class="navGroups"><div class="navGroup"><h3 class="navGroupCategoryTitle">Tutorial</h3><ul><li class="navListItem"><a class="navItem" href="/docs/installation.html">Installation</a></li><li class="navListItem"><a class="navItem" href="/docs/tutorial.html">Indexed file formats tutorial</a></li><li class="navListItem"><a class="navItem" href="/docs/tutorial_classic.html">Classic quick-start guide</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Configuring tracks</h3><ul><li class="navListItem"><a class="navItem" href="/docs/reference_sequence.html">Reference sequence configuration</a></li><li class="navListItem"><a class="navItem" href="/docs/canvas_features.html">CanvasFeatures</a></li><li class="navListItem"><a class="navItem" href="/docs/html_features.html">HTMLFeatures</a></li><li class="navListItem"><a class="navItem" href="/docs/alignments.html">Alignments tracks</a></li><li class="navListItem"><a class="navItem" href="/docs/bigwig.html">Wiggle/BigWig Tracks</a></li><li class="navListItem"><a class="navItem" href="/docs/variants.html">VCF tracks</a></li><li class="navListItem"><a class="navItem" href="/docs/minimal.html">Minimal JBrowse configurations</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Advanced configuration</h3><ul><li class="navListItem"><a class="navItem" href="/docs/embedding.html">Embedding JBrowse</a></li><li class="navListItem"><a class="navItem" href="/docs/mouse_configs.html">Mouse clicks, menus, and popups</a></li><li class="navListItem"><a class="navItem" href="/docs/configuration_file_formats.html">Configuration File Formats</a></li><li class="navListItem"><a class="navItem" href="/docs/dataset_selector.html">Dataset Selector</a></li><li class="navListItem"><a class="navItem" href="/docs/track_selectors.html">Track Selectors</a></li><li class="navListItem"><a class="navItem" href="/docs/track_metadata.html">Track Metadata</a></li><li class="navListItem"><a class="navItem" href="/docs/global_options.html">Global configuration options</a></li><li class="navListItem"><a class="navItem" href="/docs/compression.html">Compressing JBrowse data</a></li><li class="navListItem"><a class="navItem" href="/docs/authentication.html">HTTP authentication for JBrowse</a></li><li class="navListItem"><a class="navItem" href="/docs/paired_reads.html">Paired read viewing</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Command line</h3><ul><li class="navListItem"><a class="navItem" href="/docs/flatfile-to-json.pl.html">flatfile-to-json.pl</a></li><li class="navListItem"><a class="navItem" href="/docs/remove-track.pl.html">remove-track.pl</a></li><li class="navListItem"><a class="navItem" href="/docs/ucsc-to-json.pl.html">ucsc-to-json.pl</a></li><li class="navListItem"><a class="navItem" href="/docs/generate-names.pl.html">generate-names.pl</a></li><li class="navListItem"><a class="navItem" href="/docs/prepare-refseqs.pl.html">prepare-refseqs.pl</a></li><li class="navListItem navListItemActive"><a class="navItem" href="/docs/biodb-to-json.pl.html">biodb-to-json.pl</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">JBrowse Desktop</h3><ul><li class="navListItem"><a class="navItem" href="/docs/jbrowse_desktop.html">JBrowse Desktop</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">FAQ</h3><ul><li class="navListItem"><a class="navItem" href="/docs/faq.html">JBrowse FAQ</a></li></ul></div><div class="navGroup"><h3 class="navGroupCategoryTitle">Other topics</h3><ul><li class="navListItem"><a class="navItem" href="/docs/url_strings.html">JBrowse URL parameters</a></li><li class="navListItem"><a class="navItem" href="/docs/image_tracks.html">Pre-rendered Image Tracks</a></li><li class="navListItem"><a class="navItem" href="/docs/feature_coverage.html">Feature Coverage Tracks</a></li><li class="navListItem"><a class="navItem" href="/docs/screenshots.html">Automating screenshots of JBrowse</a></li><li class="navListItem"><a class="navItem" href="/docs/events.html">JBrowse Subscribe/Publish events</a></li><li class="navListItem"><a class="navItem" href="/docs/perl_config.html">Sample configuration bash script</a></li><li class="navListItem"><a class="navItem" href="/docs/data_formats.html">JBrowse REST API and Data APIs</a></li><li class="navListItem"><a class="navItem" href="/docs/plugins.html">Installing and writing plugins</a></li><li class="navListItem"><a class="navItem" href="/docs/cors.html">Cross-origin resource sharing (CORS)</a></li><li class="navListItem"><a class="navItem" href="/docs/sparql.html">SPARQL configuration</a></li><li class="navListItem"><a class="navItem" href="/docs/data_export.html">Data export</a></li><li class="navListItem"><a class="navItem" href="/docs/usage_stats.html">Usage Statistics</a></li></ul></div></div></section></div><script> document.addEventListener('DOMContentLoaded', function() { createToggler('#navToggler', '#docsNav', 'docsSliderActive'); createToggler('#tocToggler', 'body', 'tocActive'); const headings = document.querySelector('.toc-headings'); headings && headings.addEventListener('click', function(event) { if (event.target.tagName === 'A') { document.body.classList.remove('tocActive'); } }, false); function createToggler(togglerSelector, targetSelector, className) { var toggler = document.querySelector(togglerSelector); var target = document.querySelector(targetSelector); toggler.onclick = function(event) { event.preventDefault(); target.classList.toggle(className); }; } }); </script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><h1 class="postHeaderTitle">biodb-to-json.pl</h1></header><article><div><span><h3><a class="anchor" aria-hidden="true" id="biodb-to-jsonpl"></a><a href="#biodb-to-jsonpl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>biodb-to-json.pl</h3> <p>This script uses a <a href="/JBrowseDev/Current/Usage/ConfigFiles" title="wikilink">config file</a> to produce a set of feature tracks in JBrowse. It can be used to obtain information from any database with appropriate <a href="/Glossary#Database_Schema" title="wikilink">schema</a>, or from flat files. Because it can produce several feature tracks in a single execution, it is useful for large-scale feature data entry into JBrowse.</p> <p>Basic usage:</p> <p><code>bin/biodb-to-json.pl --conf &lt;config file&gt; [options]</code></p> <p>For a full list of the options supported by biodb-to-json.pl, run it with the --help option, like:</p> <p><code>bin/biodb-to-json.pl --help</code></p> <p>The <code>biodb-to-json.pl</code> and <code>prepare-refseqs.pl</code> can use a configuration file to connect to an existing <code>Bio::DB::*</code> database and batch-format its data for use by JBrowse</p> <h2><a class="anchor" aria-hidden="true" id="important-note"></a><a href="#important-note" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Important note</h2> <p>You should know that biodb-to-json.pl is not necessary for most common JBrowse use cases. The reasons that biodb-to-json.pl would be used is if:</p> <ul> <li>you have an actual <code>BioDB::*</code> format like Chado</li> <li>you have plain flatfile formats like GFF but also want advanced pre-configured JSON</li> </ul> <p>Note that the volvox sample data uses the second case. It loads from a GFF using <code>biodb-to-json.pl</code> but since there are many sort of advanced configurations, having those configuration pre-made in the <code>biodb-to-json.pl</code> config format helps</p> <h2><a class="anchor" aria-hidden="true" id="alternative-to-biodb-to-jsonpl"></a><a href="#alternative-to-biodb-to-jsonpl" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Alternative to biodb-to-json.pl</h2> <p>See <a href="perl_config">here</a> for an example of a simple shell script that uses <code>prepare-refseqs.pl</code> and <code>flatfile-to-json.pl</code> to to create a complete genome browser for Tomato.</p> <p>The basic syntax of the configuration file is JSON. Many of the configuration keys are quite similar to those used by <a href="http://gmod.org/wiki/GBrowse">GBrowse</a>.</p> <h2><a class="anchor" aria-hidden="true" id="database-configuration"></a><a href="#database-configuration" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Database configuration</h2> <p>The root level of the config file contains settings for the BioDB that is being used</p> <table> <thead> <tr><th>key</th><th>value</th><th>type</th></tr> </thead> <tbody> <tr><td>description</td><td>Brief description of the data source</td><td>string</td></tr> <tr><td>db_adaptor</td><td>Perl class that implements Bio::DasI.Common ones include Bio::DB::SeqFeature::StoreBio::DB::GFFBio::DB::Das::Chado</td><td>string</td></tr> <tr><td>db_args</td><td>arguments to the constructor for the specified db_adaptor</td><td>dictionary of key-value pairs</td></tr> <tr><td>TRACK DEFAULTS</td><td>default track settings</td><td>track settings dictionary</td></tr> <tr><td>tracks</td><td>settings for all the tracks</td><td>array of track settings dictionaries</td></tr> </tbody> </table> <h2><a class="anchor" aria-hidden="true" id="track-settings"></a><a href="#track-settings" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Track settings</h2> <p>The main part of the configuration file consists of the <strong>per-track settings:</strong></p> <table> <thead> <tr><th>key</th><th>value</th><th>type</th></tr> </thead> <tbody> <tr><td>track</td><td>track identifier used by the software.It's more convenient if this doesn't have any weird characters or spaces in it</td><td>string</td></tr> <tr><td>key</td><td>Human-readable label for the track</td><td>string</td></tr> <tr><td>feature</td><td>List of feature types to put into the track</td><td>array of strings</td></tr> <tr><td>autocomplete</td><td>If you want to be able to search for the features in this track, set this to one of the following strings:labelto search on the feature labelaliasto search on the feature aliasesallto search on both labels and aliases</td><td>string</td></tr> <tr><td>class</td><td>The CSS class for the feature. Look in the feature glyph list for the available options.</td><td>string</td></tr> <tr><td>category</td><td>The category this track is in, for grouping the tracks together</td><td>string</td></tr> <tr><td>urlTemplate</td><td>Template for a URL to visit if the user clicks on a feature in this track</td><td>string</td></tr> <tr><td>extraData</td><td>Extra per-feature information to send to the client; useful in the urlTemplate</td><td>dictionary of header -&gt; perl sub</td></tr> <tr><td>subfeatureClasses</td><td>Specifies what CSS class to apply to what type of subfeature</td><td>dictionary of type -&gt; CSS class</td></tr> <tr><td>arrowheadClass</td><td>CSS class for arrowheads</td><td>string</td></tr> <tr><td>clientConfig</td><td>settings to control the behavior of the client for this track, mainly zoom thresholds for when to display more information</td><td>dictionary</td></tr> </tbody> </table> <h2><a class="anchor" aria-hidden="true" id="example-biodb-to-jsonpl-config-for-volvox-sample-data"></a><a href="#example-biodb-to-jsonpl-config-for-volvox-sample-data" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Example biodb-to-json.pl config for volvox sample data</h2> <pre><code class="hljs"> { <span class="hljs-string">"tracks"</span> : [ { <span class="hljs-string">"feature"</span> : [ <span class="hljs-string">"remark"</span> ], <span class="hljs-string">"autocomplete"</span> : "<span class="hljs-type">all</span><span class="hljs-string">", "</span>track<span class="hljs-string">" : "</span>ExampleFeatures<span class="hljs-string">", "</span>class<span class="hljs-string">" : "</span>feature2<span class="hljs-string">", "</span>category<span class="hljs-string">": "</span>Miscellaneous<span class="hljs-string">", "</span>key<span class="hljs-string">" : "</span>HTMLFeatures - Example Features<span class="hljs-string">" }, { "</span>feature<span class="hljs-string">" : [ "</span>protein_coding_primary_transcript<span class="hljs-string">", "</span>polypeptide<span class="hljs-string">" ], "</span>track<span class="hljs-string">" : "</span>NameTest<span class="hljs-string">", "</span>class<span class="hljs-string">" : "</span>feature2<span class="hljs-string">", "</span>category<span class="hljs-string">": "</span>Miscellaneous<span class="hljs-string">", "</span>key<span class="hljs-string">" : "</span>HTMLFeatures - Name test track has a really long track label<span class="hljs-string">" }, { "</span>feature<span class="hljs-string">" : [ "</span>SNP<span class="hljs-string">" ], "</span>track<span class="hljs-string">" : "</span>snps<span class="hljs-string">", "</span>class<span class="hljs-string">" : "</span>triangle hgred<span class="hljs-string">", "</span>category<span class="hljs-string">": "</span>Miscellaneous<span class="hljs-string">", "</span>key<span class="hljs-string">" : "</span>HTMLFeatures - SNPs<span class="hljs-string">" }, { "</span>feature<span class="hljs-string">" : [ "</span>polypeptide_domain<span class="hljs-string">" ], "</span>track<span class="hljs-string">" : "</span>Motifs<span class="hljs-string">", "</span>class<span class="hljs-string">" : "</span>feature3<span class="hljs-string">", "</span>description<span class="hljs-string">" : 1, "</span>key<span class="hljs-string">" : "</span>HTMLFeatures - Example motifs<span class="hljs-string">", "</span>category<span class="hljs-string">": "</span>Miscellaneous<span class="hljs-string">", "</span>style<span class="hljs-string">": { "</span>label<span class="hljs-string">": "</span><span class="hljs-keyword">function</span>(feature) { <span class="hljs-keyword">return</span> feature.get(<span class="hljs-symbol">'Name</span>')+' (via JS callback)' }<span class="hljs-string">", "</span>description<span class="hljs-string">": "</span><span class="hljs-keyword">function</span>(feature) { <span class="hljs-keyword">return</span> feature.get(<span class="hljs-symbol">'Name</span>')+': '+feature.get(<span class="hljs-symbol">'Note</span>'); }<span class="hljs-string">" } }, { "</span>feature<span class="hljs-string">" : [ "</span>match<span class="hljs-string">" ], "</span>track<span class="hljs-string">" : "</span>malformed_alignments<span class="hljs-string">", "</span>class<span class="hljs-string">" : "</span>feature4<span class="hljs-string">", "</span>key<span class="hljs-string">" : "</span>HTMLFeatures - Features <span class="hljs-keyword">with</span> right-click menus<span class="hljs-string">", "</span>shortDescription<span class="hljs-string">": "</span>Features <span class="hljs-keyword">with</span> customized right-click menus<span class="hljs-string">", "</span>metadata<span class="hljs-string">": { "</span>category<span class="hljs-string">": "</span>Miscellaneous<span class="hljs-string">", "</span>Description<span class="hljs-string">": "</span>Features <span class="hljs-keyword">with</span> extensively customized right-click menus, <span class="hljs-keyword">and</span> <span class="hljs-keyword">with</span> their colors set <span class="hljs-keyword">at</span> random by a JavaScript callback.<span class="hljs-string">" }, "</span>hooks<span class="hljs-string">": { "</span>modify<span class="hljs-string">": "</span><span class="hljs-keyword">function</span>( track, feature, div ) { div.style.backgroundColor = [<span class="hljs-symbol">'green</span><span class="hljs-string">','</span>blue<span class="hljs-string">','</span>red<span class="hljs-string">','</span>orange<span class="hljs-string">','</span>purple'][Math.round(Math.random()*<span class="hljs-number">5</span>)];}<span class="hljs-string">" }, "</span>menuTemplate<span class="hljs-string">" : [ { "</span>label<span class="hljs-string">" : "</span>Item <span class="hljs-keyword">with</span> submenu<span class="hljs-string">", # hello this is a comment "</span>children<span class="hljs-string">" : [ { "</span>label<span class="hljs-string">" : "</span>Check gene on databases<span class="hljs-string">", "</span>children<span class="hljs-string">" : [ { "</span>label<span class="hljs-string">" : "</span>Query trin <span class="hljs-keyword">for</span> {name}<span class="hljs-string">", "</span>iconClass<span class="hljs-string">" : "</span>dijitIconBookmark<span class="hljs-string">", "</span>action<span class="hljs-string">": "</span>newWindow<span class="hljs-string">", "</span>url<span class="hljs-string">" : "</span>http://wiki.trin.org.au/{name}-{start}-{<span class="hljs-keyword">end</span>}<span class="hljs-string">" }, { "</span>label<span class="hljs-string">" : "</span>Query example.com <span class="hljs-keyword">for</span> {name}<span class="hljs-string">", "</span>iconClass<span class="hljs-string">" : "</span>dijitIconSearch<span class="hljs-string">", "</span>url<span class="hljs-string">" : "</span>http://example.com/{name}-{start}-{<span class="hljs-keyword">end</span>}<span class="hljs-string">" } ] }, { "</span>label<span class="hljs-string">" : "</span><span class="hljs-number">2</span>nd child <span class="hljs-keyword">of</span> demo<span class="hljs-string">" }, { "</span>label<span class="hljs-string">" : "</span><span class="hljs-number">3</span>rd child: this <span class="hljs-keyword">is</span> a track<span class="hljs-string">" } ] }, { "</span>label<span class="hljs-string">" : "</span>Open example.com <span class="hljs-keyword">in</span> an iframe popup<span class="hljs-string">", "</span>title<span class="hljs-string">" : "</span>The magnificent example.com (feature {name})<span class="hljs-string">", "</span>iconClass<span class="hljs-string">" : "</span>dijitIconDatabase<span class="hljs-string">", "</span>action<span class="hljs-string">": "</span>iframeDialog<span class="hljs-string">", "</span>url<span class="hljs-string">" : "</span>http://www.example.com?featurename={name}<span class="hljs-string">" }, { "</span>label<span class="hljs-string">" : "</span>Open popup <span class="hljs-keyword">with</span> XHR HTML snippet (btw this <span class="hljs-keyword">is</span> feature {name})<span class="hljs-string">", "</span>title<span class="hljs-string">": "</span><span class="hljs-keyword">function</span>(track,feature,div) { <span class="hljs-keyword">return</span> <span class="hljs-symbol">'Random</span> XHR HTML '+Math.random()+' title!'; }<span class="hljs-string">", "</span>iconClass<span class="hljs-string">" : "</span>dijitIconDatabase<span class="hljs-string">", "</span>action<span class="hljs-string">": "</span>xhrDialog<span class="hljs-string">", "</span>url<span class="hljs-string">" : "</span>sample_data/test_snippet.html?featurename={name}:{start}-{<span class="hljs-keyword">end</span>}<span class="hljs-string">" }, { "</span>label<span class="hljs-string">" : "</span>Popup <span class="hljs-keyword">with</span> content snippet from a <span class="hljs-keyword">function</span> <span class="hljs-title"></span>(feature {name})", "title": "<span class="hljs-keyword">function</span>(track,feature,div) { <span class="hljs-keyword">return</span> <span class="hljs-type">'Random</span> content snippet '+Math.random()+' title!'; }<span class="hljs-string">", "</span>iconClass<span class="hljs-string">" : "</span>dijitIconDatabase<span class="hljs-string">", "</span>action<span class="hljs-string">": "</span>contentDialog<span class="hljs-string">", "</span>content<span class="hljs-string">" : "</span><span class="hljs-keyword">function</span>(track,feature,div) { <span class="hljs-keyword">return</span> '&lt;h2&gt;'+feature.get(<span class="hljs-symbol">'name</span>')+'&lt;/h2&gt;&lt;p&gt;This <span class="hljs-keyword">is</span> <span class="hljs-keyword">some</span> test content!&lt;/p&gt;&lt;p&gt;This message brought to you by the number &lt;span style=\<span class="hljs-string">"font-size: 300%\"</span>&gt;'+Math.round(Math.random()*<span class="hljs-number">100</span>)+'&lt;/span&gt;.&lt;/p&gt;';} <span class="hljs-string">" }, { "</span>label<span class="hljs-string">" : "</span>Popup <span class="hljs-keyword">with</span> content snippet from string (feature {name})<span class="hljs-string">", "</span>title<span class="hljs-string">": "</span>{randomNumberTitle}<span class="hljs-string">", "</span>iconClass<span class="hljs-string">" : "</span>dijitIconDatabase<span class="hljs-string">", "</span>action<span class="hljs-string">": "</span>contentDialog<span class="hljs-string">", "</span>content<span class="hljs-string">" : "</span>&lt;h2&gt;{name}&lt;/h2&gt;&lt;p&gt;This <span class="hljs-keyword">is</span> <span class="hljs-keyword">some</span> test content about {name}, which goes from {start} to {<span class="hljs-keyword">end</span>} on the {strand} strand.&lt;/p&gt;<span class="hljs-string">" }, { "</span>label<span class="hljs-string">" : "</span>{randomNumberLabel}<span class="hljs-string">", "</span>iconClass<span class="hljs-string">" : "</span>dijitIconDatabase<span class="hljs-string">", "</span>action<span class="hljs-string">": "</span>{exampleFeatureClick}<span class="hljs-string">" } ] }, { "</span>feature<span class="hljs-string">" : [ "</span>gene<span class="hljs-string">" ], "</span>track<span class="hljs-string">" : "</span>Genes<span class="hljs-string">", "</span>class<span class="hljs-string">" : "</span>feature5<span class="hljs-string">", "</span>category<span class="hljs-string">": "</span>Transcripts<span class="hljs-string">", "</span>key<span class="hljs-string">" : "</span>CanvasFeatures - Protein-coding genes<span class="hljs-string">", "</span>metadata<span class="hljs-string">" : { "</span>ncbi_submission_model<span class="hljs-string">" : "</span><span class="hljs-keyword">Generic</span><span class="hljs-string">", "</span>insdc_first_public<span class="hljs-string">" : "</span><span class="hljs-number">2018</span>-<span class="hljs-number">05</span>-<span class="hljs-number">15</span>T00:<span class="hljs-number">00</span>:<span class="hljs-number">00</span>Z<span class="hljs-string">", "</span>Link: ENA study page<span class="hljs-string">" : "</span>http://www.ebi.ac.uk/ena/<span class="hljs-string">", "</span>library_total_amount_of_reads<span class="hljs-string">" : "</span><span class="hljs-number">3349981</span><span class="hljs-string">", "</span>insdc_secondary_accession<span class="hljs-string">" : "</span>SRS12345678<span class="hljs-string">", "</span>insdc_center_name<span class="hljs-string">" : "</span>INSDC Sample<span class="hljs-string">", "</span>ncbi_submission_package<span class="hljs-string">" : "</span><span class="hljs-keyword">Generic</span>.<span class="hljs-number">1.0</span><span class="hljs-string">", "</span>sample_name<span class="hljs-string">" : "</span>GSM12345678<span class="hljs-string">", "</span>ENA first public<span class="hljs-string">" : "</span><span class="hljs-number">2018</span>-<span class="hljs-number">05</span>-<span class="hljs-number">16</span><span class="hljs-string">", "</span>organism<span class="hljs-string">" : "</span>Volvox<span class="hljs-string">", "</span>study<span class="hljs-string">" : "</span>SRP12345678 a study <span class="hljs-keyword">of</span> volvox<span class="hljs-string">", "</span>Link: RNASeq-er analysis results<span class="hljs-string">" : "</span>ftp://ftp.ebi.ac.uk/pub/databases/arrayexpress/<span class="hljs-string">", "</span>library_size_approx<span class="hljs-string">" : "</span><span class="hljs-number">1</span>-<span class="hljs-number">5</span>mln<span class="hljs-string">", "</span>insdc_last_update<span class="hljs-string">" : "</span><span class="hljs-number">2018</span>-<span class="hljs-number">05</span>-<span class="hljs-number">15</span>T01:<span class="hljs-number">18</span>:<span class="hljs-number">23.110</span>Z<span class="hljs-string">", "</span>insdc_status<span class="hljs-string">" : "</span>live<span class="hljs-string">", "</span>developmental_stage<span class="hljs-string">" : "</span>stage <span class="hljs-number">6</span>- <span class="hljs-number">330</span> min<span class="hljs-string">", "</span>tissue<span class="hljs-string">" : "</span>embryo<span class="hljs-string">", "</span>mapping_quality_approx<span class="hljs-string">" : "</span>under <span class="hljs-number">50</span>%<span class="hljs-string">", "</span>source_name<span class="hljs-string">" : "</span>Volvox <span class="hljs-number">6</span>- <span class="hljs-number">330</span> min<span class="hljs-string">", "</span>mapping_fraction_of_uniquely_mapped_reads<span class="hljs-string">" : "</span><span class="hljs-number">0.429</span><span class="hljs-string">", "</span>ENA last update<span class="hljs-string">" : "</span><span class="hljs-number">2018</span>-<span class="hljs-number">05</span>-<span class="hljs-number">16</span><span class="hljs-string">", "</span>description_title<span class="hljs-string">" : "</span>Volvox_mRNA_rep_2_6<span class="hljs-string">" }, "</span>trackType<span class="hljs-string">": "</span>NeatCanvasFeatures/View/Track/NeatFeatures<span class="hljs-string">", "</span>onClick<span class="hljs-string">" : { "</span>action<span class="hljs-string">" : "</span>defaultDialog<span class="hljs-string">", "</span>label<span class="hljs-string">" : "</span>&lt;div style=<span class="hljs-symbol">'font</span>:normal <span class="hljs-number">12</span>px Univers,Helvetica,Arial,sans-serif'&gt;&lt;div style=<span class="hljs-symbol">'font</span>-weight:bold'&gt;Custom tooltip&lt;/div&gt;&lt;div style=<span class="hljs-symbol">'color</span>:blue;'&gt;Feature name: {name}&lt;br /&gt;Feature start: {start}&lt;br /&gt;Feature <span class="hljs-keyword">end</span>: {<span class="hljs-keyword">end</span>}&lt;/div&gt;&lt;/div&gt;<span class="hljs-string">", "</span>title<span class="hljs-string">": "</span>{<span class="hljs-keyword">type</span>} {name}<span class="hljs-string">" }, "</span>menuTemplate<span class="hljs-string">": [ { "</span>label<span class="hljs-string">" : "</span>View details<span class="hljs-string">", }, { "</span>label<span class="hljs-string">" : "</span>Zoom this gene<span class="hljs-string">", }, { "</span>label<span class="hljs-string">" : "</span>Highlight this gene<span class="hljs-string">", }, { "</span>label<span class="hljs-string">" : "</span>Popup <span class="hljs-keyword">with</span> content snippet from string (feature {name})<span class="hljs-string">", "</span>title<span class="hljs-string">": "</span>{randomNumberTitle}<span class="hljs-string">", "</span>iconClass<span class="hljs-string">" : "</span>dijitIconDatabase<span class="hljs-string">", "</span>action<span class="hljs-string">": "</span>contentDialog<span class="hljs-string">", "</span>content<span class="hljs-string">" : "</span>&lt;h2&gt;{name}&lt;/h2&gt;This <span class="hljs-keyword">is</span> <span class="hljs-keyword">some</span> test content about {<span class="hljs-keyword">type</span>} {name}, which goes from {start} to {<span class="hljs-keyword">end</span>} on the {strand} strand.<span class="hljs-string">" }], "</span>fmtDetailValue_Name<span class="hljs-string">": "</span><span class="hljs-keyword">function</span>(name,feature) { <span class="hljs-keyword">if</span>(feature.get(<span class="hljs-symbol">'type</span>')==<span class="hljs-symbol">'gene</span>') { <span class="hljs-keyword">return</span> name + ' &lt;a href=http://www.ncbi.nlm.nih.gov/gquery/?term='+name+'&gt;[NCBI custom link]&lt;/a&gt;'; } <span class="hljs-keyword">else</span> { <span class="hljs-keyword">return</span> name; } }<span class="hljs-string">", "</span>fmtDetailField_Name<span class="hljs-string">": "</span><span class="hljs-keyword">function</span>(name,feature) { <span class="hljs-keyword">if</span>(feature.get(<span class="hljs-symbol">'type</span>')==<span class="hljs-symbol">'gene</span>') { <span class="hljs-keyword">return</span> <span class="hljs-symbol">'Gene</span> Name'; } <span class="hljs-keyword">else</span> { <span class="hljs-keyword">return</span> name; } }<span class="hljs-string">", "</span>fmtDetailField_Load_id<span class="hljs-string">": "</span><span class="hljs-keyword">function</span>(name,feature) { /* remove field from dialog box */ <span class="hljs-keyword">return</span> null; }<span class="hljs-string">", "</span>fmtMetaValue_Name<span class="hljs-string">": "</span><span class="hljs-keyword">function</span>(name) { <span class="hljs-keyword">return</span> name+' [Track <span class="hljs-keyword">with</span> custom callbacks <span class="hljs-keyword">for</span> About track popup]'; }<span class="hljs-string">", "</span>fmtMetaField_Name<span class="hljs-string">": "</span><span class="hljs-keyword">function</span>(name) { <span class="hljs-keyword">return</span> <span class="hljs-symbol">'Track</span> Name'; }<span class="hljs-string">", "</span>fmtMetaDescription_Name<span class="hljs-string">": "</span><span class="hljs-keyword">function</span>(name) { <span class="hljs-keyword">return</span> '[Custom description]'; }<span class="hljs-string">" }, { "</span>feature<span class="hljs-string">" : [ "</span>mRNA<span class="hljs-string">" ], "</span>track<span class="hljs-string">" : "</span>ReadingFrame<span class="hljs-string">", "</span>trackType<span class="hljs-string">": "</span>NeatHTMLFeatures/View/Track/NeatFeatures<span class="hljs-string">", "</span>category<span class="hljs-string">" : "</span>Transcripts<span class="hljs-string">", "</span>class<span class="hljs-string">" : "</span>cds<span class="hljs-string">", "</span>phase<span class="hljs-string">": 1, "</span>key<span class="hljs-string">" : "</span>HTMLFeatures - mRNAs<span class="hljs-string">", "</span>onClick<span class="hljs-string">": { "</span>url<span class="hljs-string">": "</span>http://www.ncbi.nlm.nih.gov/gquery/?term={name}<span class="hljs-string">", "</span>label<span class="hljs-string">": "</span>Search <span class="hljs-keyword">for</span> {name} <span class="hljs-keyword">at</span> NCBI\nFeature start {start}\nFeature <span class="hljs-keyword">end</span> {<span class="hljs-keyword">end</span>}<span class="hljs-string">", "</span>title<span class="hljs-string">": "</span>NCBI search box<span class="hljs-string">" } }, { "</span>feature<span class="hljs-string">" : [ "</span>CDS:bare_predicted<span class="hljs-string">", "</span>mRNA:exonerate<span class="hljs-string">", "</span>mRNA:predicted<span class="hljs-string">" ], "</span>urlTemplate<span class="hljs-string">" : "</span>http://www.ncbi.nlm.nih.gov/gquery/?term={name}-{start}-{<span class="hljs-keyword">end</span>}<span class="hljs-string">", "</span>track<span class="hljs-string">" : "</span>CDS<span class="hljs-string">", "</span>category<span class="hljs-string">" : "</span>Transcripts<span class="hljs-string">", "</span>class<span class="hljs-string">" : "</span>cds<span class="hljs-string">", "</span>key<span class="hljs-string">" : "</span>CanvasFeatures - mixed mRNAs <span class="hljs-keyword">and</span> CDSs<span class="hljs-string">", "</span>trackType<span class="hljs-string">": "</span>CanvasFeatures<span class="hljs-string">" }, { "</span>track<span class="hljs-string">" : "</span>Transcript<span class="hljs-string">", "</span>description<span class="hljs-string">" : 1, "</span>style<span class="hljs-string">": { "</span>color<span class="hljs-string">": "</span>#E32A3A<span class="hljs-string">", "</span>description<span class="hljs-string">": "</span>customdescription<span class="hljs-string">" }, "</span>key<span class="hljs-string">" : "</span>CanvasFeatures - transcripts<span class="hljs-string">", "</span>trackType<span class="hljs-string">": "</span>JBrowse/View/Track/CanvasFeatures<span class="hljs-string">", "</span>feature<span class="hljs-string">" : [ "</span>mRNA:exonerate<span class="hljs-string">" ], "</span>category<span class="hljs-string">" : "</span>Transcripts<span class="hljs-string">", "</span>subfeatures<span class="hljs-string">" : true, "</span>showNoteInAttributes<span class="hljs-string">": true, "</span>onClick<span class="hljs-string">": "</span>{exampleFeatureClick}<span class="hljs-string">" }, { "</span>feature<span class="hljs-string">" : [ "</span>BAC<span class="hljs-string">" ], "</span>track<span class="hljs-string">" : "</span>Clones<span class="hljs-string">", "</span>class<span class="hljs-string">" : "</span>exon<span class="hljs-string">", "</span>description<span class="hljs-string">" : 1, "</span>key<span class="hljs-string">" : "</span>HTMLFeatures - Fingerprinted BACs<span class="hljs-string">", "</span>category<span class="hljs-string">": "</span>Miscellaneous<span class="hljs-string">" }, { "</span>feature<span class="hljs-string">" : [ "</span>EST_match:est<span class="hljs-string">" ], "</span>track<span class="hljs-string">" : "</span>EST<span class="hljs-string">", "</span>class<span class="hljs-string">" : "</span>est<span class="hljs-string">", "</span>key<span class="hljs-string">" : "</span>HTMLFeatures - ESTs<span class="hljs-string">", "</span>category<span class="hljs-string">": "</span>Miscellaneous<span class="hljs-string">" } ], "</span>TRACK DEFAULTS<span class="hljs-string">" : { "</span>autocomplete<span class="hljs-string">" : "</span><span class="hljs-keyword">all</span><span class="hljs-string">", "</span>class<span class="hljs-string">" : "</span>feature<span class="hljs-string">" }, "</span>db_args<span class="hljs-string">" : { "</span>-adaptor<span class="hljs-string">" : "</span>memory<span class="hljs-string">", "</span>-dir<span class="hljs-string">" : "</span>docs/tutorial/data_files/volvox.gff3<span class="hljs-string">" }, "</span>description<span class="hljs-string">" : "</span>Volvox Example Database<span class="hljs-string">", "</span>db_adaptor<span class="hljs-string">" : "</span>Bio::DB::SeqFeature::Store<span class="hljs-string">" } </span></code></pre> <p>This is the config file that is loaded for the volvox sample data. Note that additional tracks are also loaded via text files containing snippets in tracks.conf that are not included here. The pre-prepared snippets of tracks.conf configs and the biodb config represent contrasting ways of representing a pre-formatted instance configuration</p> <h2><a class="anchor" aria-hidden="true" id="using-jbrowse-with-existing-databases"></a><a href="#using-jbrowse-with-existing-databases" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Using JBrowse with Existing Databases</h2> <h3><a class="anchor" aria-hidden="true" id="extract-data-and-reformat"></a><a href="#extract-data-and-reformat" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Extract data and reformat</h3> <p>The JBrowse formatting tools <code>biodb-to-json.pl</code> and <code>prepare-refseq.pl</code> can extract data from existing databases that are supported by BioPerl <code>Bio::DB::*</code> adapters, such as GBrowse databases created by bp_seqfeature_load.pl, or Chado databases. Both tools accepts a configuration file in JSON format that contains the details about how to connect to a given database, and which data to extract from it, and which JBrowse feature tracks to create to display the data.</p> <p>For example, to extract data from a <a href="http://gmod.org/wiki/Chado">Chado</a> schema in PostgreSQL, one might start with a configuration like:</p> <pre><code class="hljs"> { &quot;description&quot;: &quot;D. melanogaster (release 5.37)&quot;, &quot;db_adaptor&quot;: &quot;Bio::DB::Das::Chado&quot;, &quot;db_args&quot;: { &quot;-dsn&quot;: &quot;dbi:Pg:dbname=fruitfly;host=localhost;port=5432&quot;, &quot;-user&quot;: &quot;yourusername&quot;, &quot;-pass&quot;: &quot;yourpassword&quot; }, ... } </code></pre> <p>In the database source name (dsn) argument, 'dbi:Pg' indicates that you are using PostgreSQL, and the dbname, host, and port were specified when the database was created with PostgreSQL's createdb command. The user and pass arguments were specified when the PostgreSQL user account was created with the createuser command. Collectively, these arguments identify the database and give the Bio::DB::Das::Chado object access to it. Other adaptors (Bio::DB::SeqFeature::Store, Bio:DB::GFF, etc.) will require similar information.</p> <h4><a class="anchor" aria-hidden="true" id="example-configuration"></a><a href="#example-configuration" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Example Configuration</h4> <p>Here is a sample configuration file, usable with <code>biodb-to-json.pl</code> and <code>prepare-refseqs.pl</code>, with each line explained. Note that, in order for this config file to work, it would be necessary to remove the grey comments (since JSON does not support them). Also, notice that the config file is divided into two parts, a header section that contains information about the database, and a body section that contains information about the feature tracks.</p> <pre><code class="hljs css languages- javascript">{ <span class="hljs-comment">//This is the header. It contains information about the database.</span> <span class="hljs-comment">// description: a brief textual description of the data source.</span> <span class="hljs-string">"description"</span>: <span class="hljs-string">"D. melanogaster (release 5.37)"</span>, <span class="hljs-comment">//db_adaptor: a perl module with methods for opening databases and extracting</span> <span class="hljs-comment">//information. This will normally be either Bio::DB::SeqFeature::Store,</span> <span class="hljs-comment">//Bio::DB::Das::Chado, or Bio::DB::GFF, but it can also be the name of any</span> <span class="hljs-comment">//other perl module that implements the Bio::SeqFeatureI interface.</span> <span class="hljs-string">"db_adaptor"</span>: <span class="hljs-string">"Bio::DB::SeqFeature::Store"</span>, <span class="hljs-comment">//db_args: arguments required to produce an instance of the db_adaptor. The</span> <span class="hljs-comment">//required arguments can be found by searching for the db_adaptor on the CPAN</span> <span class="hljs-comment">//website.</span> <span class="hljs-string">"db_args"</span>: { <span class="hljs-comment">//adaptor: With Bio::DB::SeqFeature::Store, a value of "memory"</span> <span class="hljs-comment">//for the adaptor indicates that the data is stored somewhere in</span> <span class="hljs-comment">//the file system. Alternatively, it might have been stored in a</span> <span class="hljs-comment">//database such as MySQL or BerkeleyDB.</span> <span class="hljs-string">"-adaptor"</span>: <span class="hljs-string">"memory"</span>, <span class="hljs-comment">//dir: given the "memory" argument for the adaptor, this is the</span> <span class="hljs-comment">//file system path to the location in memory where the data is</span> <span class="hljs-comment">//stored. Data will automatically be extracted from any *.gff</span> <span class="hljs-comment">//or *.gff3 files in this directory.</span> <span class="hljs-string">"-dir"</span>: <span class="hljs-string">"/Users/stephen/Downloads/dmel_r5.37"</span> }, <span class="hljs-comment">//This is the body. It contains information about the feature tracks.</span> <span class="hljs-comment">//TRACK DEFAULTS: The default options for every track.</span> <span class="hljs-string">"TRACK DEFAULTS"</span>: { <span class="hljs-comment">//class: same as 'cssClass' in flatfile-to-json.pl.</span> <span class="hljs-string">"class"</span>: <span class="hljs-string">"feature"</span> }, <span class="hljs-comment">//tracks: information about each individual track.</span> <span class="hljs-string">"tracks"</span>: [ <span class="hljs-comment">//Information about the first track.</span> { <span class="hljs-comment">//track: same as 'tracklabel' in flatfile-to-json.pl.</span> <span class="hljs-string">"track"</span>: <span class="hljs-string">"gene"</span>, <span class="hljs-comment">//key: same meaning as in flatfile-to-json.pl.</span> <span class="hljs-string">"key"</span>: <span cl