| |
The wiggle (WIG) format allows display of
continuous-valued data in track format. This display type is
useful for GC percent, probability scores, and
transcriptome data.
General Structure The .wig format is
line-oriented.
Wiggle 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, which can be entered in several
different formats described below. Three
formats were developed to allow the file to be
written most compactly, depending on the density of
the data. When possible, please use the
variableStep or fixedStep data types.
The BED format is the most inefficient format and
is not capable of loading as many data points as the other
two formats.
- BED format with no declaration line and four columns of data:
chromA chromStartA chromEndA dataValueA
chromB chromStartB chromEndB dataValueB
- variableStep two column data; started by a
declaration line and followed with chromosome positions and data values:
variableStep chrom=chrN [span=windowSize]
chromStartA dataValueA
chromStartB dataValueB
- fixedStep single column data; started by a
declaration line and followed with data values:
fixedStep chrom=chrN start=position step=stepInterval [span=windowSize]
dataValue1
dataValue2
Parameters for wiggle track definition lines
All options are placed in a single line separated by spaces:
track type=wiggle_0 name=track_label description=center_label \
visibility=display_mode color=r,g,b altColor=r,g,b \
priority=priority autoScale=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
The track type with version is REQUIRED, and it currently must be wiggle_0:
type wiggle_0
The remaining values are OPTIONAL:
name trackLabel # default is "User Track"
description centerlabel # default is "User Supplied Track"
visibility full|dense|hide # default is hide (will also take numeric values 2|1|0)
color RRR,GGG,BBB # default is 255,255,255
altColor RRR,GGG,BBB # default is 128,128,128
priority N # default is 100
autoScale on|off # default is off
gridDefault on|off # default is off
maxHeightPixels max:default:min # default is 128:128:11
graphType bar|points # default is bar
viewLimits lower:upper # default is range found in data
yLineMark real-value # default is 0.0
yLineOnOff on|off # default is off
windowingFunction maximum|mean|minimum # default is maximum
smoothingWindow off|[2-16] # default is off
A functional description of these options can be
seen in the Wiggle
track configuration description. (Custom tracks do not
have interactive configuration options).
Data Values
Wiggle track data values can be integer or real,
positive or negative values. Chromosome positions
are specified as 1-relative. The first chromosome
position is 1. The last position in a chromosome
of length N would be N. 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 BED format is a subset of the previous
description, with four columns of data:
chrom chromStart chromEnd dataValue
Note: These BED coordinates are
zero-based,
half-open, unlike the 1-relative coordinates for the
variableStep and fixedStep formats.
In many cases this format will be too verbose to
conveniently specify a large number of data values.
When possible, please use the variableStep or
fixedStep data types. The BED format
is the most inefficient format and is not capable of
loading as many data points as the other two formats.
Two other two methods of specifying
data were developed to be more space efficient.
- The variableStep two column data format is the most commonly used
data format. It begins with a declaration line:
variableStep chrom=chrN [span=windowSize]
and is followed with two column data representing
chromosome position and data value. The declaration line starts with the word
variableStep and is followed by a
specification for chromosome. The optional
span allows more efficient encoding of a
single value for a contiguous run of bases
beginning at the specified position.
- The fixedStep format takes a single
column data, and is used when there is a regular
interval between new data values. This is used for
data values that apply to a constant size run of bases. The fixedStep
single column data format begins with the
declaration line:
fixedStep chrom=chrN start=chromStart step=stepInterval [span=windowSize]
and is followed by a single column of data values.
The declaration line starts with the keyword
fixedStep, and it must include specifications for
chrom, start, and step.
Example
This example specifies 28 separate data points in three
tracks on chr19 in the region 59,302,001 to 59,311,000.
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:59302001-59311000
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 bed format
track type=wiggle_0 name="Bed Format" description="BED format" \
visibility=full color=200,100,0 altColor=0,100,200 priority=20
chr19 59302000 59302300 -1.0
chr19 59302300 59302600 -0.75
chr19 59302600 59302900 -0.50
chr19 59302900 59303200 -0.25
chr19 59303200 59303500 0.0
chr19 59303500 59303800 0.25
chr19 59303800 59304100 0.50
chr19 59304100 59304400 0.75
chr19 59304400 59304700 1.00
# 150 base wide bar graph at arbitrarily spaced positions,
# threshold line drawn at y=11.76
# autoScale off viewing range set to [0:25]
# priority = 10 positions this as the first graph
# Note, one-relative coordinate system in use for this format
track type=wiggle_0 name="variableStep" description="variableStep format" \
visibility=full autoScale=off viewLimits=0.0:25.0 color=255,200,0 \
yLineMark=11.76 yLineOnOff=on priority=10
variableStep chrom=chr19 span=150
59304701 10.0
59304901 12.5
59305401 15.0
59305601 17.5
59305901 20.0
59306081 17.5
59306301 15.0
59306691 12.5
59307871 10.0
# 200 base wide points graph at every 300 bases, 50 pixel high graph
# autoScale off and viewing range set to [0:1000]
# priority = 30 positions this as the third graph
# Note, one-relative coordinate system in use for this format
track type=wiggle_0 name="fixedStep" description="fixed step" visibility=full \
autoScale=off viewLimits=0:1000 color=0,200,100 maxHeightPixels=100:50:20 \
graphType=points priority=30
fixedStep chrom=chr19 start=59307401 step=300 span=200
1000
900
800
700
600
500
400
300
200
100
| |