4c3de02785367e3178c78cfb3cb2e9d3bee383e9 mspeir Thu Feb 27 08:18:17 2025 -0800 adding note about file sorting and gzipping, refs #31612 diff --git src/hg/htdocs/goldenPath/help/bigBed.html src/hg/htdocs/goldenPath/help/bigBed.html index 1af394d52e8..606806aa4e6 100755 --- src/hg/htdocs/goldenPath/help/bigBed.html +++ src/hg/htdocs/goldenPath/help/bigBed.html @@ -51,36 +51,43 @@ 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):
Step 1. Create a BED format file following the directions here. When converting a BED file to a bigBed file, you are limited to one track of data in your input file; therefore, you must create a separate BED -file for each data track. Your BED file must be sorted. +file for each data track.
If your BED file was originally a custom track, remove any existing
"track" or "browser" lines from your BED file so that it
-contains only data. Also the input BED must be sorted, performed with this command:
-sort -k1,1 -k2,2n unsorted.bed > input.bed
+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.
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