NAME

Bio::ToolBox::db_helper::wiggle

DESCRIPTION

This module provides support for legacy binary wiggle (.wib) files. These are not BigWig files, which are supported through the Bio::ToolBox::Data::db_helper::bigwig module. Rather, these are condensed binary representations of text wiggle files developed for use with the "/gmod.org/gbrowse GBrowse" in http:. Use the modern BigWig adapter for improved and more efficient access.

USAGE

The module requires Bio::Perl and Bio::Graphics to be installed.

In general, this module should not be used directly. Use the methods available in Bio::ToolBox::db_helper or <Bio::ToolBox::Data>.

All subroutines are exported by default.

collect_wig_scores()

This subroutine will collect dataset scores from a binary wig file (.wib).

The subroutine is passed a parameter array reference. See below for details.

The subroutine returns an array or array reference of the requested dataset values found within the region of interest.

collect_wig_position_scores()

This subroutine will collect the score values from a binary wig file for the specified database region keyed by position.

The subroutine is passed a parameter array reference. See below for details.

The subroutine returns a hash or hash reference of the requested dataset values found within the region of interest keyed by position. Note that only one value is returned per position, regardless of the number of dataset features passed.

Binary wiggle files

Binary wiggle files (.wib) files are referenced via a SeqFeature object. These features are typically stored from a Bio::DB::SeqFeature::Store database. A single feature representing the dataset is present across each chromosome. The feature should contain an attribute ('wigfile') that references the location of the binary file representing the dataset scores. The file is opened and the values extracted from the region of interest.

For loading wig files into a Bio::DB::SeqFeature::Store database, see the perl script 'wiggle2gff3.pl' included with the Bio::Graphics distribution, as well as Bio::Graphics::Wiggle::Loader.

To speed up the program and avoid repetitive opening and closing of the files, the opened wig file object is stored in a global hash in case it is needed again.

Data Collection Parameters Reference

The data collection subroutines are passed an array reference of parameters. The recommended method for data collection is to use get_segment_score() method from Bio::ToolBox::db_helper.

The parameters array reference includes these items:

1. The chromosome or seq_id

Not used here.

1. The start position of the segment to collect
3. The stop or end position of the segment to collect
4. The strand of the segment to collect

Should be standard BioPerl representation: -1, 0, or 1.

5. The strandedness of the data to collect

A scalar value representing the desired strandedness of the data to be collected. Acceptable values include "sense", "antisense", or "all". Only those scores which match the indicated strandedness are collected.

6. The method for combining scores.

Acceptable values include score and count.

* score returns the basepair coverage of alignments over the 
region of interest

* count returns the number of alignments that overlap the 
search region. 
7. A database object.

not used here.

8 and higher. Database features.

These are the SeqFeature objects that contain the file path to the binary wig files.

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.