
INTRODUCTION:  Where is this bigWig and bigBed system useful ?

    Your wiggle data or bed track files are too large to load as
    custom tracks in the normal custom track submission system.
    This system will convert your very large file into a much larger
    file which can be used without transferring it to the genome browser.
    Place this special file on your WEB server or FTP server and supply
    a URL to it for your custom track submission.  Rather than trying
    to transfer the entire file, only small parts of it will transfer
    as you view the track in the genome browser.  The small parts transferred
    will accumulate at UCSC as a cache for later reuse without any
    additional transfer.

========================================================================

BIGWIG - BigWig files store continuous data that is displayed as a graph
in the Genome Browser, much as wig files do.  BigWig files in fact are
created initially from wig 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 transfered to UCSC, so for
large data sets BigWig is considerably faster than straight wig.  The
steps for creating a bigWig track are:

1) Download wigToBigWig from the directory of binary utilities:
	 http://genome-test.cse.ucsc.edu/admin/exe/linux.x86_64/
2) Use the fetchChromSizes script from this same directory to
	fetch the chrom.sizes file for the UCSC database you are
	working with.
3) Create wig format files following the definitions in:
	http://genome.ucsc.edu/goldenPath/help/wiggle.html
4) Run the command line
	wigToBigWig input.wig.gz chrom.sizes myBigWig.bw
    if your input.wig.gz file has 'track' and 'browser' lines:
	zcat input.wig.gz | egrep -v "^track|^browser" \
	    wigToBigWig stdin chrom.sizes myBigWig.bw
    make sure you do not have more than one track of data in your input file.
5) Move the output bigWig file to a http, https, or ftp site.
6) Create a custom track with just the track line.
	This will look something like:
       track type=bigWig name="My Big Wig" description="A Graph of Cool Data from My Lab" bigDataUrl=http://myorg.edu/mylab/myBigWig.bw

   (track lines are single lines, no line breaks are allowed)

7) Paste this custom track line into the text box in the
	custom track management page:
    http://genome-test.cse.ucsc.edu/cgi-bin/hgCustom


========================================================================

BIGBED - BigBed files store annotation items that can either be simple, or a
linked collection of exons, much as bed files do.  BigBed files in fact are
created initially from bed files, using the program bedToBigBed.   The
resulting bigBed files are in an indexed binary format.  The main advantage of
the bigBed files is that only the portions of the files needed to display a
particular region are transfered to UCSC, so for large data sets bigBed is
considerably faster than straight bed.  The steps for creating a bigBed track
are:

1) Download bedToBigBed from the directory of binary utilities:
	 http://genome-test.cse.ucsc.edu/admin/exe/linux.x86_64/
2) Use the fetchChromSizes script from this same directory to
	fetch the chrom.sizes file for the UCSC database you are
	working with.
3) Create bed format files following the definitions in:
	http://genome.ucsc.edu/goldenPath/help/customTrack.html#BED
4) Run the command line
       bedToBigBed input.bed.gz chrom.sizes myBigBed.bb
    if your input.bed.gz file has 'track' and 'browser' lines:
	zcat input.bed.gz | egrep -v "^track|^browser" \
	    bedToBigBed stdin chrom.sizes myBigWig.bb
    make sure you do not have more than one track of data in your input file.
5) Move the output bigBed file to a http, https, or ftp site.
6) Create a custom track with just the track line.
	This will look something like:
       track type=bigBed name="My Big Bed" description="Cool Genome Annotations from My Lab" bigDataUrl=http://myorg.edu/mylab/myBigBed.bb

   (track lines are single lines, no line breaks are allowed)

7) Paste this custom track line into the text box in the
	custom track management page:
    http://genome-test.cse.ucsc.edu/cgi-bin/hgCustom

BigBeds also can store extra columns past the predefined bed columns.  In this
case you should include a .as (AutoSQL) format file describing the fields.
See http://www.linuxjournal.com/article/5949 for information on AutoSQL 

========================================================================
	$Id: bigBedWigs.txt,v 1.4 2009/08/12 21:20:26 galt Exp $
========================================================================
