GMOD

GBrowse/Uploading Wiggle Tracks

Contents

Dense Feature and Quantitative Data

Making a Wiggle Track Permanent

The upload mechanism creates a temporary private track. If you are a GBrowse administrator and wish to create a permanent wiggle track, the process is simple.

  1. Format and save a wiggle file to disk in the manner described earlier.
  2. Run the script wiggle2gff3.pl on this file to create the binary wig file. Use the –path option to specify the directory in which you want the binary wig file to be stored (default is the temporary directory), and the –method option to set the feature type (the default is “example”). This will create a binary .wig file in the indicated directory and send a GFF3 file to standard output. You should capture this output using the “>” redirect.
  3. Load the GFF3 file into your gbrowse database using bp_seqfeature_load.pl or bp_load_gff.pl.
  4. Configure a stanza for the data using the “wiggle_density” or “wiggle_xyplot” glyphs:
[TEST WIG]
feature = example
glyph   = wiggle_density
key     = my first wiggle file

If you later need to move the wig file somewhere else, simply edit the GFF3 file to change the path specified in the wigfile attribute. One neat trick is to use a relative path for the wigfile attribute, as in:

wigfile=track003.chr19.1199828298.wig

You can then use the basedir track option to tell the glyph which directory contains the wigfile:

[TEST WIG]
feature = example
glyph   = wiggle_density
basedir = /var/data/wigfiles/
key     = my first wiggle file

Specifying the Order of Glyphs within a Displayed Track

In the figure at the top of this page, there is a single GBrowse track composed of several horizontal charts, one for each time period. One way to ensure that these charts are displayed in the appropriate order is to use the “source” field in the GFF3 file, in conjunction with the sort order attribute in the stanza for the track.

For example, if the time periods are t=0, t=1, …, t=9, and the primary source is “Quelle”, then the source for the data at t=0 could be called Quelle_0, and similarly for the other time periods, and one would add the following line to the relevant stanza:

sort order = name

Illustrative Script

Assuming there is a .BED file named study_TT.BED for each time period TT, where TT is 00, 01, 02, …., then the following script illustrates how to generate the .gff3 files for subsequent uploading:

#!/bin/sh
SOURCE=Quelle  # a string representing the primary source
STUDY=study    # ${STUDY}_$t.BED
METHOD=example # the "feature"
for t in 00 01 02 03 04 05 06 07 08 09 10
do
  wiggle2gff3.pl --method $METHOD --source ${SOURCE}_$t ${STUDY}_$t.BED \
    > ${STUDY}_$t.gff3
done

Email Threads

Categories:

Documentation

Community

Tools