Home- Genomes- Blat- Tables- Gene Sorter- PCR- Session- FAQ- Help
  BedGraph Track Format
 

The bedGraph format allows display of continuous-valued data in track format. This display type is useful for probability scores and transcriptome data. This track type is similar to the wiggle (WIG) format, but unlike the wiggle format, data exported in the bedGraph format are preserved in their original state. This can be seen on export using the table browser. For more details on data compression in wiggle tracks see the notes section of the wiggle track description page. If you have a very large data set and you would like to keep it on your own server, you should use the bigWig data format.

General Structure

The bedGraph format is line-oriented. Bedgraph data are preceeded by a track definition line, which adds a number of options for controlling the default display of this track.

Following the track definition line are the track data in four column BED format.

  chromA  chromStartA  chromEndA  dataValueA
  chromB  chromStartB  chromEndB  dataValueB

Parameters for bedGraph track definition lines

All options are placed in a single line separated by spaces:
  track type=bedGraph name=track_label description=center_label
        visibility=display_mode color=r,g,b altColor=r,g,b
        priority=priority autoScale=on|off alwaysZero=on|off
        gridDefault=on|off maxHeightPixels=max:default:min
        graphType=bar|points viewLimits=lower:upper
        yLineMark=real-value yLineOnOff=on|off
        windowingFunction=maximum|mean|minimum smoothingWindow=off|2-16

(Note if you copy/paste the above example, you have to remove the carriage returns.)

The track type is REQUIRED, and must be bedGraph:
  type=bedGraph
The remaining values are OPTIONAL. The wiggle documentation contains details on these options. A functional description of these options can be seen in the track configuration description. (Custom tracks do not have interactive configuration options.)

Data Values

Bedgraph track data values can be integer or real, positive or negative values. Chromosome positions are specified as 0-relative. The first chromosome position is 0. The last position in a chromosome of length N would be N - 1. Only positions specified have data. Positions not specified do not have data and will not be graphed. All positions specified in the input data must be in numerical order. The bedGraph format has four columns of data:
 chrom chromStart chromEnd dataValue
Note: These coordinates are zero-based, half-open.

Example

This example specifies 9 separate data points in three tracks on chr19 in the region 59,302,001 to 59,304,701. To view this example as a custom track in the Genome Browser, copy the text and paste it into the browser annotation track text box.

browser position chr19:49302001-49304701
browser hide all
browser pack refGene encodeRegions
browser full altGraph
#	300 base wide bar graph, autoScale is on by default == graphing
#	limits will dynamically change to always show full range of data
#	in viewing window, priority = 20 positions this as the second graph
#	Note, zero-relative, half-open coordinate system in use for bedGraph format
track type=bedGraph name="BedGraph Format" description="BedGraph format" visibility=full color=200,100,0 altColor=0,100,200 priority=20
chr19 49302000 49302300 -1.0
chr19 49302300 49302600 -0.75
chr19 49302600 49302900 -0.50
chr19 49302900 49303200 -0.25
chr19 49303200 49303500 0.0
chr19 49303500 49303800 0.25
chr19 49303800 49304100 0.50
chr19 49304100 49304400 0.75
chr19 49304400 49304700 1.00