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

Class ChromosomeSegment

             PropHolder --+        
                          |        
_DrawTimeResizeable --+   |        
                      |   |        
               UserNode --+        
                          |        
                     Widget --+    
                              |    
           _ChromosomeComponent --+
                                  |
                                 ChromosomeSegment

Known Subclasses:
TelomereSegment

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.
Method Summary
  __init__(self)
Initialize a ChromosomeSegment.
  draw(self, cur_drawing)
Draw a chromosome segment.
  _draw_label(self, cur_drawing)
Add a label to the chromosome segment.
  _draw_segment(self, cur_drawing)
Draw the current chromosome segment.
  _draw_subcomponents(self, cur_drawing)
Draw any subcomponents of the chromosome segment.
    Inherited from _ChromosomeComponent
  add(self, component)
Add a sub_component to the list of components under this item.
  remove(self, component)
Remove the specified component from the subcomponents.
    Inherited from Widget
  demo(self)
  getBounds(self)
Return outer boundary as x1,y1,x2,y2.
  provideNode(self)
Override this to create your own node.
    Inherited from PropHolder
  __setattr__(self, name, value)
By default we verify.
  dumpProperties(self, prefix)
Convenience.
  getProperties(self, recur)
Returns a list of all properties which can be edited and which are not marked as private.
  setProperties(self, propDict)
Permits bulk setting of properties.
  verify(self)
If the _attrMap attribute is not None, this checks all expected attributes are present; no unwanted attributes are present; and (if a checking function is found) checks each attribute has a valid value.
    Inherited from _DrawTimeResizeable
  _drawTimeResize(self, w, h)

Class Variable Summary
    Inherited from PropHolder
NoneType _attrMap = None                                                                  

Method Details

__init__(self)
(Constructor)

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:
Bio.Graphics.BasicChromosome._ChromosomeComponent.__init__

draw(self, cur_drawing)

Draw a chromosome segment.

Before drawing, the range we are drawing in needs to be set.
Overrides:
Bio.Graphics.BasicChromosome._ChromosomeComponent.draw

_draw_label(self, cur_drawing)

Add a label to the chromosome segment.

_draw_segment(self, cur_drawing)

Draw the current chromosome segment.

_draw_subcomponents(self, cur_drawing)

Draw any subcomponents of the chromosome segment.

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

Generated by Epydoc 2.1 on Thu Mar 31 20:15:39 2005 http://epydoc.sf.net