Table of Contents

Class: Chromosome Bio/Graphics/BasicChromosome.py

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.

Base Classes   
_ChromosomeComponent
    Widget
Methods   
__init__
_draw_label
draw
subcomponent_size
  __init__ 
__init__ ( self,  chromosome_name )

Initialize a Chromosome for drawing.

Arguments:

  • chromosome_name - The label for the chromosome.

Attributes:

  • 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.

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

Configuration Attributes:

  • title_size - The size of the chromosome title.

  • 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).

  _draw_label 
_draw_label (
        self,
        cur_drawing,
        label_name,
        )

Draw a label for the chromosome.

  draw 
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.

  subcomponent_size 
subcomponent_size ( self )

Return the scaled size of all subcomponents of this component.


Table of Contents

This document was automatically generated on Mon Jul 1 12:03:12 2002 by HappyDoc version 2.0.1