BioGraphics:heat map glyph

From GMOD
Jump to: navigation, search
The "heat_map" glyph

NAME

The heat_map glyph.



SYNOPSIS

This glyph draws "scored" features using a continuous color gradient is the HSV color space. The color of each segment is proportional to the score. Either monochrome gradients (for example the default white->red), or gradients progressing through the colors of the rainbow (magenta->blue->green->yelloe->red) can be created.

For example: # a white->red heat map start_color = white end_color = red

  1. a rainbow start_color = magenta end_color = red
  1. green->yellow->red start_color = green end_color = red

See the Bio::Graphics::Glyph::heat_map manual page for full details.

$panel->add_track($features,
                  -glyph    => heat_map,
                  -option1  => $value1,
                  -option2  => $value2...);

To experiment with this glyph's options, use the glyph_help.pl script with either the -v or -p switch. Run "glyph_help -help" for details.




OPTIONS DEFINED IN THIS GLYPH

Glyph-specific options for the heat_map glyph:
Option Option Type Description
-brightness <integer> [default 'undef'] Color brilliance: an integer between 0 and 100. This will override the value calculated from the name color.
-end_color <color> [default red] End of the color gradient. See next section for color choices.
-max_score <integer> [default 'undef'] Maximum value of the feature's "score" attribute.
-min_score <integer> [default 'undef'] Minimum value of the feature's "score" attribute.
-pure_hue <boolean> [default 'undef' (false)] Use the pure hue (brightness and saturation both at 100) for the named color.
-saturation <integer> [default 'undef'] Color saturation: an integer between 0 and 100. This will override the value calculated from the named color.
-start_color <color> [default white] Beginning of the color gradient, expressed as a named color or RGB hex string. See next section for color choices.
-vary_fg <boolean> [default 1 (true)] Vary both the foreground and background colors.



INHERITED OPTIONS

Options inherited from more general glyph classes:
Option Option Type Description
-always_sort <boolean> [default 'undef' (false)] Sort even when bumping is off.
-bgcolor <'color', 'featureScore', 'featureRGB'> [default turquoise] The background color of the glyph, used for filling its contents. A value of "featureScore" will produce a greyscale gradient from the feature's score value based on a range from 0 (lightest) to 1000 (darkest). A value of "featureRGB" will look for a feature tag named "RGB" and use that for the color value. See the next section for color choices.
-bicolor_pivot <'mean', 'zero', 'float', 'max', 'min', '1SD', '2SD', '3SD'> [default 'undef'] A value to pivot the display on. Typically this involves changing the color of the glyph (and scale axis) depending on whether the feature is above or below the pivot value. Provide "mean" to pivot on the mean of the data series, "zero" to pivot on the zero value, "min" to pivot on the min and "max" on max of data series, also it is possible to use any arbitrary integer or floating point number to pivot at that value.
-box_subparts <integer> [default 0] If this option is greater than zero, then imagemaps constructed from this glyph will contain bounding boxes around each subpart of a feature (e.g. each exon in a gene). The value of the option indicates the depth of recursion.
-bump <integer> [default 1] This option dictates the behavior of the glyph when two features collide horizontally. A value of +1 will bump the colliding feature downward using an algorithm that uses spaces efficiently. A value of -1 will bump the colliding feature upward using the same algorithm. Values of +2 and -2 will bump using a simple algorithm that is faster but does not use space as efficiently. A value of 3 or "fast" will turn on a faster collision detection algorithm which is only compatible with the default "left" sorting order. A value of 0 suppresses collision control entirely.
-bump_limit <integer> [default -1] This option will cause bumping to stop after the indicated number of features pile up. Subsequent collisions will not be bumped.
-category <string> [default 'undef'] A descriptive category that will be added to the track key.
-feature_limit <integer> [default 0] This option will set an upper bound on the number of features to be displayed. For this to work properly, features must be added one at a time using add_feature().
-fgcolor <'color', 'featureScore', 'featureRGB'> [default black] The foreground color of the glyph, used for drawing outlines. A value of "featureScore" will produce a greyscale gradient from the feature's score value based on a range from 0 (lightest) to 1000 (darkest). A value of "featureRGB" will look for a feature tag named "RGB" and use that for the color value. See the next section for color choices.
-fillcolor <color> [default turquoise] A synonym for -bgcolor. See next section for color choices.
-hbumppad <integer> [default 2] Ordinarily collison control prevents two features from overlapping if they come within 2 pixels of each other. This option allows you to change this value to give glyphs more or less breathing space on the left and right.
-height <integer> [default 10] Height of the glyph.
-hilite <color> [default 'undef'] Highlight the glyph in the indicated color. Usually used as a callback to selectively highlight glyphs that meet certain criteria. See next section for color choices.
-ignore_sub_part <string> [default 'undef'] Pass a space-delimited list of primary_tag() names in order to selectively suppress the drawing of subparts that match those primary tags.
-key <string> [default 'undef'] The printed label to use to describe this track.
-linewidth <integer> [default 1] Thickness of line used to draw the glyph's outline.
-link <string> [default 'undef'] When generating an imagemap, specify the pattern or callback for formatting the link URL associated with the glyph.
-max_score <float> [default 'undef'] The maximum score of the quantitative range.
-maxdepth <integer> [default 'undef'] Specifies how many levels deep the glyph should traverse features looking for subfeatures. A value of undef allows unlimited traversal. A value of 0 suppresses traversal entirely for the same effect as -no_subparts.
-min_score <float> [default 'undef'] The minimum score of the quantitative range.
-neg_color <color> [default 'undef'] The color to use for values that are below the bicolor_pivot value. See next section for color choices.
-no_subparts <boolean> [default 'undef' (false)] Set this option to a true value to suppress drawing of all its subparts.
-opacity <float> [default 1.0] Default opacity to apply to glyph background and foreground colors. This is a value between 0.0 (completely transparent) to 1.0 (completely opaque. If the color contains an explicit opacity (alpha) value, the default value will be ignored
-pos_color <color> [default 'undef'] The color to use for values that exceed the bicolor_pivot value. See next section for color choices.
-sort_order <'left', 'right', 'low_score', 'high_score', 'longest', 'shortest', 'strand', 'name'> [default left] Control how features are layed out so that more "important" features sort towards the top. See the Bio::Graphics::Glyph documentation for a description of how this works.
-strand_arrow <boolean> [default 'undef' (false)] Whether to indicate the feature's strandedness. If equal to 'ends' then only the right and left ends of multi-part features will show strandedness.
-stranded <boolean> [default 'undef' (false)] Synonym for -strand_arrow. Indicates whether to indicate the feature's strandedness. If equal to 'ends' then only the right and left ends of multi-part features will show strandedness.
-target <string> [default 'undef'] When generating an imagemap, specify the pattern or callback for formatting the link target associated with the glyph.
-title <string> [default 'undef'] When generating an imagemap, specify the pattern or callback for formatting the link title associated with the glyph.
-tkcolor <color> [default 'undef'] Rarely-used option to flood-fill entire glyph with a single color prior to rendering it. See next section for color choices.



COLOR OPTIONS

See Glyphs_and_Glyph_Options#Colors