Package Bio :: Package Graphics :: Module BasicChromosome :: Class ChromosomeSegment
[hide private]
[frames] | no frames]

Class ChromosomeSegment

source code

         reportlab.graphics.widgetbase.PropHolder --+        
                                                    |        
reportlab.graphics.shapes._DrawTimeResizeable --+   |        
                                                |   |        
               reportlab.graphics.shapes.UserNode --+        
                                                    |        
                 reportlab.graphics.widgetbase.Widget --+    
                                                        |    
                                     _ChromosomeComponent --+
                                                            |
                                                           ChromosomeSegment
Known Subclasses:

Draw a segment of a chromosome.

This class provides the important configurable functionality of drawing
a Chromosome. Each segment has some customization available here, or can
be subclassed to define additional functionality. Most of the interesting
drawing stuff is likely to happen at the ChromosomeSegment level.

Instance Methods [hide private]
 
__init__(self)
Initialize a ChromosomeSegment.
source code
 
draw(self, cur_drawing)
Draw a chromosome segment.
source code
 
_draw_subcomponents(self, cur_drawing)
Draw any subcomponents of the chromosome segment.
source code
 
_draw_segment(self, cur_drawing)
Draw the current chromosome segment.
source code
 
_overdraw_subcomponents(self, cur_drawing)
Draw any subcomponents of the chromosome segment over the main part.
source code
 
_draw_label(self, cur_drawing)
Add a label to the chromosome segment.
source code

Inherited from _ChromosomeComponent: add, remove

Inherited from reportlab.graphics.widgetbase.Widget: demo, getBounds, provideNode

Inherited from reportlab.graphics.widgetbase.Widget (private): _setKeywords

Inherited from reportlab.graphics.widgetbase.PropHolder: __setattr__, dumpProperties, getProperties, setProperties, verify

Inherited from reportlab.graphics.shapes._DrawTimeResizeable (private): _drawTimeResize

Class Variables [hide private]

Inherited from reportlab.graphics.widgetbase.PropHolder (private): _attrMap

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Initialize a ChromosomeSegment.

Attributes:
o start_x_position, end_x_position - Defines the x range we have
to draw things in.

o start_y_position, end_y_position - Defines the y range we have
to draw things in.

Configuration Attributes:

o scale - A scaling value for the component. By default this is
set at 1 (ie -- has the same scale as everything else). Higher
values give more size to the component, smaller values give less.

o fill_color - A color to fill in the segment with. Colors are
available in reportlab.lib.colors

o label - A label to place on the chromosome segment. This should
be a text string specifying what is to be included in the label.

o label_size - The size of the label.

o chr_percent - The percentage of area that the chromosome
segment takes up.

Overrides: _ChromosomeComponent.__init__

draw(self, cur_drawing)

source code 
Draw a chromosome segment.

Before drawing, the range we are drawing in needs to be set.

Overrides: reportlab.graphics.widgetbase.Widget.draw

_draw_subcomponents(self, cur_drawing)

source code 
Draw any subcomponents of the chromosome segment.

This should be overridden in derived classes if there are
subcomponents to be drawn.

_overdraw_subcomponents(self, cur_drawing)

source code 
Draw any subcomponents of the chromosome segment over the main part.

This should be overridden in derived classes if there are
subcomponents to be drawn.

_draw_label(self, cur_drawing)

source code 
Add a label to the chromosome segment.

The label will be applied to the right of the segment.

This may be overlapped by any sub-feature labels on other segments!