BioGraphics:pairplot glyph

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

NAME

The pairplot glyph.



SYNOPSIS

This is a triangle plot that displays quantitative relationships between point-like features, such as LD between SNPs. The quantitative information is generated by the "score" callback, which receives two feature objects and returns a floating point number between "min_score" and "max_score". The bgcolor intensity will be scaled from min to max like graded_segments.

NOTE (2 April 2008): This glyph is not yet fully functional.

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

$panel->add_track($features,
                  -glyph    => pairplot,
                  -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 pairplot glyph:
Option Option Type Description
-angle <float> [default 45] Angle between the side of the triangle and the base, in degrees.
-max_score <float> [default 1] Maximum possible pairwise score.
-min_score <float> [default 0] Minimum possible pairwise score.
-score <CODEREF> [default 'undef'] Pass a coderef to a subroutine with the following signature: sub ($$). The two arguments are the first and second feature to compare. Return a floating point number to indicate the score at the intersection of these two features.



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.
-arrowhead <'regular', 'filled'> [default regular] Set the style of arrowhead used when drawing a stranded feature. "regular" will generate a thin arrowhead that protrudes from the feature. "filled" will taper the feature itself to turn it into an arrowhead.
-basecolor <color> [default black] The color to use for drawing DNA/protein residues at the base level See next section for color choices.
-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.
-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.
-connector <'hat', 'solid', 'quill', 'dashed', 'crossed', 'undef'> [default 'undef'] Type of line to use for connecting discontinuous pieces of the feature. Leave this undef to draw no connector at all.
-connector_color <color> [default black] Color to use for lines connecting discontinuous pieces of the feature. See next section for color choices.
-description <string> [default 'undef'] Whether to place a description underneath the feature. A value of 1 will describe the feature using the values returned by its source_tag() method. Any other true value will label the feature with the provided value. Undef will suppress labeling entirely.
-descriptioncolor <color> [default black] The color to use for drawing description text in this glyph (also known as font2color. See next section for color choices.
-draw_dna <boolean> [default 'undef' (false)] If true, draw the dna residues when magnification level allows (assumes that the feature is attached to a DNA sequence.
-draw_translation <boolean> [default 'undef' (false)] Draw the protein translation of the feature (assumes that the feature is attached to a DNA sequence.
-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.
-font [default gdSmall'Font] Font for glyph label and description. Valid choices: 'gdTiny'Font', 'gdSmall'Font', 'gdMedium'Bold'Font', 'gdLarge'Font', 'gdGiant'Font'
-font2color <color> [default black] The color to use for drawing description text in this glyph (also known as descriptioncolor. See next section for color choices.
-fontcolor <color> [default black] The color to use for drawing label text in this glyph (also known as labelcolor). 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.
-label <string> [default 'undef'] Whether to label the feature. A value of 1 will label the feature with the value returned by its display_name() method. Any other true value will label the feature with the provided value. Undef will suppress labeling entirely.
-label_position <'top', 'left', 'alignment_left'> [default top] Where to place the feature label. "top" will place the label above the glyph aligned with its left side. "left" will place the label to the left of the glyph, vertically centered with it. "alignment_left" will place the label to the left of the glyph in the panel pad-left positon. The last option is used internally for drawing DNA alignments which span the screen.
-labelcolor <color> [default black] The color to use for drawing label text in this glyph (also known as fontcolor). See next section for color choices.
-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.
-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.
-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
-pad_bottom <integer> [default 0] Additional whitespace (in pixels) to add to the bottom of this glyph.
-pad_left <integer> [default 0] Additional whitespace (in pixels) to add to the left of this glyph.
-pad_right <integer> [default 0] Additional whitespace (in pixels) to add to the right of this glyph.
-pad_top <integer> [default 0] Additional whitespace (in pixels) to add to the top of this glyph.
-part_labels <boolean> [default 'undef' (false)] If false, do not label subparts of the feature. If equal to a value of 1, subparts are labeled with their display_name(). Any other true value, will be used as the subpart label. A false value suppresses the printing of subpart labels.
-record_label_positions <integer> [default 'undef'] If true, remember the coordinates of the glyph label and return it by calling $panel->key_boxes. If -1, then remember coordinates, but don't actually draw the label
-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