Home- Genomes- Blat- Tables- PCR- Session- FAQ- Help
  bigWig Track Format
 

The bigWig format is for display of dense, continuous data that will be displayed in the Genome Browser as a graph. BigWig files are created initially from wiggle (wig) type files, using the program wigToBigWig. The resulting bigWig files are in an indexed binary format. The main advantage of the bigWig files is that only the portions of the files needed to display a particular region are transferred to UCSC, so for large data sets bigWig is considerably faster than regular wiggle files. The bigWig file remains on your web accessible server (http, https, or ftp), not on the UCSC server. Only the portion that is needed for the chromosomal position you are currently viewing is locally cached as a "sparse file".

Wiggle data must be continuous and the elements must be equally sized. If your data is sparse or contains elements of varying size, use the bedGraph format instead of the wiggle format. If you have a very large bedGraph data set, you can convert it to the bigWig format using the bedGraphToBigWig program. For details, see Example Three below.

See this page for help in selecting a graphing track data format that is most approriate for the type of data you have.

Please note that the wigToBigWig utility uses a lot of memory; somewhere on the order of 1.5 times more memory than the uncompressed wiggle input file. We recommend that as you run the program you monitor your memory usage by using the top command. The bedGraphToBigWig utility uses somewhere on the order of 1/4 times more RAM than the uncompressed bedGraph input file.

To create a bigWig track from a wiggle file, follow these steps:

  1. Create a wig format file following the directions here. Note that when converting a wig file to a bigWig file, you are limited to one track of data in your input file; you must create a separate wig file for each data track. Note that this is the file that is referred to as input.wig in step 5 below.
  2. Remove any existing 'track' or 'browser' lines from your wig file so that it contains only data.
  3. Download the wigToBigWig program from the directory of binary utilities.
  4. Use the fetchChromSizes script from the same directory to create the chrom.sizes file for the UCSC database you are working with (e.g. hg19). Note that this is the file that is referred to as chrom.sizes in step 5 below.
  5. Create the bigWig file from your wig file using the wigToBigWig utility like so: wigToBigWig input.wig chrom.sizes myBigWig.bw
    (Note that the wigToBigWig program also accepts a gzipped wig input file.)
  6. Move the newly created bigWig file (myBigWig.bw) to a http, https, or ftp location.
  7. Construct a custom track using a single track line. Note that any of the track attributes listed on the wiggle track format page are applicable to tracks of type bigWig. The most basic version of the "track" line will look something like this:
    track type=bigWig name="My Big Wig" description="A Graph of Data from My Lab" bigDataUrl=http://myorg.edu/mylab/myBigWig.bw
  8. Paste this custom track line into the text box in the custom track management page.

Example One

In this example, you will use an existing bigWig file to create a bigWig custom track. A bigWig file that spans chromosome 21 on the hg19 assembly has been placed on our http server. You can create a custom track using this bigWig file by constructing a "track" line that references this file like so:

track type=bigWig name="Example One" description="A bigWig file" bigDataUrl=http://genome.ucsc.edu/goldenPath/help/examples/bigWigExample.bw

Include the following "browser" line to ensure that the custom track opens at the correct position:

browser position chr21:33,031,597-33,041,570

Paste the "browser" line and "track" line into the custom track management page for the human assembly hg19 (Feb. 2009), then press the submit button. On the following page, press the chr21 link in the custom track listing to view the bigWig track in the Genome Browser.

Example Two

In this example, you will create your own bigWig file from an existing wiggle file.

  • Save this wiggle file to your machine (this satisfies steps 1 and 2 above).
  • Save this text file to your machine. It contains the chrom.sizes for the human (hg19) assembly (this satisfies step 4 above).
  • Download the wigToBigWig utility (see step 3).
  • Run the utility to create the bigWig output file (see step 5):
    wigToBigWig wigVarStepExample.gz hg19.chrom.sizes myBigWig.bw
  • Place the bigWig file you just created (myBigWig.bw) on a web-accessible server (see step 6).
  • Construct a "track" line that points to your bigWig file (see step 7).
  • Create the custom track on the human assembly hg19 (Feb. 2009), and view it in the genome browser (see step 8). Note that the original wiggle file spans only chromsome 21.

Example Three

To create a bigWig track from a bedGraph file, follow these steps:

  1. Create a bedGraph format file following the directions here. Note that when converting a bedGraph file to a bigWig file, you are limited to one track of data in your input file; you must create a separate bedGraph file for each data track. Note that this is the file that is referred to as in.bedGraph in step 5 below.
  2. Remove any existing 'track' or 'browser' lines from your bedGraph file so that it contains only data.
  3. Download the bedGraphToBigWig program from the directory of binary utilities.
  4. Use the fetchChromSizes script from the same directory to create the chrom.sizes file for the UCSC database you are working with (e.g. hg19). Note that this is the file that is referred to as chrom.sizes in step 5 below.
  5. Create the bigWig file from your bedGraph file using the bedGraphToBigWig utility like so: bedGraphToBigWig in.bedGraph chrom.sizes myBigWig.bw
    (Note that the bedGraphToBigWig program DOES NOT accept a gzipped bedGraph input file.)
  6. Move the newly created bigWig file (myBigWig.bw) to a http, https, or ftp location.
  7. Construct a custom track using a single track line. Note that any of the track attributes listed on the wiggle track format page are applicable to tracks of type bigWig. The most basic version of the "track" line will look something like this:
    track type=bigWig name="My Big Wig (from bedGraph)" description="A Graph of bedGraph Data from My Lab" bigDataUrl=http://myorg.edu/mylab/myBigWig.bw
  8. Paste this custom track line into the text box in the custom track management page.

Sharing Your Data with Others

If you would like to share your bigWig data track with a colleague, learn how to create a URL by looking at Example 11 on this page.

Extracting Data from the bigWig Format

Because the bigWig files are indexed binary files, they can be difficult to extract data from. Consequently, we have developed the following two programs, both of which are available from the directory of binary utilities.

  • bigWigToBedGraph — this program converts a bigWig file to ASCII bedGraph format.
  • bigWigToWig — this program converts a bigWig file to wig format.
  • bigWigSummary — this program extracts summary information from a bigWig file.
  • bigWigInfo — this program prints out information about a bigWig file.
As with all UCSC Genome Browser programs, simply type the program name at the command line with no parameters to see the usage statement.