Class Bio::Graphics::Panel
In: lib/bio/graphics/panel.rb
Parent: Object

The Bio::Graphics::Panel class describes the complete graph and contains all tracks. See Bio::Graphics documentation for explanation of interplay between different classes.

Methods

add_track   draw   new  

Attributes

clickable  [RW] 
display_range  [RW] 
display_start  [RW] 
display_stop  [RW] 
final_panel_destination  [RW] 
format  [RW] 
height  [RW] 
image_map  [RW] 
length  [RW] 
number_of_feature_rows  [RW] 
rescale_factor  [RW] 
tracks  [RW] 
vertical  [RW] 
width  [RW] 

Public Class methods

Create a new Bio::Graphics::Panel object

  g = Bio::Graphics::Panel.new(456)

The height of the image is calculated automatically depending on how many tracks and features it contains. The width of the image defaults to 800 pt but can be set manually by using the width argument to the opts hash:

  g = Bio::Graphics::Panel.new(456, :width => 1200)

See also: Bio::Graphics::Panel::Track, Bio::Graphics::Panel::Track::Feature


Arguments:

  • length :: length of the thing you want to visualize, e.g for visualizing a sequence that is 3.24 kb long, use 324. (required)
  • _:width_ :: width of the resulting image in pixels. (default: 800)
  • _:clickable_ :: whether the picture should have clickable glyphs or not (default: false) If set to true, a html file will be created with the map.
  • _:display_start_ :: start coordinate to be displayed (default: 1)
  • _:display_stop_ :: stop coordinate to be displayed (default: length of sequence)
  • _:vertical_ :: Boolean: false = horizontal (= default)
  • _:format_ :: File format of the picture. Can be :png, :svg, :pdf or :ps (default: :png)
Returns:Bio::Graphics::Panel object

Public Instance methods

Adds a Bio::Graphics::Track container to this panel. A panel contains a logical grouping of features, e.g. (for sequence annotation:) genes, polymorphisms, ESTs, etc.

 est_track = g.add_track('ESTs', :label => false, :glyph => :directed_generic)
 gene_track = g.add_track('genes', :label => true)

Arguments:

  • name :: Name to be displayed at the top of the track. (Required)
  • _:label_ :: boolean. Whether or not to display the labels for the features. (Default = true)
  • _:glyph_ :: Default glyph for features in this track. For more info, see the lib/bio/graphics/glyph directory. (Default = :generic)
  • _:colour_ :: Default colour for features in this track, in RGB (Default = [0,0,1])
Returns:Bio::Graphics::Track object that has just been created

Create the drawing

[Validate]