Class Track
source code
Track
Provides:
Methods:
o __init__(self, name=None, height=1, hide=0, greytrack=0,
greytrack_labels=5, greytrack_fontsize=8,
greytrack_font='Helvetica', greytrack_font_rotation=0,
greytrack_fontcolor = colors.Color(0.6, 0.6, 0.6),
scale=1, scale_color=colors.black, scale_font='Helvetica',
scale_fontsize=6,
scale_fontangle=45, scale_largeticks=0.5, scale_ticks=1,
scale_smallticks=0.3, scale_largetick_interval=1e6,
scale_smalltick_interval=1e4, scale_largetick_labels=1,
scale_smalltick_labels=0) 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 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
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 elemnts 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
|
__init__(self,
name=None,
height=1)
o height Int describing the relative height to other tracks in the
diagram |
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
|
|
|
|
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)
o verbose Boolean indicating whether a short or complete
account of the track is required |
source code
|
|
int
|
|
""
|
__str__(self)
Returns a formatted string with information about the Track |
source code
|
|
__init__(self,
name=None,
height=1)
(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
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 elemnts 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
|
o set A FeatureSet or GraphSet object
Add a preexisting FeatureSet or GraphSet object to the track
|
o set_id The unique id for the set in this track
Remove the set with the passed id from the track
|
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: ""
|
o key The id of a set in the track
Return the set with the passed id
- Returns: int
|