| Class | Bio::Graphics::Track |
| In: |
lib/bio/graphics/track.rb
|
| Parent: | Object |
The Bio::Graphics::Track class describes the container for features of the same type. See Bio::Graphics documentation for explanation of interplay between different classes.
| colour | [RW] | |
| features | [RW] | |
| glyph | [RW] | |
| grid | [RW] | |
| height | [RW] | |
| name | [RW] | |
| number_of_feature_rows | [RW] | |
| panel | [RW] | |
| show_label | [RW] | |
| vertical_offset | [RW] |
!!Not to be used directly. Use Bio::Graphics::Panel.add_track instead!! A track can not exist except within the confines of a Bio::Graphics::Panel object.
Arguments:
| Returns: | Bio::Graphics::Track object |
Takes a Bio::Feature and adds it as a Bio::Graphics::Feature to this track. A track contains features of the same type, e.g. (for sequence annotation:) genes, polymorphisms, ESTs, etc.
est_track.add_feature(Bio::Feature.new('EST1','50..60'))
est_track.add_feature(Bio::Feature.new('EST2','52..73'))
est_track.add_feature(Bio::Feature.new('EST3','41..69'))
gene_track.add_feature(Bio::Feature.new('gene2','39..73'))
For spliced features:
est_track.add_feature('EST4','join(34..53,153..191)')
Or on the complement strand:
est_track.add_feature('EST5','complement(join(34..53,153..191))')
See the documentation in Bio::Locations for a full description of how locations can be defined.
Features are only added if they are at least partly in the displayed region. If a feature is completely outside of the region, it‘s not added. If it should be only partly visible, it is added completely.
Arguments:
| Returns: | Bio::Graphics::Feature object that was created or nil |
Adds the track to a cairo drawing. This method should not be used directly by the user, but is called by Bio::Graphics::Panel.draw
Arguments:
| Returns: | FIXME: I don‘t know |