Class Bio::Graphics::Feature
In: lib/bio/graphics/feature.rb
Parent: Object

The Bio::Graphics::Feature class describes features to be placed on the graph. See Bio::Graphics documentation for explanation of interplay between different classes.

The position of the Feature is a Bio::Locations object to make it possible to transparently work with simple and spliced features.

The Bio::Graphics::Feature class inherits from Bio::Feature.

Methods

draw   find_row   new  

External Aliases

label -> name

Attributes

colour  [RW]  The colour to use to draw this (sub)feature
feature_object  [RW]  The bioruby Bio::Feature object
glyph  [RW]  The glyph to use to draw this (sub)feature
label  [RW]  The label of the feature
left_pixel_of_feature  [RW] 
left_pixel_of_subfeatures  [RW] 
link  [RW]  The URL to be followed when the glyph for this feature is clicked
locations  [RW] 
right_pixel_of_subfeatures  [RW] 
start  [RW] 
stop  [RW] 
subfeatures  [RW]  The Bio::Graphics SubFeatures
top_pixel_of_feature  [RW] 
track  [RW]  The track that this feature belongs to
vertical_offset  [RW] 

Public Class methods

!!Not to be used directly. Use Bio::Graphics::Track.add_feature instead!! A feature can not exist except within the confines of a Bio::Graphics::Track object.


Arguments:

  • track (required) :: Bio::Graphics::Track object that this feature belongs to
  • feature object (required) :: A Bio::Feature object (see bioruby)
  • _:label_ :: Label of the feature. Default = ‘anonymous‘
  • _:link_ :: URL for clickable images. Default = nil
  • _:glyph_ :: Glyph to use. Default = glyph of the track
  • _:colour_ :: Colour. Default = colour of the track
Returns:Bio::Graphics::Feature object

Public Instance methods

Adds the feature to the track cairo context. This method should not be used directly by the user, but is called by Bio::Graphics::Track.draw


Arguments:

  • track_drawing (required) :: the track cairo object
Returns:FIXME: I don‘t know

Calculates the row within the track where this feature should be drawn. This method should not be used directly by the user, but is called by Bio::Graphics::Feature.draw


Arguments:none
Returns:row number

[Validate]