Class: Rafflesia::GenomeInterval
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Rafflesia::GenomeInterval
- Defined in:
- lib/rafflesia/genomes/genome_interval.rb
Constant Summary collapse
- HASH_ATTRS =
{ contig: :contig, end: :end, length_bp: :length_bp, name: :name, start: :start, strand: :strand }.freeze
Instance Attribute Summary collapse
-
#contig ⇒ Object
Returns the value of attribute contig.
-
#end ⇒ Object
Returns the value of attribute end.
-
#length_bp ⇒ Object
Returns the value of attribute length_bp.
-
#name ⇒ Object
Returns the value of attribute name.
-
#start ⇒ Object
Returns the value of attribute start.
-
#strand ⇒ Object
Returns the value of attribute strand.
Instance Method Summary collapse
-
#initialize(json) ⇒ GenomeInterval
constructor
A new instance of GenomeInterval.
Constructor Details
#initialize(json) ⇒ GenomeInterval
Returns a new instance of GenomeInterval.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/rafflesia/genomes/genome_interval.rb', line 25 def initialize(json) super() hash = self.class.normalize(json) @contig = hash[:contig] @end = hash[:end] @length_bp = hash[:length_bp] @name = hash[:name] @start = hash[:start] @strand = hash[:strand] end |
Instance Attribute Details
#contig ⇒ Object
Returns the value of attribute contig.
17 18 19 |
# File 'lib/rafflesia/genomes/genome_interval.rb', line 17 def contig @contig end |
#end ⇒ Object
Returns the value of attribute end.
17 18 19 |
# File 'lib/rafflesia/genomes/genome_interval.rb', line 17 def end @end end |
#length_bp ⇒ Object
Returns the value of attribute length_bp.
17 18 19 |
# File 'lib/rafflesia/genomes/genome_interval.rb', line 17 def length_bp @length_bp end |
#name ⇒ Object
Returns the value of attribute name.
17 18 19 |
# File 'lib/rafflesia/genomes/genome_interval.rb', line 17 def name @name end |
#start ⇒ Object
Returns the value of attribute start.
17 18 19 |
# File 'lib/rafflesia/genomes/genome_interval.rb', line 17 def start @start end |
#strand ⇒ Object
Returns the value of attribute strand.
17 18 19 |
# File 'lib/rafflesia/genomes/genome_interval.rb', line 17 def strand @strand end |