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

Class AnnotatedChromosomeSegment

source code

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

Instance Methods [hide private]
 
__init__(self, bp_length, features, default_feature_color=Color(0,0,1,1), name_qualifiers=['gene', 'label', 'name', 'locus_tag', 'product'])
Like the ChromosomeSegment, but accepts a list of features.
source code
 
_overdraw_subcomponents(self, cur_drawing)
Draw any annotated features on the chromosome segment.
source code

Inherited from ChromosomeSegment: draw

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, bp_length, features, default_feature_color=Color(0,0,1,1), name_qualifiers=['gene', 'label', 'name', 'locus_tag', 'product'])
(Constructor)

source code 
Like the ChromosomeSegment, but accepts a list of features.

The features can either be SeqFeature objects, or tuples of values:
start (int), end (int), strand (+1, -1, O or None), label (string),
ReportLab color (string or object), and optional ReportLab fill color.

Note we require 0 <= start <= end <= bp_length, and within the vertical
space allocated to this segmenet lines will be places according to the
start/end coordinates (starting from the top).

Positive stand features are drawn on the right, negative on the left,
otherwise all the way across.

We recommend using consisent units for all the segment's scale values
(e.g. their length in base pairs).

When providing features as SeqFeature objects, the default color
is used, unless the feature's qualifiers include an Artemis colour
string (functionality also in GenomeDiagram). The caption also follows
the GenomeDiagram approach and takes the first qualifier from the list
specified in name_qualifiers.

Note additional attribute label_sep_percent controls the percentage of
area that the chromosome segment takes up, by default half of the
chr_percent attribute (half of 25%, thus 12.5%)

Overrides: _ChromosomeComponent.__init__

_overdraw_subcomponents(self, cur_drawing)

source code 
Draw any annotated features on the chromosome segment.

Assumes _draw_segment already called to fill out the basic shape,
and assmes that uses the same boundaries.

Overrides: ChromosomeSegment._overdraw_subcomponents