Package Bio :: Package Graphics :: Package GenomeDiagram :: Module _Track :: Class Track
[hide private]
[frames] | no frames]

Class Track

source code

object --+
         |
        Track

Track.

Attributes:
Instance Methods [hide private]
 
__init__(self, name=None, height=1, hide=0, greytrack=0, greytrack_labels=5, greytrack_fontsize=8, greytrack_font='Helvetica', greytrack_font_rotation=0, greytrack_font_color=Color(.6,.6,.6,1), scale=1, scale_format=None, scale_color=Color(0,0,0,1), scale_font='Helvetica', scale_fontsize=6, scale_fontangle=45, scale_largeticks=0.5, scale_ticks=1, scale_smallticks=0.3, scale_largetick_interval=1000000.0, scale_smalltick_interval=10000.0, scale_largetick_labels=1, scale_smalltick_labels=0, axis_labels=1, start=None, end=None, greytrack_font_colour=None, scale_colour=None)
Initialize.
source code
 
add_set(self, set)
Add a preexisting FeatureSet or GraphSet object to the track.
source code
 
new_set(self, type='feature', **args)
Create a new FeatureSet or GraphSet object.
source code
 
del_set(self, set_id)
Remove the set with the passed id from the track.
source code
 
get_sets(self)
Return the sets contained in this track.
source code
 
get_ids(self)
Return the ids of all sets contained in this track.
source code
 
range(self)
Return the lowest and highest base (or mark) numbers as a tuple.
source code
 
to_string(self, verbose=0)
Return a formatted string with information about the track.
source code
 
__getitem__(self, key)
Return the set with the passed id.
source code
 
__str__(self)
Return a formatted string with information about the Track.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name=None, height=1, hide=0, greytrack=0, greytrack_labels=5, greytrack_fontsize=8, greytrack_font='Helvetica', greytrack_font_rotation=0, greytrack_font_color=Color(.6,.6,.6,1), scale=1, scale_format=None, scale_color=Color(0,0,0,1), scale_font='Helvetica', scale_fontsize=6, scale_fontangle=45, scale_largeticks=0.5, scale_ticks=1, scale_smallticks=0.3, scale_largetick_interval=1000000.0, scale_smalltick_interval=10000.0, scale_largetick_labels=1, scale_smalltick_labels=0, axis_labels=1, start=None, end=None, greytrack_font_colour=None, scale_colour=None)
(Constructor)

source code 

Initialize.

Arguments:
  • height Int describing the relative height to other tracks in the diagram
  • name String describing the track
  • hide Boolean, 0 if the track is not to be drawn
  • greytrack Boolean, 1 if a grey background to the track is to be drawn
  • greytrack_labels Int describing how many track-identifying labels should be placed on the track at regular intervals
  • greytrack_font String describing the font to use for the greytrack labels
  • greytrack_fontsize Int describing the font size to display the labels on the grey track
  • greytrack_font_rotation Int describing the angle through which to rotate the grey track labels (Linear only)
  • greytrack_font_color colors.Color describing the color to draw the grey track labels (overridden by backwards compatible argument with UK spelling, colour).
  • scale Boolean, 1 if a scale is to be drawn on the track
  • scale_color colors.Color to draw the elements of the scale (overridden by backwards compatible argument with UK spelling, colour).
  • scale_font String describing the font to use for the scale labels
  • scale_fontsize Int describing the size of the scale label font
  • scale_fontangle Int describing the angle at which to draw the scale labels (linear only)
  • scale_ticks Boolean, 1 if ticks should be drawn at all on the scale
  • scale_largeticks Float (0->1) describing the height of large scale ticks relative to the track height.
  • scale_smallticks Float (0->1) describing the height of large scale ticks relative to the track height.
  • scale_largetick_interval Int, describing the number of bases that should separate large ticks
  • scale_smalltick_interval Int, describing the number of bases that should separate small ticks
  • scale_largetick_labels Boolean describing whether position labels should be written over large ticks
  • scale_smalltick_labels Boolean describing whether position labels should be written over small ticks
  • name String to help identify the track
  • height Relative height to draw the track
  • axis_labels Boolean describing whether the value labels should be placed on the Y axes
Overrides: object.__init__

new_set(self, type='feature', **args)

source code 

Create a new FeatureSet or GraphSet object.

Create a new FeatureSet or GraphSet object, add it to the track, and return for user manipulation

to_string(self, verbose=0)

source code 

Return a formatted string with information about the track.

Arguments:
  • verbose - Boolean indicating whether a short or complete account of the track is required

__str__(self)
(Informal representation operator)

source code 
Return a formatted string with information about the Track.
Overrides: object.__str__