bbabbd5d2566d47d923d51dbe350634783455999 mspeir Sun Oct 26 12:14:52 2025 -0700 change soe to gi, refs #35031 diff --git src/hg/htdocs/goldenPath/help/bigBed.html src/hg/htdocs/goldenPath/help/bigBed.html index 606806aa4e6..4e68d157101 100755 --- src/hg/htdocs/goldenPath/help/bigBed.html +++ src/hg/htdocs/goldenPath/help/bigBed.html @@ -15,47 +15,47 @@ Browser server. Because of this, bigBed has considerably faster display performance than regular BED when working with large data sets. The bigBed file remains on your local web-accessible server (http, https, or ftp), not on the UCSC server, and only the portion that is needed for the currently displayed chromosomal position is locally cached as a "sparse file". If you do not have access to a web-accessible server and need hosting space for your bigBed files, please see the Hosting section of the Track Hub Help documentation.
Additional indices can be created for the items in a bigBed file to support item search in track hubs. See Example #3 below for an example of how to build an additional index.
See this wiki page for help in selecting the graphing track data format that is most
appropriate for your type of data. To see an example of turning a text-based bedDetail custom track
into the bigBed format, see this
-How to make a bigBed file blog post.
Note that the bedToBigBed utility uses a substantial amount of memory:
approximately 25% more RAM than the uncompressed BED input file.
wget https://genome.ucsc.edu/goldenPath/help/examples/bedExample.txt
wget https://genome.ucsc.edu/goldenPath/help/hg19.chrom.sizes
-wget http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/bedToBigBed
+wget http://hgdownload.gi.ucsc.edu/admin/exe/linux.x86_64/bedToBigBed
chmod a+x bedToBigBed
./bedToBigBed bedExample.txt hg19.chrom.sizes myBigBed.bb
mv myBigBed.bb ~/public_html/
The last step assumes that your ~/public_html/ directory is accessible from the internet. This may not be the case
on your server. You may have to copy the file to another server and web-accessible location at your University.
Once you know the URL to the file myBigBed.bb, you can paste this URL into the custom track
box on the UCSC Genome Browser to display the file.
To create a bigBed track, follow these steps (for concrete Unix commands, see the examples below on this page):
@@ -69,53 +69,53 @@ "track" or "browser" lines from your BED file so that it contains only data.
Your file does not need to be sorted by chromosome name, but all entries for a
single chromosome must be together and sorted by chromosome start position. If you're not
sure if this is true for your BED file, it may be easiest to sort the file
using the "-sort" option for bedToBigBed.
Finally, if your BED files are large, they can be compressed using gzip (e.g. myTrack.bed.gz) and still read
by bedToBigBed.
Step 2.
Download the bedToBigBed program from the
-binary utilities directory.
+binary utilities directory.
Example #2 below shows the exact Unix command.
The bedToBigBed program can be run with several additional options. Some of these,
such as the -as and -type options, are used in examples below. The
-type option, describes the size of the bigBed file, -type=bedN[+[P]],
where N is an integer between 3 and 12 and the optional +[P] parameter
specifies the number of extra fields, not required, but preferred. Describing the size of the bigBed file
is needed for access to extra fields like name, itemRgb, etc.
Examples:-type=bed6 or -type=bed6+ or -type=bed6+3 .
For a full list of the available options, type bedToBigBed (with no arguments) on the
command line to display the usage message.
Step 3.
Use the fetchChromSizes script from the
-same directory
+same directory
to create the chrom.sizes file for the UCSC database you are working with (e.g., hg19).
If the assembly genNom is hosted by UCSC, chrom.sizes can be a URL like:
-http://hgdownload.soe.ucsc.edu/goldenPath/genNom/bigZips/genNom.chrom.sizes.
+http://hgdownload.gi.ucsc.edu/goldenPath/genNom/bigZips/genNom.chrom.sizes.
Step 4.
Use the bedToBigBed utility to create a bigBed file from your sorted BED file, using
the input.bed file and chrom.sizes files created in Steps 1 and
3:
bedToBigBed input.bed chrom.sizes myBigBed.bb
The chrom.sizes file can also be a 2bit or a chromAlias bigBed file using the following command-line arguments:
-sizesIs2Bit -- If set, the chrom.sizes file is assumed to be a 2bit file.
-sizesIsChromAliasBb -- If set, then chrom.sizes file is assumed to be a chromAlias
bigBed file or a URL to a such a file
@@ -192,40 +192,40 @@
-
Save the BED file bedExample.txt to a server, ideally one
that is accessible from the internet.
(Steps 1 and 2 in Creating a bigBed track, above).
wget https://genome.ucsc.edu/goldenPath/help/examples/bedExample.txt
-
Save the file hg19.chrom.sizes to your computer. It
contains the chrom.sizes data for the human (hg19) assembly (Step 3, above).
wget https://genome.ucsc.edu/goldenPath/help/hg19.chrom.sizes
- If you use your own file, it has to be sorted, first on the
chrom field, and secondarily on the chromStart
field. You can use the utility bedSort
-available here
+available here
or the following UNIX sort
command to do this:
sort -k1,1 -k2,2n unsorted.bed > input.bed
-
Download the
bedToBigBed utility (Step 2, above). Replace "linux" below with "macOSX"
if your server is a Mac.
- wget http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/bedToBigBed
+ wget http://hgdownload.gi.ucsc.edu/admin/exe/linux.x86_64/bedToBigBed
chmod a+x bedToBigBed
-
Run the utility to create the bigBed output file (Step 4, above):
./bedToBigBed bedExample.txt hg19.chrom.sizes myBigBed.bb
-
Place the bigBed file you just created (myBigBed.bb) on a web-accessible server
(Step 5, above).
mv myBigBed.bb ~/public_html/
At some Universities, this involves using the commands ftp, scp or rsync to copy the file to a different server, one that is accessible
from the internet. We have documentation how to find such a server.
-
Paste the URL itself into the Custom Tracks entry form or construct a track line that
points to your bigBed file (Step 5, above).
@@ -255,31 +255,31 @@
In this file, all fields (standard and non-standard) are described with a short
internal name and also a human-readable description.
For more information on AutoSql, see
Kent and Brumbaugh, 2002, as
well as examples of .as files in
this directory.
Then, the bedToBigBed program is run with the arguments -type=bed9+2 and also
-as=bedExample2.as to help correctly interpret all the columns in the data.
This example also demonstrates how to create an extra search index on the name field, and the first of the
extra fields to be used for track item search. The searchIndex setting requires the input BED data to be
case-sensitive sorted (sort -k1,1 -k2,2n), where newer versions of the tool bedToBigBed
-(available here) are enhanced to catch
+(available here) are enhanced to catch
improper input.
-
Save the BED file bedExample2.bed to your computer
(Steps 1 and 2 in Creating a bigBed track, above).
-
Save the file hg18.chrom.sizes to your computer. This file
contains the chrom.sizes for the human (hg18) assembly (Step 4, above).
-
Save the AutoSql file bedExample2.as to your
computer. This file contains descriptions of the BED fields, and is required when the BED file
contains a color field.
-
Download the
bedToBigBed utility (Step 3, above).
-
@@ -334,38 +334,38 @@
If you would like to share your bigBed data track with a colleague, the best solution is to
save your current view as a stable Genome Browser Session Link.
This will save the position and all settings that you made, all track visibilities, filters,
highlights, etc.
If you want to create URLs to your bigBed file programmatically from software,
look at Example #6 on this page.
Extracting Data from the bigBed Format
Because the bigBed files are indexed binary files, it can be difficult to extract data from them.
UCSC has developed the following programs to assist in working with bigBed formats, available from
-the binary utilities directory:
+the binary utilities directory:
-
bigBedToBed — converts a bigBed file to ASCII BED format.
-
bigBedSummary — extracts summary information from a bigBed file.
-
bigBedInfo — prints out information about a bigBed file.
These programs accept either file names or URLs to files as input. As with all UCSC
Genome Browser programs, simply type the program name (with no parameters) on the command line to
view the usage statement.
Troubleshooting
If you get an error when you run the bedToBigBed program, check your input BED file for
data coordinates that extend past the end of the chromosome. If these are present, run the
bedClip program
-(available here) to remove the problematic
+(available here) to remove the problematic
row(s) in your input BED file before using the bedToBigBed program.