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.

Note: there is now a useOneFile on hub setting that allows the hub properties to be specified in a single file. More information about this setting can be found on the Genome Browser User Guide.

STEP 2: Paste your hub.txt link (http://yourURL/hub.txt) into the Connected 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 supertracks

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 supertrack groups together different types of tracks - typically composites - in a high level folder. Use a supertrack 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 supertrack describing a cell line. Supertracks 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 supertrack -more below). The "show" is optional and sets the supertrack to display by default. It may help to think of the original declaring supertrack stanza as a light switch that by default is off, and can be flipped on by adding show.

All tracks that claim membership to the supertrack can then set their own visibilities in lower stanzas by declaring settings such as by having the parent line and a separate visibility dense line. If no visibility setting is defined for a track, the default setting of hide is assigned. This can cause confusion if one mistakenly tries to set visibilities only at the top parent supertack stanza and leaves out visibility declarations for all children.

Also do not confuse the parent line with how it is used in composites. For example, in supertracks DO NOT try something like parent uniqueSuperTrackName [off/on], where the [off/on] will only work with composite tracks. In the above nested example you do see track uniqueNameWithoutSpaces with a setting line specific only to the fact it is a child of a composite, parent uniqueCompositeTrackNameInSuperTrack on. The parent of the child composite track is in turn is a child to a supertrack declared by parent uniqueSuperTrackName. Read all about supertracks here. See an example trackDb.txt.