Package Bio :: Package Graphics :: Package GenomeDiagram :: Module _Feature :: Class Feature
[hide private]
[frames] | no frames]

Class Feature

source code

object --+
         |
        Feature

Class to wrap Bio.SeqFeature objects for GenomeDiagram.

Attributes:
Instance Methods [hide private]
 
__init__(self, parent=None, feature_id=None, feature=None, color=Color(.564706,.933333,.564706,1), label=0, border=None, colour=None)
Initialize.
source code
 
set_feature(self, feature)
Define the Bio.SeqFeature object to be wrapped.
source code
 
__process_feature(self)
Examine wrapped feature and set some properties accordingly (PRIVATE).
source code
 
get_feature(self)
Return the unwrapped Bio.SeqFeature object.
source code
 
set_colour(self, colour)
Backwards compatible variant of set_color(self, color) using UK spelling.
source code
 
set_color(self, color)
Set the color in which the feature will be drawn.
source code
 
__getattr__(self, name)
Get attribute by name.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent=None, feature_id=None, feature=None, color=Color(.564706,.933333,.564706,1), label=0, border=None, colour=None)
(Constructor)

source code 

Initialize.

Arguments:
  • parent FeatureSet containing the feature
  • feature_id Unique id for the feature
  • feature Bio.SeqFeature object to be wrapped
  • color color.Color Color to draw the feature (overridden by backwards compatible argument with UK spelling, colour). Either argument is overridden if 'color' is found in feature qualifiers
  • border color.Color Color to draw the feature border, use None for the same as the fill color, False for no border.
  • label Boolean, 1 if the label should be shown
Overrides: object.__init__

set_color(self, color)

source code 

Set the color in which the feature will be drawn.

Arguments:
  • color The color to draw the feature - either a colors.Color object, an RGB tuple of floats, or an integer corresponding a colors in colors.txt

__getattr__(self, name)
(Qualification operator)

source code 

Get attribute by name.

If the Feature class doesn't have the attribute called for, check in self._feature for it.