UCSC Genome Bioinformatics

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 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 starts with related files, usually all of the same type, that you want to group and display together (referred to as "subtracks"). 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 starts with several different types of track data that you want to group together in a high level folder. Super-tracks can contain composite tracks and 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.