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

Class Chromosome

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


Class for drawing a chromosome of an organism.

This organizes the drawing of a single organisms chromosome. This class can be instantiated directly, but the draw method makes the most sense to be called in the context of an organism.
Method Summary
  __init__(self, chromosome_name)
Initialize a Chromosome for drawing.
  draw(self, cur_drawing)
Draw a chromosome on the specified template.
  subcomponent_size(self)
Return the scaled size of all subcomponents of this component.
  _draw_label(self, cur_drawing, label_name)
Draw a label for the chromosome.
    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, chromosome_name)
(Constructor)

Initialize a Chromosome for drawing.

Arguments:

o chromosome_name - The label for the chromosome.

Attributes:

o start_x_position, end_x_position - The x positions on the page where the chromosome should be drawn. This allows multiple chromosomes to be drawn on a single page.

o start_y_position, end_y_position - The y positions on the page where the chromosome should be contained.

Configuration Attributes:

o title_size - The size of the chromosome title.

o scale_num - A number of scale the drawing by. This is useful if you want to draw multiple chromosomes of different sizes at the same scale. If this is not set, then the chromosome drawing will be scaled by the number of segements in the chromosome (so each chromosome will be the exact same final size).
Overrides:
Bio.Graphics.BasicChromosome._ChromosomeComponent.__init__

draw(self, cur_drawing)

Draw a chromosome on the specified template.

Ideally, the x_position and y_*_position attributes should be set prior to drawing -- otherwise we're going to have some problems.
Overrides:
Bio.Graphics.BasicChromosome._ChromosomeComponent.draw

subcomponent_size(self)

Return the scaled size of all subcomponents of this component.

_draw_label(self, cur_drawing, label_name)

Draw a label for the chromosome.

Generated by Epydoc 2.1 on Wed Jan 31 09:57:59 2007 http://epydoc.sf.net