The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

wig2data.pl

A script to convert a text wiggle file to a tab-delimited text file.

SYNOPSIS

wig2data.pl [--options...] <filename>

  Options:
  --in <filename>
  --out <filename> 
  --gff
  --type <text>
  --source <text>
  --format [0,1,2,3]
  --midpoint
  --version [2,3]
  --gz
  --version
  --help

OPTIONS

The command line flags and descriptions:

--in <filename>

Specify the file name of a wig file. The file may be compressed with gzip.

--out <filename>

Specify the output filename. By default it uses the GFF type as the basename.

--gff

Indicate whether the output file should be in GFF format. If false, a standard tab delimited text file will be written with four columns: chromosome, start, stop, and score. The default value is false.

--type <text>

Specify the text string to be used as the GFF feature 'type' or 'method' (the 3rd column). By default it uses the name specified in the track line; otherwise, it uses the basename of the input wig file.

--source <text>

Specify the text string to be used as the GFF feature 'source' (the 2nd column). The default value is none.

--format [0,1,2,3]

Specify the number of decimal places to which the wig file will be formatted. Default is no formatting.

--midpoint

Specify whether (or not) a midpoint position should be calculated between the start and stop positions and be used in the output GFF file. This only pertains to BED style wig files where both the start and stop positions are reported and stepped wig files where a span value is specified. The default value is false.

--version [2,3]

Specify the GFF version. The default is version 3.

--gz

Specify whether (or not) the output file should be compressed with gzip.

--version

Print the version number.

--help

Display this POD documentation.

DESCRIPTION

This program will convert a wiggle data file into a tabbed delimited text data file. The data file will have four columns: chromosome, start, stop, and score. Alternatively, a GFF file may be written, in which case the GFF source and type values should be specified.

Wiggle files are used with the UCSC Genome Browser and can have multiple formats, including BED (also referred to as bedgraph, variable step, and fixed step. This program can convert all three formats. Improperly formatted wig files may cause the program to die. More information about wig files may be obtained from here: http://genome.ucsc.edu/goldenPath/help/wiggle.html

The start position will be the coordinate listed in the wig file. If a span value is indicated in the wiggle file, the GFF stop will equal start plus span; otherwise stop will equal the start value. The score value may be formatted to the indicated number of decimal places.

AUTHOR

 Timothy J. Parnell, PhD
 Howard Hughes Medical Institute
 Dept of Oncological Sciences
 Huntsman Cancer Institute
 University of Utah
 Salt Lake City, UT, 84112

This package is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.