Bio::G...trogram(3pm)
π Bio::Graphics::Glyph::spectrogram β the "spectrogram" glyph π
okay bestie, welcome to the Bio::Graphics::Glyph::spectrogram page, from the User Contributed Perl Documentation manual (yes the manual name really is that long, it's giving very "I was written in 2006 and I'm thriving") β¨
π NAME π
Bio::Graphics::Glyph::spectrogram β literally just: the "spectrogram" glyph. that's the whole name. short, sweet, iconic π
π¦ SYNOPSIS π¦
See L<Bio::Graphics::Panel>, L<Bio::Graphics::Glyph>
and L<Bio::Graphics::Browser::Plugin::Spectrogram>
like, go read those, bestie, this glyph is not a solo act π«Ά
β¨ DESCRIPTION β¨
so this glyph? designed to draw DNA spectrograms for the Spectrogram plugin. that's its whole job. that's its main character arc. π
not me being a standalone glyph β I'm NOT. do not use me alone, please. I have like, few public options. almost everything I do is controlled via the spectrogram plugin. iykyk. π
here's the tea on how it actually works π:
the glyph expects unaggregated 1D spectrogram features, and each one of those is a vertical column, with one row for each integer frequency. how many frequencies? controlled by the window size and/or the Spectrogram plugin. the width of the feature corresponds to the size of the overlap between adjacent windows. and the values for each frequency live in four channels β one for each base, obviously. the color of each row (a "spot", cute) represents the dominant base(s) and the intensity represents the magnitude of the signal at that frequency. periodt. π
the entire 2D spectrogram is a series of unaggregated, unbumped 1D spectrogram features. slay, chain them together. π₯
π¨ the color situation (HSV, no cap) π¨
the spectrogram glyph assigns colors using the HSV color space, where an angular coordinate for hue is assigned to each base:
Gβ yellow[60]πAβ blue[240]πCβ green[120]πTβ red[0/360]β€οΈ
the saturation value is fixed at the maximum of 100, and the brightness value is scaled according to the magnitude for each frequency, ranging from black to the pure hue. gorgeous, honestly. π
π§ how the hue gets picked π§
the hue is determined in one of two ways:
- if the signal for one base is dominant (
> 50%of total for the four channels), the angular coordinate for that base is used. the brightness is calculated using the total signal from all four channels. main character base energy π - if no base has a dominant signal, the weighted average angular coordinate is calculated using the relative contribution from each channel. and the brightness? still calculated from the total signal from all four channels. teamwork makes the dream work fr fr π«Ά
π a lil y-axis warning π
the y-axis labels require at least 40 pixels of left-padding. they will be truncated if less than 40 of padding is specified in the configuration file. so give them their space or they WILL get chopped. it's giving haircut gone wrong π
π OPTIONS π
the standard ones you already know and love π
the following standard options are accepted:
-heightβ Height of glyph. default:calculatedπ-bumpβ Whether to bump features. default:offπ«
the glyph-specific ones, aka the special sauce πΈ
the following glyph-specific options are also used:
-winβ window size used to calculate the spectrogram values. default:calculatedπͺ
π BUGS π
Please report them.
(yes. that's it. that's the whole section. iconic brevity, honestly. if you find one, tell someone. π«Ά)
π AUTHOR π
Sheldon McKay <mckays@cshl.org>.
Copyright (c) 2006 Cold Spring Harbor Laboratory
This package and its accompanying libraries is free software; you can redistribute it and/or modify it under the terms of the GPL (either version 1, or at your option, any later version) or the Artistic License 2.0. Refer to LICENSE for the full license text. In addition, please see DISCLAIMER.txt for disclaimers of warranty. legal bestie has spoken βοΈβ¨
and that's the whole page, bestie π¦ this was perl v5.30.0, dated 2019-11-25, and it's been Bio::G...trogram(3pm) the entire time β love that for it π mwah, go draw some spectrograms π
π¦ where this page comes from
- debian bookworm: libbio-graphics-perl 2.40-6 Β· Perl
- debian trixie: libbio-graphics-perl 2.40-6 Β· Perl
- ubuntu jammy: libbio-graphics-perl 2.40-6 Β· Perl
- ubuntu noble: libbio-graphics-perl 2.40-6 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms