BioGraphics:redgreen segment glyph

From GMOD
Revision as of 16:06, 19 April 2012 by Lstein (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
The "redgreen_segment" glyph

NAME

The redgreen_segment glyph.



SYNOPSIS

This glyph is used for drawing features that consist of discontinuous segments. The color intensity of each subfeature proportional to its score tag. See the Bio::Graphics::Glyph::redgreen_segment manual page for full details.

$panel->add_track($features,
                  -glyph    => redgreen_segment,
                  -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 redgreen_segment glyph:
Option Option Type Description

 : (none)



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.
-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.
-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.
-deletion_color <color> [default red] The color to use for deletions when displaying alignments; overrides indel_color 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_protein_target <boolean> [default 'undef' (false)] If true, draw the protein residues of the TARGET (aligned) sequence when the magnification level allows. See "Displaying Alignments" in Bio::Graphics::Glyph::segments.
-draw_target <boolean> [default 'undef' (false)] If true, draw the dna residues of the TARGET (aligned) sequence when the magnification level allows. See "Displaying Alignments" in Bio::Graphics::Glyph::segments.
-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.
-indel_color <color> [default lightgrey] The color to use for indels when displaying alignments. See next section for color choices.
-insertion_color <color> [default green] The color to use for insertions when displaying alignments; overrides indel_color See next section for color choices.
-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.
-max_gap <integer> [default 'undef'] Do not merge across gaps that exceed this threshold.
-max_score <integer> [default 'undef'] Maximum value of the feature's "score" attribute.
-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.
-merge_parts <boolean> [default 'undef' (false)] At low magnifications, smooth small gaps to improve the visual display. See this glyph's manual page for the gory details.
-min_score <integer> [default 'undef'] Minimum value of the feature's "score" attribute.
-mismatch_color <color> [default lightgrey] The color to use for mismatched bases when displaying alignments. See "Displaying Alignments" in Bio::Graphics::Glyph::segments. See next section for color choices.
-mismatch_only <boolean> [default 'undef' (false)] If true, only print mismatched bases when displaying alignments.
-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
-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.
-pos_color <color> [default 'undef'] The color to use for values that exceed the bicolor_pivot value. See next section for color choices.
-ragged_extra <boolean> [default 'undef' (false)] When combined with -draw_target, draw extra bases beyond the end of the alignment. The value is the maximum number of extra bases. See "Displaying Alignments" in Bio::Graphics::Glyph::segments.
-realign <boolean> [default 'undef' (false)] Attempt to realign sequences at high magnification to account for indels. See "Displaying Alignments" in Bio::Graphics::Glyph::segments.
-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
-show_mismatch <integer> [default 'undef'] When combined with -draw_target, highlights mismatched bases in the mismatch color. A value of 0 or undef never shows mismatches. A value of 1 shows mismatches at the base pair alignment level, but not at magnifications too low to allow the DNA to be displayed. Any other positive integer will show mismatches when the track is showing a region less than or equal to the specified value. See "Displaying Alignments" in Bio::Graphics::Glyph::segments.
-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.
-split_on_cigar <boolean> [default 'undef' (false)] If true, and if the feature contains a CIGAR string as the value of the Gap tag, then split the feature into subparts based on the CIGAR.
-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.
-true_target <boolean> [default 'undef' (false)] Show the target DNA in its native (plus strand) orientation, even if the alignment is to the minus strand. See "Displaying Alignments" in Bio::Graphics::Glyph::segments.
-vary_fg <boolean> [default 'undef' (false)] Vary the foreground color as well as the background.



COLOR OPTIONS

See Glyphs_and_Glyph_Options#Colors