Bio::G...Factory(3pm)
π NAME π
Bio::Graphics::Glyph::Factory β the factory that churns out Bio::Graphics::Glyph objects, no cap πβ¨
π SYNOPSIS π
Lowkey just go look at Bio::Graphics::Panel, bestie π
π¦ DESCRIPTION π¦
Okay so here's the tea β: this class is used internally by Bio::Graphics to spin up brand new Glyph objects by mashing together a list of features with whatever configuration you asked for. It's built to be used internally by Bio::Graphics β so it's giving backstage crew energy, not front-of-house π
π¬ FEEDBACK π¬
π Mailing Lists π
User feedback is literally an integral part of the evolution of this module and all the other Bioperl modules, fr fr. Send your comments and suggestions preferably to one of the Bioperl mailing lists β your participation is much appreciated π«Ά
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
π Reporting Bugs π
Report bugs to the Bioperl bug tracking system so we can keep track of the bugs and their resolution, bestie β that's the whole point π Bug reports can be submitted via the web:
http://bugzilla.open-bio.org/
π AUTHOR - Lincoln Stein π
Email - lstein@cshl.org
π SEE ALSO π
Bio::Graphics::Panel
π APPENDIX π
The rest of this doc spills all the details on each of the object methods, one by one. Heads up: internal methods are usually preceded with an "_" (underscore) β that's the little secret handshake πβ¨
π§ new π§
Title: new
Usage:
$f = Bio::Graphics::Glyph::Factory->new(
-stylesheet => $stylesheet,
-glyph_map => $glyph_map,
-options => $options);
Function: create a shiny new Bio::Graphics::Glyph::Factory object π
Returns: the new object
Args:
$stylesheetis aBio::Das::Stylesheetobject that can convertBio::Dasfeature objects into glyph names and associated options.$glyph_mapis a hash that maps primary tags to glyph names.$optionsis a hash that maps option names to their values.
Status: Internal to Bio::Graphics
π«§ clone π«§
Title: clone
Usage:
$f2 = $f->clone
Function: deep copy of a factory object, like a whole photocopy vibe π¨οΈ
Returns: a deep copy of the factory object
Args: None
Status: Internal to Bio::Graphics
π stylesheet π
Title: stylesheet
Usage:
$stylesheet = $f->stylesheet
Function: accessor for stylesheet
Returns: a Bio::Das::Stylesheet object
Args: None
Status: Internal to Bio::Graphics
πΈ glyph_map πΈ
Title: glyph_map
Usage:
$map = $f->glyph_map
Function: accessor for the glyph map
Returns: a hash mapping primary tags to glyphs
Args: None
Status: Internal to Bio::Graphics
β¨ option_map β¨
Title: option_map
Usage:
$map = $f->option_map
Function: accessor for the option map
Returns: a hash mapping option names to values
Args: None
Status: Internal to Bio::Graphics
π« global_opts π«
Title: global_opts
Usage:
$map = $f->global_opts
Function: accessor for global options
Returns: a hash mapping option names to values
Args: None
Status: Internal to Bio::Graphics
This one hands you back a set of defaults for option values β the starter pack, if you will π
πΌοΈ panel πΌοΈ
Title: panel
Usage:
$panel = $f->panel
Function: accessor for Bio::Graphics::Panel
Returns: a Bio::Graphics::Panel
Args: None
Status: Internal to Bio::Graphics
This returns the panel that the factory is associated with β they're basically besties π€
π scale π
Title: scale
Usage:
$scale = $f->scale
Function: accessor for the scale
Returns: a floating point number
Args: None
Status: Internal to Bio::Graphics
This returns the scale, in pixels/bp, for glyphs constructed by this factory π₯
π€ font π€
Title: font
Usage:
$font = $f->font
Function: accessor for the font
Returns: a font name
Args: None
Status: Internal to Bio::Graphics
This returns a GD font name π
π map_pt π
Title: map_pt
Usage:
@pixel_positions = $f->map_pt(@bp_positions)
Function: map bp positions to pixel positions
Returns: a list of pixel positions
Args: a list of bp positions
Status: Internal to Bio::Graphics
The real work is done by the panel, but factory subclasses can override if desired β your subclass, your rules π
βοΈ map_no_trunc βοΈ
Title: map_no_trunc
Usage:
@pixel_positions = $f->map_no_trunc(@bp_positions)
Function: map bp positions to pixel positions
Returns: a list of pixel positions
Args: a list of bp positions
Status: Internal to Bio::Graphics
Same as map_pt(), but it will NOT clip pixel positions to be within the drawing frame. So yeah, it does not trim, it does not play nice with the frame β it just says what it says π
π¨ translate_color π¨
Title: translate_color
Usage:
$index = $f->translate_color($color_name)
Function: translate symbolic color names into GD indexes
Returns: an integer
Args: a color name in format "green" or "#00FF00"
Status: Internal to Bio::Graphics
The real work is done by the panel, but factory subclasses can override if desired ποΈ
π«₯ transparent_color π«₯
Title: transparent_color
Usage:
$index = $f->transparent_color($opacity,$color_name)
Function: translate symbolic color names into GD indexes, with an opacity value taken into account
Returns: an integer
Args: an opacity value from 0-1.0, plus a color name in format "green" or "#00FF00"
Status: Internal to Bio::Graphics
The real work is done by the panel, but factory subclasses can override if desired π«οΈ
ποΈ make_glyph ποΈ
Title: make_glyph
Usage:
@glyphs = $f->glyph($level,[$type,]$feature1,$feature2...)
Function: transform features into glyphs. The glow-up, essentially β¨
Returns: a list of Bio::Graphics::Glyph objects
Args: a feature "level", followed by a list of FeatureI objects.
Status: Internal to Bio::Graphics
The level is used to track the level of nesting of features that have subfeatures. And the optional $type argument can be used to force the glyph type πͺ
π§ feature_to_glyph π§
Title: feature_to_glyph
Usage:
$glyph_name = $f->feature_to_glyph($feature)
Function: choose the glyph name given a feature
Returns: a glyph name
Args: a Bio::Seq::FeatureI object
Status: Internal to Bio::Graphics
ποΈ set_option ποΈ
Title: set_option
Usage:
$f->set_option($option_name=>$option_value)
Function: set or change an option
Returns: nothing β it's giving silent but powerful π
Args: a name/value pair
Status: Internal to Bio::Graphics
ποΈ options ποΈ
Title: options
Usage:
@option_names = $f->options
Function: return all configured option names
Returns: a list of option names
Args: none
Status: Internal to Bio::Graphics
And that's the whole page, bestie β this was Bio::G...Factory(3pm), straight outta the User Contributed Perl Documentation, running on perl v5.30.0 and dated 2019-11-25. Go forth and build glyphs, you absolute icon ππ¦π
π¦ 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