Class: Circos::Chromosome
- Defined in:
- lib/feldtruby/visualization/circos.rb
Instance Attribute Summary collapse
-
#bands ⇒ Object
readonly
Returns the value of attribute bands.
Instance Method Summary collapse
- #dump_bands_to_circos(bandKeyOrder = nil) ⇒ Object
- #dump_to_circos_data(keyOrder = nil) ⇒ Object
-
#initialize(*args, &block) ⇒ Chromosome
constructor
A new instance of Chromosome.
Constructor Details
#initialize(*args, &block) ⇒ Chromosome
Returns a new instance of Chromosome.
6 7 8 9 |
# File 'lib/feldtruby/visualization/circos.rb', line 6 def initialize(*args, &block) super @bands = Hash.new end |
Instance Attribute Details
#bands ⇒ Object (readonly)
Returns the value of attribute bands.
5 6 7 |
# File 'lib/feldtruby/visualization/circos.rb', line 5 def bands @bands end |
Instance Method Details
#dump_bands_to_circos(bandKeyOrder = nil) ⇒ Object
14 15 16 |
# File 'lib/feldtruby/visualization/circos.rb', line 14 def dump_bands_to_circos(bandKeyOrder = nil) bands.map {|b| b.dump_to_circos_data(bandKeyOrder)}.join("\n") end |
#dump_to_circos_data(keyOrder = nil) ⇒ Object
10 11 12 13 |
# File 'lib/feldtruby/visualization/circos.rb', line 10 def dump_to_circos_data(keyOrder = nil) keyOrder ||= self.keys.sort (name + keyOrder.map {|key| self[key]}).join(" ") + "\n" end |