Lincoln D. Stein >
GBrowse-2.56 >
Bio::Graphics::Browser2::Plugin::Spectrogram

Module Version: 1.1
Bio::Graphics::Browser2::Plugin::Spectrogram

This module is not used directly. It is an 'annotator' plugin for tehe Generic Genome Browser.

The Spectrogram plugin builds up a spectrogram for digitized DNA sequence using the short-time fourier transform (STFT) method, adapted from classical digital signal processing methods. A sliding window of variable size and overlap is used to calculate each "column" of the spectrogram, where the column width is equal to the step, or overlap between windows.

For each window, we:

1) digitize the DNA by creating four binary indicator sequences:

G A T C C T C T G A T T C C A A G 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 A 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 1 T 0 0 1 0 0 1 0 1 0 0 1 1 0 0 0 0 C 0 0 0 1 1 0 1 0 0 0 0 0 1 1 0 0

2) take the discrete fourier transform (DFT) for each of the four indicator sequences and square the values to get the magnitude.

3) create a Bio::Graphics::Feature object that contains the spectrogram data as attributes. The features are passed back to gbrowse as parts of a Bio::Graphics::Featurefile object.

The calculations for the real DFT are handled by the xs module Math::FFT. The actual algorithm used is the fast fourier transfrom (FFT), which is much faster than the original DFT algorithm but is limited in that only base2 numbers (128, 256, 512, etc) can be used for window sizes. This is necessary to make the spectrogram calculation fast enough for real-time use. It should be noted, however, that calculating spectrograms dynamically is computationally intensive and will increase latency when the spectrogram track is turned on in gbrowse.

The graphical rendering of the spectrogram depends on the glyph module Bio::Graphics::Glyph::spectrogram.

The plugin is discussed in more detail in the plugin's help links.

See the GMOD website for information on bug submission http://www.gmod.org.

Email <mckays@cshl.edu>

syntax highlighting: