Package Bio :: Package Graphics :: Package GenomeDiagram :: Module _AbstractDrawer :: Class AbstractDrawer
[hide private]
[frames] | no frames]

Class AbstractDrawer

source code

object --+
         |
        AbstractDrawer
Known Subclasses:

AbstractDrawer

Provides:

Methods:

Attributes:

Instance Methods [hide private]
 
__init__(self, parent, pagesize='A3', orientation='landscape', x=0.05, y=0.05, xl=None, xr=None, yt=None, yb=None, start=None, end=None, tracklines=0, cross_track_links=None)
Create the object.
source code
 
set_page_size(self, pagesize, orientation)
Set page size of the drawing..
source code
 
set_margins(self, x, y, xl, xr, yt, yb)
Set page margins.
source code
 
set_bounds(self, start, end)
Set start and end points for the drawing as a whole.
source code
 
is_in_bounds(self, value)
Check if given value is withing the region selected for drawing,
source code
 
__len__(self)
Returns the length of the region to be drawn.
source code
 
_current_track_start_end(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent, pagesize='A3', orientation='landscape', x=0.05, y=0.05, xl=None, xr=None, yt=None, yb=None, start=None, end=None, tracklines=0, cross_track_links=None)
(Constructor)

source code 

Create the object.

Arguments:

  • parent Diagram object containing the data that the drawer draws
  • pagesize String describing the ISO size of the image, or a tuple of pixels
  • orientation String describing the required orientation of the final drawing ('landscape' or 'portrait')
  • x Float (0->1) describing the relative size of the X margins to the page
  • y Float (0->1) describing the relative size of the Y margins to the page
  • xl Float (0->1) describing the relative size of the left X margin to the page (overrides x)
  • xl Float (0->1) describing the relative size of the left X margin to the page (overrides x)
  • xr Float (0->1) describing the relative size of the right X margin to the page (overrides x)
  • yt Float (0->1) describing the relative size of the top Y margin to the page (overrides y)
  • yb Float (0->1) describing the relative size of the lower Y margin to the page (overrides y)
  • start Int, the position to begin drawing the diagram at
  • end Int, the position to stop drawing the diagram at
  • tracklines Boolean flag to show (or not) lines delineating tracks on the diagram
  • cross_track_links List of tuples each with four entries (track A, feature A, track B, feature B) to be linked.
Overrides: object.__init__

set_page_size(self, pagesize, orientation)

source code 

Set page size of the drawing..

Arguments:

  • pagesize Size of the output image, a tuple of pixels (width, height, or a string in the reportlab.lib.pagesizes set of ISO sizes.
  • orientation String: 'landscape' or 'portrait'

set_margins(self, x, y, xl, xr, yt, yb)

source code 

Set page margins.

Arguments:

  • x Float(0->1), Absolute X margin as % of page
  • y Float(0->1), Absolute Y margin as % of page
  • xl Float(0->1), Left X margin as % of page
  • xr Float(0->1), Right X margin as % of page
  • yt Float(0->1), Top Y margin as % of page
  • yb Float(0->1), Bottom Y margin as % of page

Set the page margins as proportions of the page 0->1, and also set the page limits x0, y0 and xlim, ylim, and page center xorigin, yorigin, as well as overall page width and height

set_bounds(self, start, end)

source code 

Set start and end points for the drawing as a whole.

Arguments:

  • start - The first base (or feature mark) to draw from
  • end - The last base (or feature mark) to draw to

is_in_bounds(self, value)

source code 

Check if given value is withing the region selected for drawing,

Arguments:

  • value - A base position