Bio::G...egments(3pm)
π Bio::Graphics::Glyph::graded_segments π
okay bestie, gather round, because this is the graded_segments glyph from the Bio::Graphics family, and it's genuinely one of the cutest little visualization tools out here. it lives in the User Contributed Perl Documentation corner of your perldoc, and yes, we're gonna read the whole thing together. no skimming. periodt. π
β¨ NAME β¨
Bio::Graphics::Glyph::graded_segments β the "graded_segments" glyph. that's it, that's the whole name, and it's iconic for it. π
β¨ SYNOPSIS β¨
See L<Bio::Graphics::Panel> and L<Bio::Graphics::Glyph>.
like, the synopsis is literally just "go read the other docs first." she's lowkey sending you to the group chat archives. π«Ά
β¨ DESCRIPTION β¨
so here's the tea: this glyph is identical to the "alignment" glyph, and its whole job is drawing features that are made up of discontinuous segments. π¦
and the cute part? the color intensity of each segment is proportionate to the score. higher score = deeper color = more drama. it's giving heatmap but make it fashion. π
β¨ OPTIONS β¨
the standard ones (all glyphs have these, no cap)
Bio::Graphics::Glyph has the full explanation if you want the deep lore, but here's the rundown:
-fgcolorβ Foreground color. Default:black. π€-outlinecolorβ Synonym for-fgcolor. (same energy, different name)-bgcolorβ Background color. Default:turquoise. π slay-fillcolorβ Synonym for-bgcolor.-linewidthβ Line width. Default:1.-heightβ Height of glyph. Default:10.-fontβ Glyph font. Default:gdSmallFont.-connectorβ Connector type. Default:0(false).-connector_colorβ Connector color. Default:black.-labelβ Whether to draw a label. Default:0(false).-descriptionβ Whether to draw a description. Default:0(false).-hiliteβ Highlight color. Default:undef(no color).
the glyph-specific ones (alignment glyph exclusives π )
-max_scoreβ Maximum value of the feature's"score"attribute. Default: Calculated.-min_scoreβ Minimum value of the feature's"score"attribute. Default: Calculated.-vary_fgβ Vary the foreground color as well as the background. Default:0(false).-merge_partsβ Whether to simplify the alignment at low magnification. Default:0(false).-max_gapβ Do not merge across gaps that exceed this threshold. Default: Calculated.
π§ heads up bestie: ifmax_scoreandmin_scoreare not specified, the glyph will calculate the local maximum and minimum scores at run time. and since lots of scoring functions are exponential, you may wanna take the log of your scores before passing them into this glyph. not me being helpful. π
πΈ Simplifying the display of alignment features for large segments πΈ
okay this section is the main character, let's talk about it.
the "merge_parts" option is used for semantic zooming. the vibe: if features are small and dense, they will not be displayed very well** for large segments, and the color-coding will be lost. π
if merge-parts is set to a true value, adjacent alignment parts will be merged until a gap exceeding a calculated or user-specified value is encountered. β¨
unless specified, the maximum gap allowed for merging adjacent features is calculated as:
(L/10000)*(L/500)
where L = the length of the sequence displayed in the browser. and the way that threshold increases exponentially?? that's the whole point β it allows more aggressive merging of alignment features as the size of the displayed sequence grows larger. she scales with you, fr fr. π
the score math (yes we're doing math, stay with me π)
the score of the merged feature is calculated as a weighted average.
example time, because numbers > vibes here:
- two adjacent HSPs
- each
400bp in length - scores of
60%and70% - if the
merge_partsoption is set to a true value β the two HSPs would be merged in the display to a single800bp alignment block with an average score of65%. π
and the merge_parts option is turned off by default. so if you wanted it, you have to ask for it. consent first, always. π
β¨ BUGS β¨
Please report them.
(that's literally it. she's a woman of few words and honestly? respect. π)
β¨ SEE ALSO β¨
the whole extended family, no one left out:
Bio::Graphics::PanelBio::Graphics::GlyphBio::Graphics::Glyph::arrowBio::Graphics::Glyph::cdsBio::Graphics::Glyph::crossboxBio::Graphics::Glyph::diamondBio::Graphics::Glyph::dnaBio::Graphics::Glyph::dotBio::Graphics::Glyph::ellipseBio::Graphics::Glyph::extending_arrowBio::Graphics::Glyph::genericBio::Graphics::Glyph::graded_segmentsBio::Graphics::Glyph::heterogeneous_segmentsBio::Graphics::Glyph::lineBio::Graphics::Glyph::pinsertionBio::Graphics::Glyph::primersBio::Graphics::Glyph::rndrectBio::Graphics::Glyph::segmentsBio::Graphics::Glyph::ruler_arrowBio::Graphics::Glyph::toomanyBio::Graphics::Glyph::transcriptBio::Graphics::Glyph::transcript2Bio::Graphics::Glyph::translationBio::Graphics::Glyph::triangleBio::DB::GFFBio::SeqIBio::SeqFeatureIBio::DasGD
go read them all, bestie. iykyk. π§
β¨ AUTHOR β¨
Lincoln Stein <lstein@cshl.org> π«Ά
Copyright (c) 2001 Cold Spring Harbor Laboratory
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See DISCLAIMER.txt for disclaimers of warranty.
okay that's the whole page, you ate it up π β¨
this was pulled from perl v5.30.0, dated 2019-11-25, filed under the Bio::G...egments(3pm) manual page β and now you know everything she knows. mwah. πππ
π¦ 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