BioGraphics:cds glyph

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

NAME

The cds glyph.



SYNOPSIS

This glyph draws features that are associated with a protein coding region. At high magnifications, draws a series of boxes that are color-coded to indicate the frame in which the translation occurs. At low magnifications, draws the amino acid sequence of the resulting protein. Amino acids that are created by a splice are optionally shown in a distinctive color.

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

$panel->add_track($features,
                  -glyph    => cds,
                  -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 cds glyph:
Option Option Type Description
-cds_only <boolean> [default 'undef' (false)] Only draw features of type "CDS".
-codontable <integer> [default 1] Which codon table to use for translations, see Bio::Tools::Codon'Table.
-frame0f <color> [default 'undef'] Color for the first (+) frame. If undefined, uses the bgcolor. See next section for color choices.
-frame0r <color> [default 'undef'] Color for the first (-) frame. If undefined, uses the bgcolor. See next section for color choices.
-frame1f <color> [default 'undef'] Color for the second (+) frame. If undefined, uses the bgcolor. See next section for color choices.
-frame1r <color> [default 'undef'] Color for the first (-) frame. If undefined, uses the bgcolor. See next section for color choices.
-frame2f <color> [default 'undef'] Color for the third (+) frame. If undefined, uses the bgcolor. See next section for color choices.
-frame2r <color> [default 'undef'] Color for the third (-) frame. If undefined, uses the bgcolor. See next section for color choices.
-gridcolor <color> [default lightslategray] Color for the "staff". See next section for color choices.
-ignore_empty_phase <boolean> [default 'undef' (false)] Only draw features that have a phase defined.
-phase_style <'012', '021'> [default 012] The way the phase method is to be interpreted. See the manual page of this glyph for an explanation.
-require_subparts <boolean> [default 'undef' (false)] Don't try to draw reading frames unless the feature has subparts.
-sixframe <boolean> [default 'undef' (false)] Draw a six-frame staff. This option overrides -translation, which essentially does the same thing.
-sub_part <string> [default 'undef'] For features with multiple subpart types, define which one is the CDS part that contains phase information.
-translation <'3frame', '6frame'> [default 3frame] Number of lines of reading frames to show. For best results, specify a height of at least 30 pixels for "6frame", and at least 15 pixels for 3frame.



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