Glyphs and Glyph Options

From GMOD
Revision as of 16:33, 31 January 2009 by Lstein (Talk | contribs)

Jump to: navigation, search

GBrowse offers many different options for displaying tracks. Tracks are generated by the Perl Graphics module, which is the definitive reference for the various display options in GBrowse. This page provides an introduction to the most commonly used glyphs.

Selecting and Configuring Glyphs

Every GBrowse [Track] stanza should have a glyph option. This option selects the shape and behavior of each feature rendered in the track. Other options fine tune the glyph's appearance by selecting its height, color, and other display properties. Several standard display options are shared among all glyphs; others are glyph-specific.

The simplest [Track] stanza will look like this:The "generic" glyph with all its defaults.

[Demo]
feature = gene
glyph   = generic

The "generic" glyph is the basis of all other glyphs and simply draws a solid box using the cyan color. A track rendered with this configuration will look like Figure 1.

You can change the default appearance of the generic glyph using the standard height, bgcolor, and fgcolor options. You can also assign a longer key to the track using the key option. For example: The "generic" glyph with changed options.

[Demo]
feature = gene
glyph   = generic
bgcolor = orange
fgcolor = black
height  = 9
key     = Demo track with custom display options

Figure 2 shows how this will appear.

Values Used in Glyph Options

Before we dive into the various glyphs and their options, we will discuss colors, true/false flags, and other values that are used in the options.

Colors

Many options accept color values. You can specify colors by name, by HTML value, or using CSS (cascading stylesheet) notation.

By Name

Figure3: Named colors

GBrowse color-related options accept human readable color names like "yellow". The full list is contained in the color chart in Figure 3.

By HTML value

GBrowse accepts HTML style color values in the form "#RRGGBB", where RR, GG and BB are the red, green and blue intensity values respectively. These