Quick Start Guide to Organizing Track Hubs into Groupings

Track hubs allow for displaying many tracks, therefore organizing your tracks using grouping settings will help your users find related information. Below is a basic example hub illustrating the use of container multiWig, compositeTrack on, and superTrack on lines.

STEP 1: In a publicly-accessible directory, copy the hub.txt, genomes.txt, trackDb.txt, and examplePage.html files using the following command:

wget -r --no-parent --reject "index.html*" -nH --cut-dirs=3 http://genome.ucsc.edu/goldenPath/help/examples/hubExamples/hubGroupings/ 

Alternatively, if you do not have wget installed, use curl:

curl -O http://genome.ucsc.edu/goldenPath/help/examples/hubExamples/hubGroupings/hub.txt
curl -O http://genome.ucsc.edu/goldenPath/help/examples/hubExamples/hubGroupings/genomes.txt
mkdir hg19 cd hg19 curl -O http://genome.ucsc.edu/goldenPath/help/examples/hubExamples/hubGroupings/hg19/trackDb.txt curl -O http://genome.ucsc.edu/goldenPath/help/examples/hubExamples/hubGroupings/hg19/examplePage.html

If you do not have curl, you can use a text editor and directly recreate the above three files.

STEP 2: Paste your hub.txt link (http://yourURL/hub.txt) into the My Hubs tab of the Track Data Hubs page, then click the "Genome Browser" link from the top bar. Alternatively build a URL that will directly load your hub in hgTracks:

http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg19&hubUrl=http://yourURL/hub.txt

The URL should work the same as using the original data just copied: http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg19&hubUrl=http://genome.ucsc.edu/goldenPath/help/examples/hubExamples/hubGroupings/hub.txt

STEP 3: Congratulations! Your hub should display!

If you are having problems, be sure all your files and the hg19 directory are publicly accessible. For hubs to work, your server must also accept byte-ranges. You can check using the following command to verify "Accept-Ranges: bytes" displays:

curl -I http://yourURL/hub.txt

The three types of track groupings

Now that you have the hub copied from above, start to edit some of the trackDb.txt settings to understand how they work. Read more about trackDb settings in the definition document. Note that the Browser waits 5 minutes before checking for any changes to these files. When editing hub.txt, genomes.txt, trackDb.txt, and related hub files shorten this delay by adding udcTimeout=1 to your URL. For more information, please see the Debugging and Updating Track Hubs section of the Track Hub User Guide. For more detailed instructions on setting up a hub, please see the Setting Up Your Own Track Hub section of the Track Hub User Guide.

Resources

Understanding multiWig tracks

track multiWigUniqueTrackName
type bigWig
container multiWig
aggregate transparentOverlay
showSubtrackColorOnUi on
maxHeightPixels 500:100:8
...
    track uniqueNameWithoutSpaces
    type bigWig
    parent multiWigUniqueTrackName
    color 255,0,0 

A multiWig starts with a few related bigWig files that you want to display together. The container multiWig line allows for this track to be later referenced as parent multiWigUniqueTrackName in each of the related bigWig files. The aggregate transparentOverlay line defines the way the multiWigs should appear with options being transparentOverlay/stacked/solidOverlay. The showSubtrackColorOnUi on line shows the track colors on the track setting page and the maxHeightPixels 500:100:8 sets the maximum (500), default (100), and minimum (8) pixel heights for the track. Read all about multiWigs here. See an example trackDb.txt.

Understanding composite tracks

track uniqueCompositeTrackName
compositeTrack on
...
    track uniqueNameWithoutSpaces
    parent uniqueCompositeTrackName on
    ...
    track newUniqueNameWithoutSpaces
    parent uniqueCompositeTrackName off 

A composite track groups together related tracks, usually but not necessarily of a similar type, that you want to display together (referred to as "subtracks"). If you want to organize tracks into a hierarchy and there is a single level of grouping, use a composite. For example, you could group together called variants or ChIP-seq peaks with their underlying BAM reads or sequencing coverage. The compositeTrack on line defines the parent track that will be later referenced as parent uniqueCompositeTrackName off in each subtrack's stanza. Either "on" or "off" can be used to set a subtrack to be displayed or not displayed by default. Composite tracks can be broken apart further to group very similar tracks with the trackDb use of subGroups and views, not demonstrated here. Read all about composite tracks here. See an example trackDb.txt.


Understanding super-tracks

track uniqueSuperTrackName
superTrack on show
...
    track uniqueNameWithoutSpaces
    parent uniqueSuperTrackName
    ...
    track newUniqueNameWithoutSpaces
    parent uniqueSuperTrackName
    ...
    track uniqueCompositeTrackNameInSuperTrack
    compositeTrack on
    parent uniqueSuperTrackName
    ...
       track uniqueNameWithoutSpaces
       parent uniqueCompositeTrackNameInSuperTrack on
       ...
       track newUniqueNameWithoutSpaces
       parent uniqueCompositeTrackNameInSuperTrack off 

A super-track groups together different types of tracks - typically composites - in a high level folder. Use a super-track if you need a second layer of hierarchy after composites. For example, you could have a composite with RNA-seq results and a composite with ChIP-Seq results grouped together into a super-track describing a cell line. Super-tracks contain composite tracks or container multiWigs, but not vice versa. The superTrack on show line allows for this track to be later referenced as parent uniqueSuperTrackName in each of the children subtracks (note how it is only required for direct children, and not for subtracks contained in a composite inside the super-track). The "show" is optional and sets the super-track to display by default. Read all about super-tracks here. See an example trackDb.txt.