Description
The WIG (wiggle) format is designed for display of dense continuous data such
as probability scores.
Further description of the WIG format can be
found
here
and
here but
is also repeated below.
A WIG file consists of one or more blocks where each block starts with
a
declaration line and is followed by lines defining data elements.
There are two main formatting options:
fixedStep
and
variableStep, and each block can have different formatting as
described in the block's declaration line. Note that while MotifLab is capable
of reading blocks in both of these formats, it will only produce output in
variableStep format (with span=1).
variableStep
variableStep format is designed for data with irregular intervals between data
points, and is the more commonly used format. It begins with a declaration
line, followed by two columns containing
chromosome positions
and
data values.
The declaration line begins with the word "variableStep" and is followed by
space-separated key-value pairs:
- chrom (required) - name of chromosome
- span (optional, defaults to 1) - the number of bases that each
data value should cover
The span allows data to be compressed as follows:
Without span:
variableStep chrom=chr2
300701 12.5
300702 12.5
300703 12.5
300704 12.5
300705 12.5
With span:
variableStep chrom=chr2 span=5
300701 12.5
Both of these examples will display a value of 12.5 at position 300701-300705
on chromosome 2.
fixedStep
fixedStep format is designed for data with regular intervals between data
points and is the more compact of the two wiggle formats. It begins with a
declaration line, followed by a single column of data values.
The declaration line begins with the word "fixedStep" and is followed by
space-separated key-value pairs:
- chrom (required) - name of chromosome
- start (required) - start point for the data values
- step (required) - distance between data values
- span (optional, defaults to 1) - the number of bases that each
data value should cover
Without span:
fixedStep chrom=chr3 start=400601 step=100
11
22
33
Displays the values 11, 22, 33 as single-base features, on chromosome 3 at
positions 400601, 400701 and 400801 respectively.
With span:
fixedStep chrom=chr3 start=400601 step=100 span=5
11
22
33
Displays the values 11, 22, 33 as 5-base features, on chromosome 3 at
positions 400601-400605, 400701-400705 and 400801-400805 respectively.
Data values
Wiggle element data values can be integer or real, positive or
negative. Chromosome positions are 1-relative, i.e. the first base is 1. Only
positions specified have data; unspecified positions will be empty.