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

Class Track

source code

object --+
         |
        Track

Track

Provides:

Methods:

o __init__(self, name=None, ...) Called on instantiation

o add_set(self, set) Add a FeatureSet or GraphSet to the diagram

o del_set(self, set_id) Delete a FeatureSet or GraphSet from the
diagram

o get_sets(self) Returns a list of the sets in the track

o get_ids(self) Returns a list of the ids for sets in the track

o range(self) Returns the base/position range covered by the data in
the track
o to_string(self, verbose=0) Returns a string describing the data in
the track

o __getitem__(self, key) Returns the set with the passed id

o __str__(self) Returns a formatted string describing the track

Attributes:

o height Int describing the relative height to other trackscale_fontsizes in the
diagram

o name String describing the track

o hide Boolean, 0 if the track is not to be drawn

o start, end Integers (or None) specifying start/end to draw just
a partial track.
o greytrack Boolean, 1 if a grey background to the track is to be
drawn
o greytrack_labels Int describing how many track-identifying labels
should be placed on the track at regular intervals
o greytrack_font String describing the font to use for the greytrack
labels
o greytrack_fontsize Int describing the font size to display the
labels on the grey track
o greytrack_font_rotation Int describing the angle through which to
rotate the grey track labels (Linear only)
o greytrack_font_color colors.Color describing the color to draw
the grey track labels

o scale Boolean, 1 if a scale is to be drawn on the track

o scale_format String, defaults to None, when scale values are written
as numerals. Setting this to 'SInt' invokes SI unit-like multiples, such as Mbp, Kbp and so on.

o scale_color colors.Color to draw the elements of the scale

o scale_font String describing the font to use for the scale labels

o scale_fontsize Int describing the size of the scale label font

o scale_fontangle Int describing the angle at which to draw the scale
labels (linear only)
o scale_ticks Boolean, 1 if ticks should be drawn at all on the
scale
o scale_largeticks Float (0->1) describing the height of large
scale ticks relative to the track height.
o scale_smallticks Float (0->1) describing the height of large
scale ticks relative to the track height.
o scale_largetick_interval Int, describing the number of bases that
should separate large ticks
o scale_smalltick_interval Int, describing the number of bases that
should separate small ticks
o scale_largetick_labels Boolean describing whether position labels
should be written over large ticks
o scale_smalltick_labels Boolean describing whether position labels
should be written over small ticks
o axis_labels Boolean describing whether the value labels should
be placed on the Y axes
Instance Methods [hide private]
 
__init__(self, name=None, ...)
diagram
source code
 
add_set(self, set)
o set A FeatureSet or GraphSet object
source code
FeatureSet or GraphSet
new_set(self, type='feature')
Create a new FeatureSet or GraphSet object, add it to the track, and return for user manipulation
source code
 
del_set(self, set_id)
o set_id The unique id for the set in this track
source code
FeatureSet or GraphSet
get_sets(self)
Return the sets contained in this track
source code
[int, int, ...]
get_ids(self)
Return the ids of all sets contained in this track
source code
(int, int)
range(self)
Returns the lowest and highest base (or mark) numbers as a tuple
source code
""
to_string(self, verbose=0)
account of the track is required
source code
int
__getitem__(self, key)
o key The id of a set in the track
source code
""
__str__(self)
Returns 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, ...)
(Constructor)

source code 
o height Int describing the relative height to other tracks in the
diagram

o name String describing the track

o hide Boolean, 0 if the track is not to be drawn

o greytrack Boolean, 1 if a grey background to the track is to be
drawn
o greytrack_labels Int describing how many track-identifying labels
should be placed on the track at regular intervals
o greytrack_font String describing the font to use for the greytrack
labels
o greytrack_fontsize Int describing the font size to display the
labels on the grey track
o greytrack_font_rotation Int describing the angle through which to
rotate the grey track labels (Linear only)
o greytrack_font_color colors.Color describing the color to draw
the grey track labels (overridden by backwards compatible argument with UK spelling, colour).

o scale Boolean, 1 if a scale is to be drawn on the track

o scale_color colors.Color to draw the elements of the scale
(overridden by backwards compatible argument with UK spelling, colour).

o scale_font String describing the font to use for the scale labels

o scale_fontsize Int describing the size of the scale label font

o scale_fontangle Int describing the angle at which to draw the scale
labels (linear only)
o scale_ticks Boolean, 1 if ticks should be drawn at all on the
scale
o scale_largeticks Float (0->1) describing the height of large
scale ticks relative to the track height.
o scale_smallticks Float (0->1) describing the height of large
scale ticks relative to the track height.
o scale_largetick_interval Int, describing the number of bases that
should separate large ticks
o scale_smalltick_interval Int, describing the number of bases that
should separate small ticks
o scale_largetick_labels Boolean describing whether position labels
should be written over large ticks
o scale_smalltick_labels Boolean describing whether position labels
should be written over small ticks

o name String to help identify the track

o height Relative height to draw the track

o axis_labels Boolean describing whether the value labels should
be placed on the Y axes
Overrides: object.__init__

add_set(self, set)

source code 

o set A FeatureSet or GraphSet object

Add a preexisting FeatureSet or GraphSet object to the track

del_set(self, set_id)

source code 

o set_id The unique id for the set in this track

Remove the set with the passed id from the track

to_string(self, verbose=0)

source code 
o verbose Boolean indicating whether a short or complete
account of the track is required

Returns a formatted string with information about the track

Returns: ""

__getitem__(self, key)
(Indexing operator)

source code 

o key The id of a set in the track

Return the set with the passed id

Returns: int

__str__(self)
(Informal representation operator)

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