bedGraph track is used for showing numerical values along the genomic coordinate. In the track, the genome is separated into a set of intervals and each interval is assigned to a specific numerical value.
Each line of a bedGraph track file contains four fields:
- chromosome name
- start, 0-based
- numerical value
Take following steps to prepare a bedGraph track for browser display.
1. sort the track file using "sort" command:
sort -k1,1 -k2,2n old_file > new_file
2. compress file
3. index file
tabix -p bed new_file.gz
4. move files "new_file.gz" and "new_file.gz.tbi" to a web server. The two files must be in the same directory. Obtain the URL to "new_file.gz" for submission.
Converting bigWig to bedGraph
- if you have compiled the UCSC kent source tree, you would get an utility called bigWigToBedGraph:
$ bigWigToBedGraph bigWigToBedGraph - Convert from bigWig to bedGraph format. usage: bigWigToBedGraph in.bigWig out.bedGraph options: -chrom=chr1 - if set restrict output to given chromosome -start=N - if set, restrict output to only that over start -end=N - if set, restict output to only that under end -udcDir=/dir/to/cache - place to put cache for remote bigBed/bigWigs
- You could use this tool to convert bigWig files to bedGraph, and then tabix it as above.
- If you didn't compile the Kent source, you could also download this utility (compiled by UCSC) from UCSC website: http://hgdownload.soe.ucsc.edu/admin/exe/