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:
input.wig
in step 5 below.wigToBigWig
program from the
directory of binary utilities.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.wigToBigWig
utility like so:
wigToBigWig input.wig chrom.sizes myBigWig.bw
myBigWig.bw
) to a http, https, or ftp
location. track type=bigWig name="My Big Wig" description="A Graph of Data from My Lab"
bigDataUrl=http://myorg.edu/mylab/myBigWig.bw
autoScale <on|off> # default is on alwaysZero <on|off> # default is off gridDefault <on|off> # default is off maxHeightPixels <max:default:min> # default is 128:128:11 graphType <bar|points> # default is bar viewLimits <lower:upper> # default is range found in data viewLimitsMax <lower:upper> # suggested bounds of viewLimits, but not enforced yLineMark <real-value> # default is 0.0 yLineOnOff <on|off> # default is off windowingFunction <mean+whiskers|maximum|mean|minimum> # default is maximum, mean+whiskers is recommended smoothingWindow <off|[2-16]> # default is off transformFunc <NONE|LOG> # default is NONE
For further information on custom bigWig track settings, see the Track Database Definition Document. For further information on how bigWig settings are used in native Browser tracks, see the Configuring graph-based tracks page.
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 pasting the URL
http://genome.ucsc.edu/goldenPath/help/examples/bigWigExample.bw
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 at position chr21:33,031,597-33,041,570 in the
Genome Browser.
Alternatively, you can construct 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.
In this example, you will create your own bigWig file from an existing wiggle file.
wigToBigWig
utility (see step 3). wigToBigWig wigVarStepExample.gz hg19.chrom.sizes
myBigWig.bw
myBigWig.bw
) on a web-accessible server
(see step 6).To create a bigWig track from a bedGraph file, follow these steps:
in.bedGraph
in step 5 below.bedGraphToBigWig
program from the
directory of binary utilities.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.bedGraphToBigWig
utility
like so:
bedGraphToBigWig in.bedGraph chrom.sizes myBigWig.bw
myBigWig.bw
) to a http, https, or ftp
location.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.
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.bigWigAverageOverBed
— this program computes the average score of a bigWig over
each bed, which may have introns.bigWigInfo
— this program prints out information about a bigWig file.These utilities accept paths to files or alternatively URLs to file. As with all UCSC Genome Browserprograms, simply type the program name at the command line with no parameters to see the usage statement.
In some cases, bigWigSummary and bigWigAverageOverBed will produce very similar results, but in other cases, the results may differ. This is due to differences in how the utilities handle data. Summary levels are used with bigWigSummary, so some rounding errors and border conditions are encountered when extracting data over relatively small regions. The bigWigAverageOverBed utility uses the actual data which ensures the highest level of accuracy.