Difference between revisions of "Glyphs and Glyph Options"

From GMOD
Jump to: navigation, search
(Colors)
(Selecting and Configuring Glyphs)
Line 5: Line 5:
 
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.
 
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:[[Image:Figure1.png|thumb|The "generic" glyph with all its defaults.]]
+
The simplest [Track] stanza will look like this:[[Image:Figure1.png|The "generic" glyph with all its defaults.]]
  
 
  [Demo]
 
  [Demo]
Line 11: Line 11:
 
  glyph  = generic
 
  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.  
+
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: [[Image:Figure2.png|thumb|The "generic" glyph with changed options.]]
+
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: [[Image:Figure2.png|The "generic" glyph with changed options.]]
  
 
  [Demo]
 
  [Demo]

Revision as of 14:46, 31 January 2009

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

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