Class: Bioroebe::SVG::MiniFeature
- Inherits:
-
Object
- Object
- Bioroebe::SVG::MiniFeature
- Defined in:
- lib/bioroebe/svg/mini_feature.rb
Overview
Bioroebe::SVG::MiniFeature
Instance Attribute Summary collapse
-
#block_gaps ⇒ Object
Returns the value of attribute block_gaps.
-
#end ⇒ Object
Returns the value of attribute end.
-
#exons ⇒ Object
Returns the value of attribute exons.
-
#id ⇒ Object
Returns the value of attribute id.
-
#params ⇒ Object
Returns the value of attribute params.
-
#segment_height ⇒ Object
Returns the value of attribute segment_height.
-
#start ⇒ Object
Returns the value of attribute start.
-
#strand ⇒ Object
Returns the value of attribute strand.
-
#utrs ⇒ Object
Returns the value of attribute utrs.
Instance Method Summary collapse
-
#initialize(i) ⇒ MiniFeature
constructor
# === initialize.
-
#reset ⇒ Object
# === reset (reset tag) ========================================================================= #.
Constructor Details
#initialize(i) ⇒ MiniFeature
#
initialize
Creates a new MiniFeature.
Arguments:
:start = the start position of the feature
:end = the end position of the feature
:strand = the strand of the feature
:exons = an array of exon positions
:utrs = an array of utrs positions
:block_gaps = an array of regions with nothing to be drawn, e.g. introns
:id = the name for the feature such as the gene name or transcript ID
:segment_height = the height of the current feature
Usage examples:
mini1 = Bioroebe::SVG::MiniFeature.new(
:start=>3631,
:end=>5899,
:strand=>'+',
:exons=>[4000, 4500, 4700, 5000],
:utrs=>[3631, 3650],
:segment_height=>5,
:id=>"AT1G01010"
)
MiniFeatures and Tracks
MiniFeatures are created and added to Bioroebe::SVG::Track# objects which will take responsibility for positioning and syling them.
#
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/bioroebe/svg/mini_feature.rb', line 61 def initialize(i) # ======================================================================= # # Deconstruct from the input hash given. # ======================================================================= # # ======================================================================= # # === @start # ======================================================================= # @start = i[:start] # ======================================================================= # # === @end # ======================================================================= # @end = i[:end] # ======================================================================= # # === @strand # ======================================================================= # @strand = i[:strand] # ======================================================================= # # === @exons # ======================================================================= # @exons = i[:exons] || [] # ======================================================================= # # === @utrs # ======================================================================= # @utrs = i[:utrs] || [] #start, ennd, strand, arg[:exons], arg[:utrs] # ======================================================================= # # === @id # ======================================================================= # @id = i[:id] # ======================================================================= # # === @params # ======================================================================= # @params = i[:params] # ======================================================================= # # === @segment_height # ======================================================================= # @segment_height = i[:segment_height] reset end |
Instance Attribute Details
#block_gaps ⇒ Object
Returns the value of attribute block_gaps.
24 25 26 |
# File 'lib/bioroebe/svg/mini_feature.rb', line 24 def block_gaps @block_gaps end |
#end ⇒ Object
Returns the value of attribute end.
20 21 22 |
# File 'lib/bioroebe/svg/mini_feature.rb', line 20 def end @end end |
#exons ⇒ Object
Returns the value of attribute exons.
22 23 24 |
# File 'lib/bioroebe/svg/mini_feature.rb', line 22 def exons @exons end |
#id ⇒ Object
Returns the value of attribute id.
18 19 20 |
# File 'lib/bioroebe/svg/mini_feature.rb', line 18 def id @id end |
#params ⇒ Object
Returns the value of attribute params.
26 27 28 |
# File 'lib/bioroebe/svg/mini_feature.rb', line 26 def params @params end |
#segment_height ⇒ Object
Returns the value of attribute segment_height.
25 26 27 |
# File 'lib/bioroebe/svg/mini_feature.rb', line 25 def segment_height @segment_height end |
#start ⇒ Object
Returns the value of attribute start.
19 20 21 |
# File 'lib/bioroebe/svg/mini_feature.rb', line 19 def start @start end |
#strand ⇒ Object
Returns the value of attribute strand.
21 22 23 |
# File 'lib/bioroebe/svg/mini_feature.rb', line 21 def strand @strand end |
#utrs ⇒ Object
Returns the value of attribute utrs.
23 24 25 |
# File 'lib/bioroebe/svg/mini_feature.rb', line 23 def utrs @utrs end |
Instance Method Details
#reset ⇒ Object
#
reset (reset tag)
#
104 105 106 107 108 109 |
# File 'lib/bioroebe/svg/mini_feature.rb', line 104 def reset # ======================================================================= # # === @block_gaps # ======================================================================= # @block_gaps = [] end |