Bio::G...Factory(3pm)

πŸ“¦
version 2.40 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– 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:

  • $stylesheet is a Bio::Das::Stylesheet object that can convert Bio::Das feature objects into glyph names and associated options.
  • $glyph_map is a hash that maps primary tags to glyph names.
  • $options is 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