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

Class Organism

source code

         reportlab.graphics.widgetbase.PropHolder --+        
                                                    |        
reportlab.graphics.shapes._DrawTimeResizeable --+   |        
                                                |   |        
               reportlab.graphics.shapes.UserNode --+        
                                                    |        
                 reportlab.graphics.widgetbase.Widget --+    
                                                        |    
                                     _ChromosomeComponent --+
                                                            |
                                                           Organism

Top level class for drawing chromosomes.

This class holds information about an organism and all of it's
chromosomes, and provides the top level object which could be used
for drawing a chromosome representation of an organism.

Chromosomes should be added and removed from the Organism via the
add and remove functions.

Instance Methods [hide private]
 
__init__(self, output_format='pdf')
Initialize a chromosome component.
source code
 
draw(self, output_file, title)
Draw out the information for the Organism.
source code
 
_draw_title(self, cur_drawing, title, width, height)
Write out the title of the organism figure.
source code
 
_draw_legend(self, cur_drawing, start_y, width)
Draw a legend for the figure.
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, output_format='pdf')
(Constructor)

source code 
Initialize a chromosome component.

Attributes:

o _sub_components -- Any components which are contained under
this parent component. This attribute should be accessed through
the add() and remove() functions.

Overrides: _ChromosomeComponent.__init__
(inherited documentation)

draw(self, output_file, title)

source code 
Draw out the information for the Organism.

Arguments:

o output_file -- The name of a file specifying where the
document should be saved, or a handle to be written to.
The output format is set when creating the Organism object.
Alternatively, output_file=None will return the drawing using
the low-level ReportLab objects (for further processing, such
as adding additional graphics, before writing).

o title -- The output title of the produced document.

Overrides: reportlab.graphics.widgetbase.Widget.draw

_draw_legend(self, cur_drawing, start_y, width)

source code 
Draw a legend for the figure.

Subclasses should implement this (see also self._legend_height) to
provide specialized legends.